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

Split PROVIDER_DOCKER_ERROR into more specific reason codes #10212

Merged
merged 3 commits into from
Jan 22, 2021

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented Jan 22, 2021

Fixes #9908

Addresses an issue raised as a priority by some of our embedded users, like gcloud & Cloud Code. For both providing more useful feedback to the user, and collecting statistics about why minikube fails in user environments.

Split one broad code into 12 codes. I suspect many of these will be rarer than hens teeth, but I've sorted by intuitional likelihood:

  • PROVIDER_DOCKER_WINDOWS_CONTAINERS
  • PROVIDER_DOCKER_DEADLINE_EXCEEDED
  • PROVIDER_DOCKER_INFO_FAILED
  • PROVIDER_DOCKER_INFO_ERROR
  • PROVIDER_DOCKER_VERSION_EXIT_%d
  • PROVIDER_DOCKER_NEWGRP
  • PROVIDER_DOCKER_NOT_RUNNING
  • PROVIDER_DOCKER_PIPE_NOT_FOUND
  • PROVIDER_DOCKER_CANNOT_CONNECT
  • PROVIDER_DOCKER_REFUSED
  • PROVIDER_DOCKER_ERROR

Here are some examples I forced:

docker version with exit code 9

😄  minikube v1.16.0 on Darwin 11.1 (arm64)
✨  Using the docker driver based on user configuration

💣  Exiting due to PROVIDER_DOCKER_VERSION_EXIT_9: "docker version --format -" exit status 9: 
📘  Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/

docker not running

😄  minikube v1.16.0 on Darwin 11.1 (arm64)
✨  Using the docker driver based on user configuration

💣  Exiting due to PROVIDER_DOCKER_NOT_RUNNING: docker info error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
💡  Suggestion: Start the Docker service
📘  Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/

@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 Jan 22, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2021
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

thanks for making this much better !

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, tstromberg

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

@medyagh medyagh merged commit bc27322 into kubernetes:master Jan 22, 2021
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide more descriptive error codes for PROVIDER_DOCKER_ERROR
3 participants