minikube: minikube using hyperkit fails to restart on macOS due to stale PID-file after a reboot/shutdown

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Please provide the following details:

Environment: macOS Sierra 10.12.6

Minikube version (use minikube version): v0.25.0

  • OS (e.g. from /etc/os-release): macOS Sierra 10.12.6
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): hyperkit
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.25.1.iso
  • Install tools: N/A (homebrew)
  • Others: The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
minikube version
echo "";
echo "OS:";
cat /etc/os-release
echo "";
echo "VM driver": 
grep DriverName ~/.minikube/machines/minikube/config.json
echo "";
echo "ISO version";
grep -i ISO ~/.minikube/machines/minikube/config.json

What happened: Run minikube -p proj start --log_dir /Users/XXX/.minikube/logs --loglevel 0 --vm-driver=hyperkit --memory 6144. Never completes (waited 45 minutes). Output is

Starting local Kubernetes v1.9.0 cluster...
Starting VM...

What you expected to happen: return with a shell prompt and have minikube -p proj status return Running instead of Stopped

How to reproduce it (as minimally and precisely as possible): Reboot mac while minikube is running, then do the start command above.

Output of minikube logs (if applicable): does not return anything, also hangs. Log file (~/.minikube/logs/minikube.[hostname].[user].log.INFO.[timestamp]) contains:

I0221 09:34:16.706330   48704 cluster.go:74] Skipping create...Using existing machine configuration
I0221 09:34:16.706963   48704 cache_images.go:79] Successfully cached all images.
I0221 09:34:16.963453   48704 cluster.go:83] Machine state:  Stopped

Anything else do we need to know:

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 21 (11 by maintainers)

Most upvoted comments

Still an issue!

I’m seeing the same thing. Restarting mac while minikube is running is exactly the steps I used to reproduce. If I “minikube stop” before the restart, everything is fine. There seems to be no way to recover other than blasting away the minikube environment.

Just like I added this to the xhyve driver, it should check on startup for the existence of this file and verify if the current process matches the name of the PID found. This is what caused issues for xhyve, as the PID was an actual running process, just not the same/related.

@ssdowd I figured out the solution to this in my case. I was behind a firewall, just disabled it and it worked!

@aashish-chaubey I gave up on minikube/hyperkit and switched to docker desktop for mac.

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.