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

docker/podman: add solution message when container exits after start/create #8501

Merged
merged 8 commits into from
Jun 18, 2020

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Jun 17, 2020

Helps with debugging issues like this: #8163

by adding a solution message and also adding postmortem docker logs and docker info logs to the verbose log
after this PR normal logs:

😄  minikube v1.11.0 on Darwin 10.15.5
✨  Using the docker driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating docker container (CPUs=2, Memory=4000MB) ...
✋  Stopping "minikube" in docker ...
🛑  Powering off "minikube" via SSH ...
🔥  Deleting "minikube" in docker ...

💥  Unfortunately docker container exited after it was created, with an unclear root cause.
💡  If you are still interested to make docker driver work. The following suggestions might help you get passed this issue:

        - Prune unused docker images, volumes and abandoned containers.

        - Restart your docker service

        - Ensure your docker daemon has access to enough CPU/memory resources. 

        - Docs https://docs.docker.com/docker-for-mac/#resources

        - Delete and recreate minikube cluster
                minikube delete
                minikube start --driver=docker

💣  error provisioning host: Failed to start host: creating host: create: creating: create kic node: container name "minikube": container status is not running after creation

😿  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

logs with --alsologtostderr include dokcer info and docke logs

medya@~/workspace/minikube (sol_msg_check_running) $ make && ./out/minikube start --driver=docker --alsologtostderr
make: `out/minikube' is up to date.
I0617 14:49:59.608496   10636 start.go:98] hostinfo: {"hostname":"medya-macbookpro3.roam.corp.google.com","uptime":416677,"bootTime":1592013922,"procs":470,"os":"darwin","platform":"darwin","platformFamily":"","platformVersion":"10.15.5","kernelVersion":"19.5.0","virtualizationSystem":"","virtualizationRole":"","hostid":"54f1a78d-6f41-32bd-bfed-4381f9f6e2ef"}
W0617 14:49:59.608605   10636 start.go:106] gopshost.Virtualization returned error: not implemented yet
😄  minikube v1.11.0 on Darwin 10.15.5
I0617 14:49:59.628329   10636 driver.go:260] Setting default libvirt URI to qemu:///system
I0617 14:49:59.628843   10636 notify.go:125] Checking for updates...
I0617 14:49:59.683138   10636 docker.go:96] docker version: linux-19.03.8
✨  Using the docker driver based on user configuration
I0617 14:49:59.696978   10636 start.go:207] selected driver: docker
I0617 14:49:59.696989   10636 start.go:604] validating driver "docker" against 
I0617 14:49:59.697005   10636 start.go:615] status for docker: {Installed:true Healthy:true Error: Fix: Doc:}
I0617 14:49:59.697026   10636 start.go:933] auto setting extra-config to "kubeadm.pod-network-cidr=10.244.0.0/16".
I0617 14:49:59.697074   10636 start_flags.go:218] no existing cluster config was found, will generate one from the flags 
I0617 14:49:59.697195   10636 cli_runner.go:109] Run: docker system info --format "{{json .}}"
I0617 14:49:59.789710   10636 start_flags.go:232] Using suggested 4000MB memory alloc based on sys=16384MB, container=7966MB
I0617 14:49:59.789811   10636 start_flags.go:556] Wait components to verify : map[apiserver:true system_pods:true]
👍  Starting control plane node minikube in cluster minikube
I0617 14:49:59.894971   10636 image.go:92] Found gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438 in local docker daemon, skipping pull
I0617 14:49:59.895029   10636 cache.go:113] gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438 exists in daemon, skipping pull
I0617 14:49:59.895043   10636 preload.go:95] Checking if preload exists for k8s version v1.18.3 and runtime docker
I0617 14:49:59.895103   10636 preload.go:103] Found local preload: /Users/medya/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4
I0617 14:49:59.895114   10636 cache.go:51] Caching tarball of preloaded images
I0617 14:49:59.895139   10636 preload.go:129] Found /Users/medya/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4 in cache, skipping download
I0617 14:49:59.895147   10636 cache.go:54] Finished verifying existence of preloaded tar for  v1.18.3 on docker
I0617 14:49:59.895477   10636 profile.go:156] Saving config to /Users/medya/.minikube/profiles/minikube/config.json ...
I0617 14:49:59.895661   10636 lock.go:35] WriteFile acquiring /Users/medya/.minikube/profiles/minikube/config.json: {Name:mkcfdcaaa21816d14cd9720660d7b2e91b28d741 Clock:{} Delay:500ms Timeout:1m0s Cancel:}
I0617 14:49:59.896100   10636 cache.go:178] Successfully downloaded all kic artifacts
I0617 14:49:59.896130   10636 start.go:240] acquiring machines lock for minikube: {Name:mk776146a90e3c3e4f2a4d11e614d78349a56d54 Clock:{} Delay:500ms Timeout:15m0s Cancel:}
I0617 14:49:59.896640   10636 start.go:244] acquired machines lock for "minikube" in 496.393µs
I0617 14:49:59.896670   10636 start.go:84] Provisioning new machine with config: &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO: KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438 Memory:4000 CPUs:2 DiskSize:20000 Driver:docker HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.18.3 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: ExtraOptions:[{Component:kubeadm Key:pod-network-cidr Value:10.244.0.0/16}] ShouldLoadCachedImages:true EnableDefaultCNI:false NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.18.3 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true]} &{Name: IP: Port:8443 KubernetesVersion:v1.18.3 ControlPlane:true Worker:true}
I0617 14:49:59.897317   10636 start.go:121] createHost starting for "" (driver="docker")
🔥  Creating docker container (CPUs=2, Memory=4000MB) ...
I0617 14:49:59.916529   10636 start.go:157] libmachine.API.Create for "minikube" (driver="docker")
I0617 14:49:59.916561   10636 client.go:161] LocalClient.Create starting
I0617 14:49:59.916615   10636 main.go:115] libmachine: Reading certificate data from /Users/medya/.minikube/certs/ca.pem
I0617 14:49:59.916836   10636 main.go:115] libmachine: Decoding PEM data...
I0617 14:49:59.916854   10636 main.go:115] libmachine: Parsing certificate...
I0617 14:49:59.916973   10636 main.go:115] libmachine: Reading certificate data from /Users/medya/.minikube/certs/cert.pem
I0617 14:49:59.917095   10636 main.go:115] libmachine: Decoding PEM data...
I0617 14:49:59.917104   10636 main.go:115] libmachine: Parsing certificate...
I0617 14:49:59.917809   10636 cli_runner.go:109] Run: docker ps -a --format {{.Names}}
I0617 14:49:59.954494   10636 cli_runner.go:109] Run: docker volume create minikube --label name.minikube.sigs.k8s.io=minikube --label created_by.minikube.sigs.k8s.io=true
I0617 14:49:59.991003   10636 oci.go:101] Successfully created a docker volume minikube
I0617 14:49:59.991118   10636 preload.go:95] Checking if preload exists for k8s version v1.18.3 and runtime docker
I0617 14:49:59.991171   10636 preload.go:103] Found local preload: /Users/medya/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4
I0617 14:49:59.991181   10636 kic.go:134] Starting extracting preloaded images to volume ...
I0617 14:49:59.991198   10636 cli_runner.go:109] Run: docker info --format "'{{json .SecurityOptions}}'"
I0617 14:49:59.991258   10636 cli_runner.go:109] Run: docker run --rm --entrypoint /usr/bin/tar -v /Users/medya/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4:/preloaded.tar:ro -v minikube:/extractDir gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438 -I lz4 -xvf /preloaded.tar -C /extractDir
I0617 14:50:00.090703   10636 cli_runner.go:109] Run: docker run -d -t --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=4000mb -e container=docker --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 --publish=127.0.0.1::5000 gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438
I0617 14:50:00.536278   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Running}}
I0617 14:50:00.584421   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
I0617 14:50:00.628605   10636 oci.go:215] the created container "minikube" has a running status.
I0617 14:50:00.628808   10636 cli_runner.go:109] Run: docker logs --timestamps --details minikube
W0617 14:50:00.673132   10636 oci.go:595] Postmortem container logs: docker logs --timestamps --details minikube
I0617 14:50:00.673341   10636 cli_runner.go:109] Run: docker system info --format "{{json .}}"
W0617 14:50:00.945030   10636 oci.go:602] postmortem docker info: {ID:5FLL:BD2R:ZVCB:VJLW:7PTG:BH2A:7PZM:AFWX:P3KO:IPHN:RWUP:ANSG Containers:2 ContainersRunning:2 ContainersPaused:0 ContainersStopped:0 Images:50 Driver:overlay2 DriverStatus:[[Backing Filesystem ] [Supports d_type true] [Native Overlay Diff true]] SystemStatus: Plugins:{Volume:[local] Network:[bridge host ipvlan macvlan null overlay] Authorization: Log:[awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog]} MemoryLimit:true SwapLimit:true KernelMemory:true KernelMemoryTCP:true CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true PidsLimit:true IPv4Forwarding:true BridgeNfIptables:true BridgeNfIP6Tables:true Debug:true NFd:55 OomKillDisable:true NGoroutines:69 SystemTime:2020-06-17 21:50:00.807387362 +0000 UTC LoggingDriver:json-file CgroupDriver:cgroupfs NEventsListener:4 KernelVersion:4.19.76-linuxkit OperatingSystem:Docker Desktop 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:4 MemTotal:8353480704 GenericResources: DockerRootDir:/var/lib/docker HTTPProxy:gateway.docker.internal:3128 HTTPSProxy:gateway.docker.internal:3129 NoProxy: Name:docker-desktop Labels:[] ExperimentalBuild:false ServerVersion:19.03.8 ClusterStore: ClusterAdvertise: Runtimes:{Runc:{Path:runc}} DefaultRuntime:runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:} LiveRestoreEnabled:false Isolation: InitBinary:docker-init ContainerdCommit:{ID:7ad184331fa3e55e52b890ea95e65ba581ae3429 Expected:7ad184331fa3e55e52b890ea95e65ba581ae3429} RuncCommit:{ID:dc9208a3303feef5b3839f4323d9beb36df0a9dd Expected:dc9208a3303feef5b3839f4323d9beb36df0a9dd} InitCommit:{ID:fec3683 Expected:fec3683} SecurityOptions:[name=seccomp,profile=default] ProductLicense:Community Engine Warnings: ClientInfo:{Debug:false Plugins:[] Warnings:}}
I0617 14:50:00.945476   10636 cli_runner.go:109] Run: docker system info --format "{{json .}}"
I0617 14:50:01.065230   10636 client.go:164] LocalClient.Create took 1.148639891s
I0617 14:50:03.070308   10636 start.go:124] duration metric: createHost completed in 3.1728951s
I0617 14:50:03.070360   10636 start.go:75] releasing machines lock for "minikube", held for 3.173652637s
I0617 14:50:03.071346   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
I0617 14:50:03.123201   10636 stop.go:36] StopHost: minikube
✋  Stopping "minikube" in docker ...
I0617 14:50:03.245922   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
🛑  Powering off "minikube" via SSH ...
I0617 14:50:03.302790   10636 cli_runner.go:109] Run: docker exec --privileged -t minikube /bin/bash -c "sudo init 0"
I0617 14:50:04.479601   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
I0617 14:50:04.549037   10636 oci.go:564] container minikube status is Stopped
I0617 14:50:04.549080   10636 oci.go:576] Successfully shutdown container minikube
I0617 14:50:04.549086   10636 stop.go:84] shutdown container: err=
I0617 14:50:04.549147   10636 main.go:115] libmachine: Stopping "minikube"...
I0617 14:50:04.549386   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
I0617 14:50:04.610384   10636 stop.go:56] stop err: Machine "minikube" is already stopped.
I0617 14:50:04.610430   10636 stop.go:59] host is already stopped
🔥  Deleting "minikube" in docker ...
I0617 14:50:05.732498   10636 cli_runner.go:109] Run: docker container inspect -f {{.Id}} minikube
I0617 14:50:05.773289   10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
I0617 14:50:05.822674   10636 cli_runner.go:109] Run: docker exec --privileged -t minikube /bin/bash -c "sudo init 0"
I0617 14:50:05.864031   10636 oci.go:556] error shutdown minikube: docker exec --privileged -t minikube /bin/bash -c "sudo init 0": exit status 1
stdout:

stderr:
Error response from daemon: Container 56df4631d07fc5dcf87dead126fb35e8be59d999aab74f351c5dd6e811249ab0 is not running
I0617 14:50:06.085813 10636 cli_runner.go:151] Completed: docker run --rm --entrypoint /usr/bin/tar -v /Users/medya/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v3-v1.18.3-docker-overlay2-amd64.tar.lz4:/preloaded.tar:ro -v minikube:/extractDir gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438 -I lz4 -xvf /preloaded.tar -C /extractDir: (6.094403356s)
I0617 14:50:06.085854 10636 kic.go:139] duration metric: took 6.094567 seconds to extract preloaded images to volume
I0617 14:50:06.867514 10636 cli_runner.go:109] Run: docker container inspect minikube --format={{.State.Status}}
I0617 14:50:06.922364 10636 oci.go:564] container minikube status is Stopped
I0617 14:50:06.922424 10636 oci.go:576] Successfully shutdown container minikube
I0617 14:50:06.922569 10636 cli_runner.go:109] Run: docker rm -f -v minikube
I0617 14:50:06.989180 10636 cli_runner.go:109] Run: docker container inspect -f {{.Id}} minikube
I0617 14:50:07.033575 10636 start.go:364] will skip retrying to create machine because error is not retriable: creating host: create: creating: create kic node: container name "minikube": container status is not running after creation

💥 Unfortunately docker container exited after it was created, with an unclear root cause.
💡 If you are still interested to make docker driver work. The following suggestions might help you get passed this issue:

    - Prune unused docker images, volumes and abandoned containers.

    - Restart your docker service

    - Ensure your docker daemon has access to enough CPU/memory resources. 

    - Docs https://docs.docker.com/docker-for-mac/#resources

    - Delete and recreate minikube cluster
            minikube delete
            minikube start --driver=docker

I0617 14:50:07.126777 10636 exit.go:58] WithError(error provisioning host)=Failed to start host: creating host: create: creating: create kic node: container name "minikube": container status is not running after creation called from:
goroutine 1 [running]:
runtime/debug.Stack(0x14, 0x583626f, 0x65)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/debug/stack.go:24 +0x9d
k8s.io/minikube/pkg/minikube/exit.WithError(0x57cad7e, 0x17, 0x5abc140, 0xc0008fa380)
/Users/medya/workspace/minikube/pkg/minikube/exit/exit.go:58 +0x34
k8s.io/minikube/cmd/minikube/cmd.runStart(0x68b40a0, 0xc000194e20, 0x0, 0x2)
/Users/medya/workspace/minikube/cmd/minikube/cmd/start.go:162 +0xaef
github.com/spf13/cobra.(*Command).execute(0x68b40a0, 0xc000194e00, 0x2, 0x2, 0x68b40a0, 0xc000194e00)
/Users/medya/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x68b8f60, 0x0, 0x1, 0xc0006222a0)
/Users/medya/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
/Users/medya/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
k8s.io/minikube/cmd/minikube/cmd.Execute()
/Users/medya/workspace/minikube/cmd/minikube/cmd/root.go:106 +0x747
main.main()
/Users/medya/workspace/minikube/cmd/minikube/main.go:71 +0x143
W0617 14:50:07.128156 10636 out.go:201] error provisioning host: Failed to start host: creating host: create: creating: create kic node: container name "minikube": container status is not running after creation

💣 error provisioning host: Failed to start host: creating host: create: creating: create kic node: container name "minikube": container status is not running after creation

😿 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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 17, 2020
@medyagh medyagh changed the title Sol msg check running add error handling when container exits after creation Jun 17, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 17, 2020
@medyagh medyagh changed the title add error handling when container exits after creation wip: add error handling when container exits after creation Jun 17, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 17, 2020
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 17, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 17, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @medyagh,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.8.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.8.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.11.0 -X k8s.io/minikube/pkg/version.isoVersion=v1.11.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="39935ab0afc28fc7e1b158329203b340010987ae"" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.26.0'
golangci/golangci-lint info found version: 1.26.0 for v1.26.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
pkg/drivers/kic/oci/oci.go:585:30: `revelant` is a misspelling of `relevant` (misspell)
//printPostPortem will print revelant docker/podman infos after a container fails
                             ^
pkg/drivers/kic/oci/oci.go:590:3: printf: Warningf call needs 1 arg but has 2 args (govet)
		glog.Warningf("failed to get container logs for the :%v", name, err)
		^
Makefile:389: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
ok
= boilerplate ===========================================================
ok
Makefile:273: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: 5f96d120-b0da-11ea-b9a3-b9754cbad7e4

@TravisBuddy
Copy link

Travis tests have failed

Hey @medyagh,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.8.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.13.8.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.11.0 -X k8s.io/minikube/pkg/version.isoVersion=v1.11.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="386ff3becd90a6f08d0e2f6136f67b7ccee54e70"" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.26.0'
golangci/golangci-lint info found version: 1.26.0 for v1.26.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
pkg/drivers/kic/oci/oci.go:585:30: `revelant` is a misspelling of `relevant` (misspell)
//printPostPortem will print revelant docker/podman infos after a container fails
                             ^
pkg/drivers/kic/oci/oci.go:590:3: printf: Warningf call needs 1 arg but has 2 args (govet)
		glog.Warningf("failed to get container logs for the :%v", name, err)
		^
Makefile:389: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
ok
= boilerplate ===========================================================
ok
Makefile:273: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: 0a8a6180-b0e2-11ea-b9a3-b9754cbad7e4

@medyagh medyagh changed the title wip: add error handling when container exits after creation add error handling when container exits after start/create Jun 17, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 17, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #8501 into master will decrease coverage by 0.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8501      +/-   ##
==========================================
- Coverage   33.97%   33.87%   -0.10%     
==========================================
  Files         153      154       +1     
  Lines        9869     9897      +28     
==========================================
  Hits         3353     3353              
- Misses       6112     6140      +28     
  Partials      404      404              
Impacted Files Coverage Δ
cmd/minikube/cmd/start.go 13.10% <0.00%> (-0.03%) ⬇️
pkg/minikube/machine/advice.go 0.00% <0.00%> (ø)
pkg/minikube/machine/fix.go 38.06% <0.00%> (-0.25%) ⬇️

pkg/drivers/kic/oci/oci.go Outdated Show resolved Hide resolved
pkg/drivers/kic/kic.go Outdated Show resolved Hide resolved
pkg/drivers/kic/kic.go Show resolved Hide resolved
pkg/drivers/kic/oci/errors.go Outdated Show resolved Hide resolved
return runCmd(exec.Command(ociBin, "logs", "--timestamps", name))
}

//PrintPostPortem will print relevant docker/podman infos after a container fails
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to log instead of print (normally associated to stdout). Perhaps LogContainerStatus?

Copy link
Member Author

@medyagh medyagh Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about LogContainerDebug? since we are doing three things there

pkg/minikube/machine/advice.go Outdated Show resolved Hide resolved
pkg/minikube/machine/advice.go Outdated Show resolved Hide resolved
@medyagh medyagh requested a review from tstromberg June 18, 2020 01:32
@medyagh
Copy link
Member Author

medyagh commented Jun 18, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 18, 2020
@kubernetes kubernetes deleted a comment from minikube-pr-bot Jun 18, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [62.163188821000006 64.429042962 65.338649269]
Average time for minikube: 63.97696035066667

Times for Minikube (PR 8501): [63.271461281 65.25239230300001 64.041630812]
Average time for Minikube (PR 8501): 64.18849479866667

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8501) |
+--------------------------------+-----------+--------------------+
| * minikube v1.11.0 on Debian   |  0.075063 |           0.059145 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.022605 |           0.022543 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.003406 |           0.003738 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.049089 |          40.495608 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.957293 |          21.655546 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.238932 |           1.574965 |
| components...                  |           |                    |
| * Enabled addons:              |  0.555634 |           0.289781 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.071548 |           0.082176 |
| configured to use "minikube"   |           |                    |
|                                |  0.003392 |           0.004994 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [26.175789078000005 27.417279853999997 26.503711100999993]
Average time for minikube: 26.698926677666666

Times for Minikube (PR 8501): [27.803309603000002 26.478580284999996 27.285987896]
Average time for Minikube (PR 8501): 27.189292594666668

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 8501) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.11.0 on Debian           |  0.084514 |           0.071413 |
|                                   9.11 |           |                    |
| * Using the docker driver              |  0.002743 |           0.002390 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.061006 |           0.057355 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.917236 |           7.754207 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.3         |  0.119440 |           0.121959 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 17.242016 |          17.712700 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  1.100850 |           1.398026 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.103865 |           0.002706 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.063479 |           0.063909 |
| configured to use "minikube"           |           |                    |
|                                        |  0.003778 |           0.004629 |
+----------------------------------------+-----------+--------------------+

@medyagh medyagh changed the title add error handling when container exits after start/create docker/podman: add error handling when container exits after start/create Jun 18, 2020
@medyagh medyagh changed the title docker/podman: add error handling when container exits after start/create docker/podman: add solution message when container exits after start/create Jun 18, 2020
@medyagh medyagh merged commit d131078 into kubernetes:master Jun 18, 2020
@medyagh medyagh deleted the sol_msg_check_running branch March 2, 2021 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants