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

Auto select network on QEMU #15266

Merged
merged 3 commits into from
Nov 4, 2022
Merged

Conversation

spowelljr
Copy link
Member

@spowelljr spowelljr commented Nov 1, 2022

  • Added validation to prevent passing socket_vmnet flag when not on macOS
  • Added validation to prevent passing invalid flags
  • Added network auto selection
    • If not on macOS, always use user
    • Check for socket_vmnet, if present on system use it
    • Else, use user
  • If user passed --network socket_vmnet
    • Check if present on system, if not error and give instructions
  • Removed message Using qemu with 'socket_vmnet' network is experimental

Starting on Linux with socket_vmnet:

$ minikube start --driver qemu --network socket_vmnet
😄  minikube v1.27.1 on Debian 11.5
✨  Using the qemu2 (experimental) driver based on user configuration

❌  Exiting due to MK_USAGE: The socket_vmnet network is only supported on macOS

Starting on macOS with no flag and socket_vmnet not installed:

$ minikube start --driver qemu
😄  minikube v1.27.1 on Darwin 12.6.1 (arm64)
✨  Using the qemu2 (experimental) driver based on user configuration
🌐  Automatically selected the user network
❗  You are using the QEMU driver without a dedicated network, which doesn't support `minikube service` & `minikube tunnel` commands.
To try the experimental dedicated network see: https://minikube.sigs.k8s.io/docs/drivers/qemu/#networking
...

Starting on macOS with invalid flag:

$ minikube start --driver qemu --network invalid
😄  minikube v1.27.1 on Darwin 12.6.1 (arm64)
✨  Using the qemu2 (experimental) driver based on user configuration

❌  Exiting due to MK_USAGE: --network with QEMU must be 'user' or 'socket_vmnet'

Starting on macOS with socket_vmnet flag and socket_vmnet not installed:

$ minikube start --driver qemu --network socket_vmnet
😄  minikube v1.27.1 on Darwin 12.6.1 (arm64)
✨  Using the qemu2 (experimental) driver based on user configuration

🙈  Exiting due to NOT_FOUND_SOCKET_VMNET: 


💡  Suggestion: 

    socket_vmnet was not found on the system, resolve by:
    
    Option 1) Installing socket_vmnet:
    
    https://minikube.sigs.k8s.io/docs/drivers/qemu/#networking
    
    Option 2) Using the user network:
    
    minikube start --driver qemu --network user

Starting on macOS with no flag and socket_vmnet installed:

$ minikube start --driver qemu
😄  minikube v1.27.1 on Darwin 12.6.1 (arm64)
✨  Using the qemu2 (experimental) driver based on user configuration
🌐  Automatically selected the socket_vmnet network

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 1, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 1, 2022
@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. labels Nov 1, 2022
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.

in the website lets mention, if doesnt work, they might wanna make uninstall and then restart and then install again

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@spowelljr
Copy link
Member Author

in the website lets mention, if doesnt work, they might wanna make uninstall and then restart and then install again

Screen Shot 2022-11-01 at 3 05 07 PM

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/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.

3 participants