-
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
Error writing file /root/.kube/config: unable to open /tmp/juju : permission denied (sysctl fs.protected_regular) #7053
Comments
The ancient minikube probably used a different method, like not locking at all and hoping for the best. Do you have any selinux rules or otherwise that prevents opening temporary files ? Maybe systemd ? |
Yup. The ancient minikube didn't have delete.go and context.go. selinux is disabled.
But I'm using
Alex |
I think the problem here is that the files /tmp/juju-mk* are written as user instead of
If I change the owner to |
I think the problem is related to https://github.com/juju/mutex/blob/master/mutex_flock.go and how sudo is handled |
changing this
to
|
Thanks for confirming the problem is with systemd, then it's the same as #6391 |
thanks so much. sudo sysctl fs.protected_regular=0 works. |
I guess long term it will have to change, as long as systemd keeps on making breaking changes... Thanks for opening a bug report: juju/mutex#7 |
When I start K8S with minikube over my local ubuntu 20.04 LTS with the command $ minikube start --force --driver=docker (I user --driver=docker unless I use minikube start will not work for me) x Exiting due to HOST_JUJU_LOCK_PERMISSION: Failed kubeconfig update: unable to acquire lock for {Name:mk19004591210340446308469f521c5cfa3e1599 Clock:{} Delay:500ms Timeout:1m0s Cancel:}: unable to open /tmp/juju-mk19004591210340446308469f521c5cfa3e1599: permission denied |
💣 update config: writing kubeconfig: Error writing file /root/.kube/config: failed to acquire lock for /root/.kube/config: {Name:mk72a1487fd2da23da9e8181e16f352a6105bd56 Clock:{} Delay:500ms Timeout:1m0s Cancel:<nil>}: unable to open /tmp/juju-mk72a1487fd2da23da9e8181e16f352a6105bd56: permission denied
I'm running minikube with:
sudo minikube --vm-driver=none
This issue didn't happen in v1.3.1. The issue was discovered in v1.8.2.
Removing the /tmp/juju-* files fixes the problem but it happens every time you run
sudo minikube stop
orsudo minikube --vm-driver=none
Issue #5660 was opened and closed after the workaround above
The text was updated successfully, but these errors were encountered: