-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
changes between 1.28 and 1.29+ lead to decrease in docker/daemon.json options (aka daemon.json is being always overwritten) #16323
Comments
I was sure that config file was much older than that, but in general minikube should only try to change the config settings it actually cares about and not replace the existing config (made some similar changes to cri-o, but not docker) Especially for external platforms, those not managed by minikube itself |
There was a similar issue with "overlay2" recently, causing conflicts with exec flags on some platforms |
It got broken here: e59d621 (when the forceSystemd was changed) -// ForceSystemd forces the docker daemon to use systemd as cgroup manager
-func (r *Docker) forceSystemd() error {
- klog.Infof("Forcing docker to use systemd as cgroup manager...")
+// setCGroup configures the docker daemon to use driver as cgroup manager
+// ref: https://docs.docker.com/engine/reference/commandline/dockerd/#options-for-the-runtime
+func (r *Docker) setCGroup(driver string) error {
+ if driver == constants.UnknownCgroupDriver {
+ return fmt.Errorf("unable to configure docker to use unknown cgroup driver")
+ }
+
+ klog.Infof("configuring docker to use %q as cgroup driver...", driver) |
Great, thanks for a quick look and confirmation. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Is there any known workaround to this issue? My minikube is failing to start due to the docker service failing startup. To fix my docker service startup issue, I need to change the 'storage-driver' to 'vfs', which I can test in the Minikube container itself and it works (by modifying the /etc/docker/daemon.json). Due to this issue, the 'daemon.json' is regenerated everytime I run 'minikube start --docker-opt storage-driver=vfs' and the resulting storage driver is 'overlay2', which causes. Since the '--docker-opt' values seem to be discarded, is there any way to set the 'storage-driver' docker daemon in the minikube container? |
And i already thought that i am alone with the issue..:).. Indeed, can also confirm that docker-opt does not work as one would expect it. Hopefully we get reply one day |
Thanks for the follow-up @dmpe. I see that the fix has been lingering for quite a long time, but has not been merged. I hope that the minikube team will fix ''--docker-opt" and other options that affect the 'daemon.json' file, because it's very misleading to document it as an option. Maybe the team can change the documentation to more clearly document that current state, because these issues can be very hard to diagnose for folks who don't (want to) know the internals of Minikube. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Hi, I was also facing this issue, my workaround was to
|
Thanks, that's creative. We have on the other hand taken the opportunity to migrate to k3s. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@numbpun: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What Happened?
Hi,
We are using Centos 7 VM where we install minikube using something like this:
This works perfectly fine, both using 1.28 as well as 1.29+ minikube releases. However, while in 1.28
/etc/docker/daemon.json
was not replaced during the installation, in 1.29+ it is being replaced via this functionhttps://github.com/kubernetes/minikube/blob/v1.29.0/pkg/minikube/cruntime/docker.go#L524.
See for 1.28 here: https://github.com/kubernetes/minikube/blob/v1.28.0/pkg/minikube/cruntime/docker.go#L511
Well, of course, when we install minikube & docker and use
none
driver, we already setup docker in a way which allows us to use such configuration. :) :)In fact, we already set CGroupDriver to
systemd
, and not just that. We also customize many other settings in to make it work in a strictly regulated environment in our company, resulting into file be more like this:Now, we are stuck on using minikube 1.28 because with 1.29 the minikube will replace daemon.json file which -- even though makes minikube start properly ! -- it is not usable for our purposes in the company. Reason being "docker data" (images, etc.) are stored in
/var/lib/docker
andbip
with logging options cannot adjusted either, making it hard work in our environment.What would be your suggestion here? Should we maybe add a new option which will disable such overwrite of a file (e.g.
minikube start --disable-daemon-overwrite=true
, with a default beingfalse
(current behavior). Or maybe fix it in a different way - e.g. check if driver issystemd
, and if it is then do nothing, while it is not, attempt to change it.cc @prezha @afbjorklund
Thank you for any suggestions, or help.
Attach the log file
Minikube runs perfectly fine, it is just that daemon.json options for docker are no longer configurable.
Operating System
Other
Driver
None
The text was updated successfully, but these errors were encountered: