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

Disable default hypervisors mounts + fix 9P path on Darwin #6806

Closed
wants to merge 3 commits into from

Conversation

starbassma
Copy link

Hello,

this PR :

  • Fix default 9P mount path on Darwin ($HOME instead of /Users, same path on all OS)
  • Add the default 9P mount path for Xhyve Hypervisor (doc)
  • Disable default mounts provided by the hypervisors (lax behavior, can lead to data loss on the host machine)

check
fixes #6788

Regards,

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 26, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @starbassma!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @starbassma. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 26, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: starbassma
To complete the pull request process, please assign medyagh
You can assign the PR to them by writing /assign @medyagh in a comment when ready.

The full list of commands accepted by this bot can be found 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

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@starbassma starbassma changed the title Disbale default hypervisors mounts + fix 9P path on Darwin Disable default hypervisors mounts + fix 9P path on Darwin Feb 26, 2020
@medyagh
Copy link
Member

medyagh commented Feb 26, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 26, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@starbassma
Copy link
Author

mkcmp

seems unrelated to the modifications

@priyawadhwa
Copy link

@starbassma yah you can ignore mkcmp errors here

@@ -190,7 +190,7 @@ func initKubernetesFlags() {
// initDriverFlags inits the commandline flags for vm drivers
func initDriverFlags() {
startCmd.Flags().String("vm-driver", "", fmt.Sprintf("Driver is one of: %v (defaults to auto-detect)", driver.DisplaySupportedDrivers()))
startCmd.Flags().Bool(disableDriverMounts, false, "Disables the filesystem mounts provided by the hypervisors")
startCmd.Flags().Bool(disableDriverMounts, true, "Disables the filesystem mounts provided by the hypervisors")
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

No, it won't, certificates are copied through the api

"k8s.io/client-go/util/homedir"
)

// DefaultMountDir is the default mount directory for Darwin
Copy link
Member

Choose a reason for hiding this comment

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

remove comment "For Darwin "

Copy link
Author

Choose a reason for hiding this comment

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

done

@@ -190,7 +190,7 @@ func initKubernetesFlags() {
// initDriverFlags inits the commandline flags for vm drivers
func initDriverFlags() {
startCmd.Flags().String("vm-driver", "", fmt.Sprintf("Driver is one of: %v (defaults to auto-detect)", driver.DisplaySupportedDrivers()))
startCmd.Flags().Bool(disableDriverMounts, false, "Disables the filesystem mounts provided by the hypervisors")
startCmd.Flags().Bool(disableDriverMounts, true, "Disables the filesystem mounts provided by the hypervisors")
Copy link
Member

Choose a reason for hiding this comment

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

double negative sin the flags are tricky,

Copy link
Author

Choose a reason for hiding this comment

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

I agree, should we consider renaming this flag ?

Copy link
Member

Choose a reason for hiding this comment

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

yes I would say lets rename this flag !

@codecov-io
Copy link

Codecov Report

Merging #6806 into master will decrease coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #6806     +/-   ##
========================================
- Coverage    38.5%   38.3%   -0.2%     
========================================
  Files         142     142             
  Lines        8695    8740     +45     
========================================
  Hits         3348    3348             
- Misses       4927    4971     +44     
- Partials      420     421      +1
Impacted Files Coverage Δ
cmd/minikube/cmd/start.go 32.74% <100%> (ø) ⬆️
pkg/minikube/machine/delete.go 29.72% <0%> (-16.11%) ⬇️
cmd/minikube/cmd/service.go 9.85% <0%> (-5.7%) ⬇️
pkg/minikube/machine/start.go 53.84% <0%> (-1.16%) ⬇️
pkg/addons/addons.go 45.12% <0%> (-0.56%) ⬇️
cmd/minikube/cmd/delete.go 24.88% <0%> (ø) ⬆️
cmd/minikube/cmd/config/profile.go 0% <0%> (ø) ⬆️

@minikube-pr-bot
Copy link

All Times minikube: [ 92.772734 92.923790 92.800023]
All Times Minikube (PR 6806): [ 95.314334 93.190668 92.015382]

Average minikube: 92.832182
Average Minikube (PR 6806): 93.506794

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6806) |
+----------------------+-----------+--------------------+
| minikube v           |  0.259006 |           0.216577 |
| Creating kvm2        | 20.600817 |          20.147557 |
| Preparing Kubernetes | 49.354341 |          49.406815 |
| Pulling images       |           |                    |
| Launching Kubernetes | 21.284509 |          21.952370 |
| Waiting for cluster  |  0.069547 |           0.397761 |
+----------------------+-----------+--------------------+

@@ -71,10 +71,17 @@ Some hypervisors, have built-in host folder sharing. Driver mounts are reliable
| VirtualBox | macOS | /Users | /Users |
| VirtualBox | Windows | C://Users | /c/Users |
| VMware Fusion | macOS | /Users | /Users |
| Xhyve | macOS | /Users | /Users |
Copy link
Collaborator

Choose a reason for hiding this comment

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

The xhyve driver is not supported anymore, see 914713f

@k8s-ci-robot
Copy link
Contributor

@starbassma: PR needs rebase.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Apr 9, 2020

I agree with this PR - but will close until it can be rebased.

Please re-open it when it should be reviewed again.

@tstromberg tstromberg closed this Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dangerous default behaviour (mounting home directory inside minikube VM)
9 participants