From c5b6b3ad4962da9d71b083a40fba4b641a5ac112 Mon Sep 17 00:00:00 2001 From: Maciej Strzelecki Date: Thu, 20 Oct 2016 09:57:50 +0200 Subject: [PATCH] MySQL fails to start without persistence enabled When `persistance.enabled` is set to `false`, `emptyDir` volume is mounted as `/var/lib/mysql` and `rmdir /var/lib/mysql/lost+found` fails because the directory is not there. ``` 2m 5s 12 {kubelet minikube} Warning FailedSync Error syncing pod, skipping: [failed to "InitContainer" for "remove-lost-found" with RunInitContainerError: "init container \"remove-lost-found\" exited with 1", failed to "StartContainer" for "remove-lost-found" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=remove-lost-found pod=pruning-bunny-mysql-3645202232-9md2n_default(c5e4252e-9699-11e6-97b4-da01ddf400ca)" ``` --- stable/mysql/Chart.yaml | 2 +- stable/mysql/templates/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/mysql/Chart.yaml b/stable/mysql/Chart.yaml index 4d58b6b6f9..626c146332 100644 --- a/stable/mysql/Chart.yaml +++ b/stable/mysql/Chart.yaml @@ -1,5 +1,5 @@ name: mysql -version: 0.1.1 +version: 0.1.2 description: Chart for MySQL keywords: - mysql diff --git a/stable/mysql/templates/deployment.yaml b/stable/mysql/templates/deployment.yaml index 8d227c8b9a..a979070d88 100644 --- a/stable/mysql/templates/deployment.yaml +++ b/stable/mysql/templates/deployment.yaml @@ -17,7 +17,7 @@ spec: { "name": "remove-lost-found", "image": "busybox:1.25.0", - "command": ["rmdir", "/var/lib/mysql/lost+found"], + "command": ["rm", "-fr", "/var/lib/mysql/lost+found"], "volumeMounts": [ { "name": "data",