Skip to content
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

v1.3.1: sudo minikube start requires sudo with vm-driver none #5110

Closed
tspencer244 opened this issue Aug 17, 2019 · 11 comments
Closed

v1.3.1: sudo minikube start requires sudo with vm-driver none #5110

tspencer244 opened this issue Aug 17, 2019 · 11 comments
Labels
co/none-driver kind/bug Categorizes issue or PR as related to a bug.

Comments

@tspencer244
Copy link

The exact command to reproduce the issue: sudo minikube start

The full output of the command that failed:

[sudo] password for tom: 
😄  minikube v1.3.1 on Arch 
💡  Please run with sudo. the vm-driver "none" requires sudo.

The output of the minikube logs command:

E0817 10:51:14.438266   19670 logs.go:156] Failed to list containers for "kube-apiserver": running command: docker ps -a --filter="name=k8s_kube-apiserver" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_kube-apiserver" --format="{{.ID}}"
.: exit status 1
E0817 10:51:14.488278   19670 logs.go:156] Failed to list containers for "coredns": running command: docker ps -a --filter="name=k8s_coredns" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_coredns" --format="{{.ID}}"
.: exit status 1
E0817 10:51:14.535055   19670 logs.go:156] Failed to list containers for "kube-scheduler": running command: docker ps -a --filter="name=k8s_kube-scheduler" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_kube-scheduler" --format="{{.ID}}"
.: exit status 1
E0817 10:51:14.584838   19670 logs.go:156] Failed to list containers for "kube-proxy": running command: docker ps -a --filter="name=k8s_kube-proxy" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_kube-proxy" --format="{{.ID}}"
.: exit status 1
E0817 10:51:14.624487   19670 logs.go:156] Failed to list containers for "kube-addon-manager": running command: docker ps -a --filter="name=k8s_kube-addon-manager" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_kube-addon-manager" --format="{{.ID}}"
.: exit status 1
E0817 10:51:14.671676   19670 logs.go:156] Failed to list containers for "kubernetes-dashboard": running command: docker ps -a --filter="name=k8s_kubernetes-dashboard" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_kubernetes-dashboard" --format="{{.ID}}"
.: exit status 1
E0817 10:51:14.711273   19670 logs.go:156] Failed to list containers for "storage-provisioner": running command: docker ps -a --filter="name=k8s_storage-provisioner" --format="{{.ID}}"
 output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
: running command: docker ps -a --filter="name=k8s_storage-provisioner" --format="{{.ID}}"
.: exit status 1
==> Docker <==
-- Logs begin at Sun 2019-08-04 15:13:23 AWST, end at Sat 2019-08-17 10:51:14 AWST. --
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.092428984+08:00" level=warning msg="2e96fe70697c36416caeb43df95a99347a06ff17f24c3b7a87cc54a4fb00fa84 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/2e96fe70697c36416caeb43df95a99347a06ff17f24c3b7a87cc54a4fb00fa84/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.106948258+08:00" level=info msg="shim reaped" id=625d44546707c963c57921a1e7173ec8097773b51070ce57a1f96a0b6a311ce9
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.115380021+08:00" level=info msg="shim reaped" id=f65a41405f5f5b6c45491dc5cac179bb0043fc50be6e097b5327ff977dc78390
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.117042577+08:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.117137327+08:00" level=warning msg="625d44546707c963c57921a1e7173ec8097773b51070ce57a1f96a0b6a311ce9 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/625d44546707c963c57921a1e7173ec8097773b51070ce57a1f96a0b6a311ce9/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.123127441+08:00" level=info msg="shim reaped" id=b6d956ab0fa8a9d811e2f4c274652984f8926912ca59f96c823c172b01a249c9
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.125424968+08:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.125485601+08:00" level=warning msg="f65a41405f5f5b6c45491dc5cac179bb0043fc50be6e097b5327ff977dc78390 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/f65a41405f5f5b6c45491dc5cac179bb0043fc50be6e097b5327ff977dc78390/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.132860886+08:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.132932493+08:00" level=warning msg="b6d956ab0fa8a9d811e2f4c274652984f8926912ca59f96c823c172b01a249c9 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/b6d956ab0fa8a9d811e2f4c274652984f8926912ca59f96c823c172b01a249c9/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.158949393+08:00" level=info msg="Container 0cd22ce8f6119679f982ece3d96709d6a09ef362cf6e78ddb29da9ce2b0f17a0 failed to exit within 10 seconds of signal 15 - using the force"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.164398292+08:00" level=info msg="shim reaped" id=412b9c64b3530115f24794582d464c4f0a46ccb3c2be06d12a1d6212ee3b3824
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.164889062+08:00" level=info msg="shim reaped" id=5c5d00b30ad286ef5348b4a1eb74f3d0dc9af79d62f41d7662d1d3717be47a6a
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.174488367+08:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.174632555+08:00" level=warning msg="412b9c64b3530115f24794582d464c4f0a46ccb3c2be06d12a1d6212ee3b3824 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/412b9c64b3530115f24794582d464c4f0a46ccb3c2be06d12a1d6212ee3b3824/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.175174641+08:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.175203533+08:00" level=warning msg="5c5d00b30ad286ef5348b4a1eb74f3d0dc9af79d62f41d7662d1d3717be47a6a cleanup: failed to unmount IPC: umount /var/lib/docker/containers/5c5d00b30ad286ef5348b4a1eb74f3d0dc9af79d62f41d7662d1d3717be47a6a/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.344684046+08:00" level=info msg="shim reaped" id=0cd22ce8f6119679f982ece3d96709d6a09ef362cf6e78ddb29da9ce2b0f17a0
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.356056431+08:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Aug 12 16:49:25 tom-pc dockerd[1832]: time="2019-08-12T16:49:25.356222831+08:00" level=warning msg="0cd22ce8f6119679f982ece3d96709d6a09ef362cf6e78ddb29da9ce2b0f17a0 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/0cd22ce8f6119679f982ece3d96709d6a09ef362cf6e78ddb29da9ce2b0f17a0/mounts/shm, flags: 0x2: no such file or directory"
Aug 12 16:49:35 tom-pc systemd[1]: Stopping Docker Application Container Engine...
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.346989707+08:00" level=info msg="Processing signal 'terminated'"
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.349352039+08:00" level=info msg="Daemon shutdown complete"
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.349413108+08:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=moby
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.349455307+08:00" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.349550754+08:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.355480937+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc0008cd320, TRANSIENT_FAILURE" module=grpc
Aug 12 16:49:35 tom-pc dockerd[1832]: time="2019-08-12T16:49:35.355551631+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc0008cd320, CONNECTING" module=grpc
Aug 12 16:49:36 tom-pc systemd[1]: docker.service: Succeeded.
Aug 12 16:49:36 tom-pc systemd[1]: Stopped Docker Application Container Engine.

==> container status <==
E0817 10:51:14.813667   19670 logs.go:134] failed: running command: sudo crictl ps -a || sudo docker ps -a
.: exit status 1

==> dmesg <==
[  +0.003628] EDAC sbridge: Failed to register device with error -19.
[  +0.001476] kvm: disabled by bios
[  +0.124337] EDAC sbridge: CPU SrcID #0, Ha #0, Channel #1 has DIMMs, but ECC is disabled
[  +0.001397] EDAC sbridge: Couldn't find mci handler
[  +0.001381] EDAC sbridge: Failed to register device with error -19.
[  +0.002430] kvm: disabled by bios
[  +0.129361] EDAC sbridge: CPU SrcID #0, Ha #0, Channel #1 has DIMMs, but ECC is disabled
[  +0.002342] EDAC sbridge: Couldn't find mci handler
[  +0.002133] EDAC sbridge: Failed to register device with error -19.
[  +0.002898] kvm: disabled by bios
[  +0.150995] EDAC sbridge: CPU SrcID #0, Ha #0, Channel #1 has DIMMs, but ECC is disabled
[  +0.002217] EDAC sbridge: Couldn't find mci handler
[  +0.002182] EDAC sbridge: Failed to register device with error -19.
[  +0.002985] kvm: disabled by bios
[  +0.170620] kvm: disabled by bios
[  +0.002348] EDAC sbridge: CPU SrcID #0, Ha #0, Channel #1 has DIMMs, but ECC is disabled
[  +0.002157] EDAC sbridge: Couldn't find mci handler
[  +0.002119] EDAC sbridge: Failed to register device with error -19.
[  +0.162572] EDAC sbridge: CPU SrcID #0, Ha #0, Channel #1 has DIMMs, but ECC is disabled
[  +0.002233] EDAC sbridge: Couldn't find mci handler
[  +0.002157] EDAC sbridge: Failed to register device with error -19.
[  +3.975224] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[  +0.022720] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[  +0.013701] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[  +2.437744] kauditd_printk_skb: 21 callbacks suppressed
[  +3.250587] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[  +0.022911] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[  +0.011930] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[Aug17 09:49] usb 1-7: current rate 4500480 is different from the runtime rate 44100
[Aug17 10:26] usb 1-7: current rate 4500480 is different from the runtime rate 44100

==> kernel <==
 10:51:14 up  1:06,  1 user,  load average: 1.22, 1.12, 1.25
Linux tom-pc 5.2.8-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 9 21:36:07 UTC 2019 x86_64 GNU/Linux
PRETTY_NAME="Arch Linux"

==> kubelet <==
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
      Pass -q to turn off this notice.
-- Logs begin at Sun 2019-08-04 15:13:56 AWST, end at Sat 2019-08-17 10:32:05 AWST. --
-- No entries --

💣  Error getting machine logs: unable to fetch logs for: container status

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new/choose

The operating system version: 5.2.8-arch1-1-ARCH

@medyagh
Copy link
Member

medyagh commented Aug 17, 2019

The none driver currently does require sudo. We are trying to get rid of this requirement in the next versions of minikube

@tspencer244
Copy link
Author

The none driver currently does require sudo. We are trying to get rid of this requirement in the next versions of minikube

Yes that is correct, however when running sudo minikube start it does not start and says it needs to run with sudo even though it is definitely being executed with sudo 🙁

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 17, 2019

Is your root user called "root" ? There was some error when UID 0 have weird names: #4995

                if d == constants.DriverNone && u.Name != "root" {
                        exit.UsageT(`Please run with sudo. the vm-driver "{{.driver_name}}" requires sudo.`, out.V{"driver_name": constants.DriverNone})

On some systems, the superuser doesn't have a real name (only login name). Or a different one.

https://golang.org/pkg/os/user/#User

@afbjorklund afbjorklund added the kind/bug Categorizes issue or PR as related to a bug. label Aug 17, 2019
@tspencer244
Copy link
Author

Is your root user called "root" ? There was some error when UID 0 have weird names: #4995

                if d == constants.DriverNone && u.Name != "root" {
                        exit.UsageT(`Please run with sudo. the vm-driver "{{.driver_name}}" requires sudo.`, out.V{"driver_name": constants.DriverNone})

On some systems, the superuser doesn't have a real name (only login name). Or a different one.

https://golang.org/pkg/os/user/#User

Yes, the root user on my system is named "root". I also ran a simple golang script using the "os/user" import to confirm user.Current() would return the expected value of "root".

@afbjorklund
Copy link
Collaborator

Just thought I would ask, because on Manjaro (I think it was) the root user was called ""

package main

import (
	"fmt"
	"os/user"
)

func main() {
	u, _ := user.Current()
	fmt.Printf("User Name: %v\n", u.Name)
}
$ sudo go run rootuser.go 
[sudo] lösenord för anders: 
User Name: root

Anyway, the plan for "soon" is to have the none user run without root (i.e. call sudo for you)

@tspencer244
Copy link
Author

Just thought I would ask, because on Manjaro (I think it was) the root user was called ""

package main

import (
	"fmt"
	"os/user"
)

func main() {
	u, _ := user.Current()
	fmt.Printf("User Name: %v\n", u.Name)
}
$ sudo go run rootuser.go 
[sudo] lösenord för anders: 
User Name: root

Anyway, the plan for "soon" is to have the none user run without root (i.e. call sudo for you)

Thank you for following up with this clarifying context, it finally made me realise that there is a difference between User.Name and User.Username. The User.Name of my root user was indeed blank/empty!

I have set the display name for my root user via this command:

sudo chfn -f "root" root

And now minikube starts up without complaint 🙂

Thank you for your help on this one!

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 18, 2019

BTW: It is perfectly OK for root (or any user) to not have a display name, this is a bug in minikube.

It even said so in the go docs:

        // Username is the login name.
        Username string
        // Name is the user's real or display name.
        // It might be blank.
        // On POSIX systems, this is the first (or only) entry in the GECOS field
        // list.
        // On Windows, this is the user's display name.
        // On Plan 9, this is the contents of /dev/user.
        Name string

"It might be blank." (i.e. pw_gecos)

Probably wasn't the best of moves (from go) to rename the pw_name field to "Username", either...

@tspencer244
Copy link
Author

BTW: It is perfectly OK for root (or any user) to not have a display name, this is a bug in minikube.

It even said so in the go docs:

        // Username is the login name.
        Username string
        // Name is the user's real or display name.
        // It might be blank.
        // On POSIX systems, this is the first (or only) entry in the GECOS field
        // list.
        // On Windows, this is the user's display name.
        // On Plan 9, this is the contents of /dev/user.
        Name string

"It might be blank." (i.e. pw_gecos)

Probably wasn't the best of moves (from go) to rename the pw_name field to "Username", either...

Is it a bug? Or an undocumented feature? Using display name could be intended as a way to work around scenarios where the administrative username is not "root" 🤔

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 18, 2019

Basically nobody cares about the GECOS. Anyway we should be checking user id, not user name.

i.e. Uid == "0", rather than Username == "root" (user ID is a string, due to Windows compatibility)

The superuser doesn't actually have to be called root either.

But I can't really recall anyone but gobo trying to change it...

@Xuanwo
Copy link

Xuanwo commented Sep 6, 2019

@afbjorklund may be I can send a pr to fix it?

Aaa, we already have #4745

@ghost
Copy link

ghost commented Sep 26, 2019

Hi, "sudo minikube start --vm-driver=none" while executing this command I am getting the error as sorry,minikube is crashed I am facing this issue, can anyone give me the suggestion to overcome this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants