Closed
Description
What Happened?
When trying to minikube cp
a file, I got the following error:
❌ Exiting due to MK_COMMAND_RUNNER: Fail to copy file ./kubernetes/crawler-seccomp.json: sudo test -d /var/lib/kubelet/seccomp && sudo scp -t /var/lib/kubelet/seccomp && sudo touch -d "2023-04-26 13:36:47.006150712 +0900" /var/lib/kubelet/seccomp/crawler-seccomp.json: Process exited with status 1
After checking the logs, it appeared to be caused by a permission error:
stderr:
stat: cannot stat '/var/lib/kubelet/seccomp/crawler-seccomp.json': Permission denied
I1107 12:50:00.285362 855374 ssh_runner.go:362] scp ./kubernetes/crawler-seccomp.json --> /var/lib/kubelet/seccomp/crawler-seccomp.json (13098 bytes)
I1107 12:50:00.294931 855374 out.go:177]
W1107 12:50:00.295765 855374 out.go:239] ❌ Exiting due to MK_COMMAND_RUNNER: Fail to copy file ./kubernetes/crawler-seccomp.json: sudo test -d /var/lib/kubelet/seccomp && sudo scp -t /var/lib/kubelet/seccomp && sudo touch -d "2023-04-26 13:36:47.006150712 +0900" /var/lib/kubelet/seccomp/crawler-seccomp.json: Process exited with status 1
So I spent a couple hours testing permission changes.
However, I am naive and glossed over the preceding message...
I1107 12:50:00.285327 855374 ssh_runner.go:352] existence check for /var/lib/kubelet/seccomp/crawler-seccomp.json: stat -c "%s %y" /var/lib/kubelet/seccomp/crawler-seccomp.json: Process exited with status 1
existence check
....
Is there any way to improve the message in stderr here?
Or can we add an option to minikube cp
for automatically creating directories that don't yet exist?
Thank you for your time.
Attach the log file
Log file created at: 2023/11/07 12:50:00
Running on machine: bcj115
Binary: Built with gc go1.20.7 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I1107 12:50:00.136817 855374 out.go:296] Setting OutFile to fd 1 ...
I1107 12:50:00.136913 855374 out.go:348] isatty.IsTerminal(1) = true
I1107 12:50:00.136921 855374 out.go:309] Setting ErrFile to fd 2...
I1107 12:50:00.136929 855374 out.go:348] isatty.IsTerminal(2) = true
I1107 12:50:00.137176 855374 root.go:338] Updating PATH: /home/bcj115/.minikube/bin
I1107 12:50:00.137428 855374 mustload.go:65] Loading cluster: minikube
I1107 12:50:00.137699 855374 config.go:182] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.27.4
I1107 12:50:00.138123 855374 cli_runner.go:164] Run: docker container inspect minikube --format={{.State.Status}}
I1107 12:50:00.150774 855374 host.go:66] Checking if "minikube" exists ...
I1107 12:50:00.150941 855374 cli_runner.go:164] Run: docker system info --format "{{json .}}"
I1107 12:50:00.188483 855374 info.go:266] docker info: {ID:YNNM:YNXS:BZNI:XECP:XUM5:QWVE:ILVP:VE2L:BHDX:PW7W:BWRQ:XNR4 Containers:4 ContainersRunning:1 ContainersPaused:0 ContainersStopped:3 Images:98 Driver:overlay2 DriverStatus:[[Backing Filesystem extfs] [Supports d_type true] [Using metacopy false] [Native Overlay Diff true] [userxattr false]] SystemStatus:<nil> Plugins:{Volume:[local] Network:[bridge host ipvlan macvlan null overlay] Authorization:<nil> Log:[awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog]} MemoryLimit:true SwapLimit:true KernelMemory:false KernelMemoryTCP:false CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true PidsLimit:true IPv4Forwarding:true BridgeNfIptables:true BridgeNfIP6Tables:true Debug:false NFd:31 OomKillDisable:false NGoroutines:45 SystemTime:2023-11-07 12:50:00.181718688 +0900 JST LoggingDriver:json-file CgroupDriver:systemd NEventsListener:0 KernelVersion:6.1.0-13-amd64 OperatingSystem:Debian GNU/Linux 12 (bookworm) OSType:linux Architecture:x86_64 IndexServerAddress:https://index.docker.io/v1/ RegistryConfig:{AllowNondistributableArtifactsCIDRs:[] AllowNondistributableArtifactsHostnames:[] InsecureRegistryCIDRs:[127.0.0.0/8] IndexConfigs:{DockerIo:{Name:docker.io Mirrors:[] Secure:true Official:true}} Mirrors:[]} NCPU:12 MemTotal:33571262464 GenericResources:<nil> DockerRootDir:/var/lib/docker HTTPProxy: HTTPSProxy: NoProxy: Name:bcj115 Labels:[] ExperimentalBuild:false ServerVersion:24.0.7 ClusterStore: ClusterAdvertise: Runtimes:{Runc:{Path:runc}} DefaultRuntime:runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:<nil>} LiveRestoreEnabled:false Isolation: InitBinary:docker-init ContainerdCommit:{ID:61f9fd88f79f081d64d6fa3bb1a0dc71ec870523 Expected:61f9fd88f79f081d64d6fa3bb1a0dc71ec870523} RuncCommit:{ID:v1.1.9-0-gccaecfc Expected:v1.1.9-0-gccaecfc} InitCommit:{ID:de40ad0 Expected:de40ad0} SecurityOptions:[name=apparmor name=seccomp,profile=builtin name=cgroupns] ProductLicense: Warnings:<nil> ServerErrors:[] ClientInfo:{Debug:false Plugins:[map[Name:buildx Path:/usr/libexec/docker/cli-plugins/docker-buildx SchemaVersion:0.1.0 ShortDescription:Docker Buildx Vendor:Docker Inc. Version:v0.11.2] map[Name:compose Path:/usr/libexec/docker/cli-plugins/docker-compose SchemaVersion:0.1.0 ShortDescription:Docker Compose Vendor:Docker Inc. Version:v2.21.0]] Warnings:<nil>}}
I1107 12:50:00.188633 855374 ssh_runner.go:195] Run: stat -c "%s %y" /var/lib/kubelet/seccomp/crawler-seccomp.json
I1107 12:50:00.188670 855374 cli_runner.go:164] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I1107 12:50:00.202021 855374 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:32772 SSHKeyPath:/home/bcj115/.minikube/machines/minikube/id_rsa Username:docker}
I1107 12:50:00.285327 855374 ssh_runner.go:352] existence check for /var/lib/kubelet/seccomp/crawler-seccomp.json: stat -c "%s %y" /var/lib/kubelet/seccomp/crawler-seccomp.json: Process exited with status 1
stdout:
stderr:
stat: cannot stat '/var/lib/kubelet/seccomp/crawler-seccomp.json': Permission denied
I1107 12:50:00.285362 855374 ssh_runner.go:362] scp ./kubernetes/crawler-seccomp.json --> /var/lib/kubelet/seccomp/crawler-seccomp.json (13098 bytes)
I1107 12:50:00.294931 855374 out.go:177]
W1107 12:50:00.295765 855374 out.go:239] ❌ Exiting due to MK_COMMAND_RUNNER: Fail to copy file ./kubernetes/crawler-seccomp.json: sudo test -d /var/lib/kubelet/seccomp && sudo scp -t /var/lib/kubelet/seccomp && sudo touch -d "2023-04-26 13:36:47.006150712 +0900" /var/lib/kubelet/seccomp/crawler-seccomp.json: Process exited with status 1
output:
W1107 12:50:00.295778 855374 out.go:239]
W1107 12:50:00.297322 855374 out.go:239] �[31m╭───────────────────────────────────────────────────────────────────────────────────────────╮�[0m
�[31m│�[0m �[31m│�[0m
�[31m│�[0m 😿 If the above advice does not help, please let us know: �[31m│�[0m
�[31m│�[0m 👉 https://github.com/kubernetes/minikube/issues/new/choose �[31m│�[0m
�[31m│�[0m �[31m│�[0m
�[31m│�[0m Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue. �[31m│�[0m
�[31m│�[0m Please also attach the following file to the GitHub issue: �[31m│�[0m
�[31m│�[0m - /tmp/minikube_cp_4fd23c4b02e5f86735138fff83a7a281b29cc616_0.log �[31m│�[0m
�[31m│�[0m �[31m│�[0m
�[31m╰───────────────────────────────────────────────────────────────────────────────────────────╯�[0m
I1107 12:50:00.298267 855374 out.go:177]
Operating System
None
Driver
None