juju / mutex

Provides a named machine level mutex shareable between processes.
Other
27 stars 11 forks source link

unable to open /tmp/juju-mk : permission denied in minikube #7

Open alexeadem opened 4 years ago

alexeadem commented 4 years ago

`go build -tags "container_image_ostree_stub containers_image_openpgp go_getter_nos3 go_getter_nogcs" -ldflags="-X k8s.io/minikube/pkg/version.version=v1.8.2 -X k8s.io/minikube/pkg/version.isoVersion=v1.8.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="67d8c04c48c9c071485702048629bb2636dd6ba6-dirty"" -o out/minikube k8s.io/minikube/cmd/minikube [alex@dell minikube]$ sudo minikube start 😄 minikube v1.8.2 on Fedora 30 ✨ Using the none driver based on existing profile

💣 Unable to start VM. Please investigate and run 'minikube delete' if possible: boot lock: unable to open /tmp/juju-mka00e65579c2b557a802898fd1cf03ec4ab30a1 : permission denied

😿 minikube is exiting due to an error. If the above message is not useful, open an issue: 👉 https://github.com/kubernetes/minikube/issues/new/choose`

minikekube is ran with sudo

alexeadem commented 4 years ago

changing this

fd, err := syscall.Open(flockName, syscall.O_CREAT|syscall.O_RDONLY|syscall.O_CLOEXEC, 0600)

to

fd, err := syscall.Open(flockName, syscall.O_RDWR, 0) in https://github.com/juju/mutex/blob/master/mutex_flock.go fixes the problem

missing WR option?

manadart commented 4 years ago

It seems to me that O_RDONLY and 0600 are in conflict. I wonder if the behaviour varies between systems and is unpredictable...

Does simply removing O_RDONLY also work?