From 41eddd813c6283201e98597b20682017c01e77f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 22 Jun 2023 12:33:57 +0200 Subject: [PATCH] fix: mysql deployment on k8s The `--ignore-db-dir` option is no longer supported on MySQL 8. See: https://dev.mysql.com/doc/refman/8.0/en/upgrade-prerequisites.html This option was causing the mysql container to fail. --- changelog.d/20230622_123257_regis_k8s_fix_mysql8_start.md | 1 + tutor/templates/k8s/deployments.yml | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20230622_123257_regis_k8s_fix_mysql8_start.md diff --git a/changelog.d/20230622_123257_regis_k8s_fix_mysql8_start.md b/changelog.d/20230622_123257_regis_k8s_fix_mysql8_start.md new file mode 100644 index 0000000..40c9422 --- /dev/null +++ b/changelog.d/20230622_123257_regis_k8s_fix_mysql8_start.md @@ -0,0 +1 @@ +- [Bugfix] On Kubernetes, fix mysql deployment by removing the `-ignore-db-dir` option, which no longer exists on MySQL 8. (by @regisb) diff --git a/tutor/templates/k8s/deployments.yml b/tutor/templates/k8s/deployments.yml index 30c73b8..ee01724 100644 --- a/tutor/templates/k8s/deployments.yml +++ b/tutor/templates/k8s/deployments.yml @@ -392,9 +392,7 @@ spec: containers: - name: mysql image: {{ DOCKER_IMAGE_MYSQL }} - # Note the ignore-db-dir: this is because ext4 volumes are created with a lost+found directory in them, which causes mysql - # initialisation to fail - args: ["mysqld", "--character-set-server=utf8", "--collation-server=utf8_general_ci", "--ignore-db-dir=lost+found"] + args: ["mysqld", "--character-set-server=utf8", "--collation-server=utf8_general_ci"] env: - name: MYSQL_ROOT_PASSWORD value: "{{ MYSQL_ROOT_PASSWORD }}"