Closed dlorenc closed 7 years ago
@dlorenc SGTM, also maybe I understand why it happened. Sorry, it's my mistake. I'll check it. Thanks.
Hmm, we might need to keep this in both places actually. Trying to figure out the way the API works...
Hm, I have not seen the whole code yet, but that is possibility. libmachine sometimes require redundant, such as implemented root binary check etc.
Yeah it looks like we do need this in both places. Refactored a bit. Sorry for the confusion.
@dlorenc np! I'll try to check and test it.
@dlorenc BTW, There are pull requests that support multiple NFS shares. WDTY?
Seems reasonable, I'm not sure of the use-case though. Maybe some of that could be better handled with modifications of bootlocal.sh inside the iso? https://github.com/boot2docker/boot2docker/blob/master/doc/FAQ.md#local-customisation-with-persistent-partition
@dlorenc Yeah maybe needs to fix this line, https://github.com/zchee/docker-machine-driver-xhyve/blob/46a94c2450c532fa766698ae8906cdc69933134a/xhyve/xhyve.go#L933-L937 but that pull request seems to already fix it. OK, I'll also check that pull request together.
@dlorenc Ah, sorry, Are you said means had been changed boot2docker bootlocal.sh specification?
@dlorenc Anyway, this pull request is LGTM. The failed CI will fix. Merged.
@dlorenc Thanks!!
@zchee @dlorenc Thanks for getting this fixed so quickly. Can we get a new release so I can use this?
I just created a pull request that undoes all this work. Then I saw this issue.
Specifically this commit in the PR reverts part of the work that was done in this thread.
Here's the commit message:
Make sure both Virtio9p shared folders and NFS shared folders can be used at the same time.
In this commit I removed the
d.setupMount()
from theStart()
function:Start()
simply starts the docker-machine and isn't supposed to do any other work. For example, you can not add more CPUs, more RAM, or more Disks with thedocker-machine start
command. Just like CPU, RAM, etc, Shared Folders can not be added after the fact withdocker-machine start
and as such, thed.setupMounts()
shouldn't run.I, however, changed the
Create()
function so that it returns an error, and thus prevents the docker-machine from being created, when thed.setupMounts()
fails.The other changes address the bug where you couldn't have both Virtio9p and NFS shared folders. The bug was that both the code setting up Virtio9p shares and the NFS shares would overwrite the
bootlocal.sh
script.
As I explain in the commit message, it seems to me that Start()
shouldn't call setupMounts()
. Specifically, all setupMounts()
does is fill the bootlocal.sh
script with mount
commands.
Once bootlocal.sh
has been created (at the docker-machine create
time), there's no need to ever re-create it (at docker-machine start
time).
This will re-mount on a re-start.
This should fix https://github.com/kubernetes/minikube/issues/1133