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

mount: unmount on sigint/sigterm, add --options and --mode, improve UI #3855

Merged
merged 9 commits into from
Mar 21, 2019

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented Mar 11, 2019

A refactoring of the mount command to make it suck less, inspired by @jlaswell on Slack:

  • If Ctrl-C or SIGTERM is received, unmount the target volume
  • Add --options flag to allow arbitrary mount options to be passed
  • Add --mode flag to set the file mode of the target mount
  • Improve mount UI presentation and help strings

Example command:

minikube mount --mode 0777 --9p-version 9p2000 --uid 72 --gid 82 --options cache =fscache,nodevmap --msize=8192 /tmp/700:/tmp/700

Example output:

📁  Mounting host path /tmp/700 into VM as /tmp/700 ...
💾  Mount options:
    ▪ Type:     9p
    ▪ UID:      72
    ▪ GID:      82
    ▪ Version:  9p2000
    ▪ MSize:    8192
    ▪ Mode:     777 (-rwxrwxrwx)
    ▪ Options:  map[cache:fscache nodevmap:]
🚀  Userspace file server: ufs starting
✅  Successfully mounted /tmp/700 to /tmp/700

📌  NOTE: This process must stay alive for the mount to be accessible ...
^C🔥  Unmounting /tmp/700 ...
💣  Exiting due to interrupt signal

Closes #3853

@k8s-ci-robot k8s-ci-robot added 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. labels Mar 11, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2019
Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

just a small nit

cmd/minikube/cmd/mount.go Outdated Show resolved Hide resolved
@tstromberg tstromberg merged commit 4b0bafb into kubernetes:master Mar 21, 2019
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