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

start should support --mount-string argument #3327

Closed
trentza opened this issue Nov 12, 2018 · 24 comments
Closed

start should support --mount-string argument #3327

trentza opened this issue Nov 12, 2018 · 24 comments
Assignees
Labels
area/mount good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2

Comments

@trentza
Copy link

trentza commented Nov 12, 2018

FEATURE REQUEST

Environment:

Minikube version: v0.30.0

  • OS: MacOS Darwin Kernel Version 18.2.0
  • VM Driver: hyperkit
  • ISO version: minikube-v0.30.0.iso

We have a well scripted process for spinning up our stack, currently it uses NFS shares.
We are looking to refactor this to use the minikube start --mount --mount-string "/blah:/blah"

We are struggling to get write access to the mount-point via this method.

We have tested with minikube mount with the --9p-version=9p2000.L and this gives us write access.

During minikube start we would like to make use of the --9p-version flag as per the minikube mount.

seems some similar discussion was taking place on this issue: #2290

@balopat balopat added kind/feature Categorizes issue or PR as related to a new feature. area/mount labels Nov 14, 2018
@narg95
Copy link

narg95 commented Nov 26, 2018

Hi,
Same here, any answer or workaround to get --9p-version=9p2000.L on minikube start?

@tstromberg tstromberg changed the title Extra mount flags for 'minikube start' start should support --mount-string argument Jan 23, 2019
@tstromberg tstromberg added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Jan 23, 2019
@shaneknapp
Copy link

yes pls!

@GrigorievNick
Copy link

In version 0.35 is see log
- Creating mount C:\\Users\\myhome\\IdeaProjects\\bigkube\\target\\scala-2.11:/data/jars ...
but when i use minikube ssh;ls /data/jars i get no such folder.
thats same issue? or i do something wrong

@shaneknapp
Copy link

bump! this would be extremely useful, especially for the ephemeral minikube clusters i have to spin up for the apache spark k8s integration tests. the only way i can get the PV to mount correctly is with a separate minikube mount command after the cluster starts, and do some bash gymnastics to keep track of the PID so i can ensure that the mount is gone when the integration tests are done.

our build script looks kinda like this:

minikube --vm-driver=kvm2 start --memory 6000 --cpus 8
minikube mount ${WORKSPACE}/tmp:/tmp/spark-k8s-integration-tests --9p-version=9p2000.L --gid=0 --uid=185 &
MOUNT_PID=$(jobs -rp)

...tests run...

kill -9 $MOUNT_PID
minikube stop

being able to pass in the additional mount args (gid, 9p-version, etc) directly through the minikube start call would be great, awesome, superb and much, much less fragile than doing things this way.

@tstromberg
Copy link
Contributor

@shaneknapp - Agreed. I'd happily review any PR which makes the above happen.

@tstromberg tstromberg added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Mar 26, 2019
@shaneknapp
Copy link

@shaneknapp - Agreed. I'd happily review any PR which makes the above happen.

I SEE WHAT YOU DID THERE!

@tstromberg tstromberg added the r/2019q2 Issue was last reviewed 2019q2 label May 22, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 20, 2019
@shaneknapp
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 20, 2019
@tstromberg tstromberg added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Sep 20, 2019
@nanikjava
Copy link
Contributor

@tstromberg interested to tackle this issue. Would you be able to point me in the right direction to start.

So far I can see that the mount command code is inside mount.go but at high level what does the new code required to do ?

Thanks

@nanikjava
Copy link
Contributor

/assign

@no3am
Copy link

no3am commented Oct 23, 2019

I'll just add our use case for traction I suppose as we need this fix urgently.
I'm running postgres on minikube, I don't want a fresh entity, I've took a ready data from production and wanna mount it to the postgres pod running on minikube - I'm able to do that !

Because the data is stored on my Mac and mounted into the pod, it has root:root on the data folder which is making it impossible for me do anything with it after mounting it, of course the postgres can't load it properly as well, I'd need to mount the folder with 999:999 or something like that.

Seems if the above issue is fixed, my issue will be fixed as well, in the meanwhile I'm looking for ways to bypass it as we're blocked :(

@sharifelgamal
Copy link
Collaborator

@nanikjava still interested in working on this?

@nanikjava
Copy link
Contributor

@nanikjava still interested in working on this?

Going to unassign myself for now, as trying to work on another ticket.

@nanikjava nanikjava removed their assignment Dec 18, 2019
@Divya063
Copy link

/assign

@Divya063
Copy link

I started working on this issue, but the folder is not getting mounted after running command - minikube start --mount --mount-string "~/test:/test" #2481 (comment)

@zamazan4ik
Copy link

Any updates?

@prezha
Copy link
Contributor

prezha commented Feb 18, 2021

@Divya063, @zamazan4ik i cannot reproduce the issue on the latest version (1.17.1 atm) with docker - ie, this worked for me:

minikube start --mount --mount-string ~/tmp:/tmp/app

@prezha
Copy link
Contributor

prezha commented Feb 18, 2021

/close

@k8s-ci-robot
Copy link
Contributor

@prezha: You can't close an active issue/PR unless you authored it or you are a collaborator.

In response to this:

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

@lacarvalho91
Copy link

--mount-string seems to work to the point that you can mount a directory, but it still doesn't seem to support passing extra mount flags e.g. --uid

@spowelljr
Copy link
Member

@lacarvalho91 you are correct that we don't support passing --uid on start, this is something that can be added to the start flags. However, currently you can use minikube mount --uid on an already started minikube cluster.

@lacarvalho91
Copy link

@spowelljr yeah I'm doing that now, would be awesome to be able to do it on start though!

@shaneknapp
Copy link

shaneknapp commented Oct 27, 2021 via email

@spowelljr
Copy link
Member

I created an issue to track this request, I might have time to implement this next month and be included with minikube v1.25 release.

#12802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mount good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2
Projects
None yet
Development

No branches or pull requests