-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to create Database with 5.7 on Kubernetes / GCE - directory has files in it #186
Comments
Are you sure? 😉 A new ext4 disk partition is not usually empty; there is a |
Hehe. To be correct, I'm sure I created an empty disk and didn't add something. 🙈 Okay, hint seems to be right. Checked the filesystem with the working v5.6 container:
So there actually is a lost+found dir. Confirming now that the parameter for v5.7 is working is a bit tricky. Passing the parameter works in terms of not emitting the original error. Unfortunately now I have the following output of my pod:
It's the exact same type of FS used for the 5.6 image, but this one fails with permission issues? Dont get that. |
I had this issue with Kubernetes and MySQL 5.7.15 as well. Adding the suggestion from @yosifki to my container's definition got things working. Here's an extract of my working YAML definition: name: mysql-master
image: mysql:5.7
args:
- "--ignore-db-dir=lost+found" |
Issue still persists on newer
Repro steps.
|
@ahmetb right -- that's expected if using the raw root of a freshly-formatted ext4 drive (because it then contains I'd recommend either configuring k8s to use a subdirectory (which is my own personal preferred solution, given how k8s supports it and that it's likely to be less error-prone -- I believe it's as easy as adding I'm going to close this issue now, given that there are two different solutions noted. 👍 |
The subPath option worked and is a better solution IMO than the config flag in container: you don't need to edit the container, this is better because technically the container does not know whether any of its folders will be replaced by volumes so subPath is a nice separation of concerns. |
good |
good thank you |
The Any ideas how to solve it reliably on Kubernetes? EDIT: I've tried to run this init and it does seem to work as well, not sure if safe though:
|
Use a subpath, e.g. instead of datadir=/mountpath/ use datadir=/mountpath/mysql-data |
I tried everything here and no luck ? Any other suggestions? |
What issues did you you encounter with the workarounds given? Is the issue you're encountering the I'd recommend getting more details/information and asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repositories aren't really a help forum |
you can try it |
In case someone facing this in Kubernetes, it might be because of container got killed with OOM and couldn't complete the steps it was executing. Increase limits on mysql container is the fix for me in Kubernetes. |
The mysql:6.7 image upgrade caused the following error when deployed on GKE: > [ERROR] --initialize specified but the data directory has files in it. Aborting. Patch is based on this: docker-library/mysql#186 (comment) Related to #3482
* Support MySQL, see b/64102112 docker-library/mysql#186 * Use mysql 5.7 * Update mysql.yaml
The mysql:6.7 image upgrade caused the following error when deployed on GKE: > [ERROR] --initialize specified but the data directory has files in it. Aborting. Patch is based on this: docker-library/mysql#186 (comment) Related to #3482
MySQL version 5.7 contains a bug that prevents start up when there are files in the lost+found directory (which appear to get created on start up). This issue only appears to affect the AWS deployment... See link below for details OHM-972 docker-library/mysql#186 (comment)
Awesome |
Hey everybody,
I have a strange issue over here with MySQL running on Kubernetes inside Google Container Engine. I have a Deployment for a Database like so:
After creating an empty disk with that name and creating this deployment, the pod falls into a "container crashed back off loop" with the following error:
The exact same configurationis working for MySQL Version 5.6 with. Might be related with #69. Any Ideas regarding a solution or what might be the issue? 😟
To prevent the question: I'm absolutely sure the disk is empty after creation.![:trollface: :trollface:](https://github.githubassets.com/images/icons/emoji/trollface.png)
The text was updated successfully, but these errors were encountered: