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

Select WSL VM IP when performing mounting #12319

Merged
merged 3 commits into from
Aug 24, 2021
Merged

Conversation

andriyDev
Copy link
Contributor

@andriyDev andriyDev commented Aug 20, 2021

fixes #12304.

WSL Docker integration makes any WSL minikube instances actually on the main host. This means the cluster HostIP refers to the main Windows instance, not WSL. By getting the WSL IP, the mount correctly accesses WSL and the mounting server.

WSL IP addr:

$ ip addr
...
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:19:09:0e brd ff:ff:ff:ff:ff:ff
    inet 172.31.95.230/20 brd 172.31.95.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fe19:90e/64 scope link
       valid_lft forever preferred_lft forever

Before:

$ out/minikube mount deploy/addons:/addons
📁  Mounting host path deploy/addons into VM as /addons ...
    ▪ Mount type:
    ▪ User ID:      docker
    ▪ Group ID:     docker
    ▪ Version:      9p2000.L
    ▪ Message Size: 262144
    ▪ Permissions:  755 (-rwxr-xr-x)
    ▪ Options:      map[]
    ▪ Bind Address: 192.168.49.1:42917
🚀  Userspace file server: ufs starting
🛑  Userspace file server is shutdown

❌  Exiting due to GUEST_MOUNT: mount with cmd /bin/bash -c "sudo mount -t 9p -o dfltgid=$(grep ^docker: /etc/group | cut -d: -f3),dfltuid=$(id -u docker),msize=262144,port=42917,trans=tcp,version=9p2000.L 192.168.49.1 /addons" : /bin/bash -c "sudo mount -t 9p -o dfltgid=$(grep ^docker: /etc/group | cut -d: -f3),dfltuid=$(id -u docker),msize=262144,port=42917,trans=tcp,version=9p2000.L 192.168.49.1 /addons": Process exited with status 32
stdout:

stderr:
mount: /addons: mount(2) system call failed: Connection refused.

After:

$ out/minikube mount deploy/addons:/addons
📁  Mounting host path deploy/addons into VM as /addons ...
    ▪ Mount type:
    ▪ User ID:      docker
    ▪ Group ID:     docker
    ▪ Version:      9p2000.L
    ▪ Message Size: 262144
    ▪ Permissions:  755 (-rwxr-xr-x)
    ▪ Options:      map[]
    ▪ Bind Address: 172.31.95.230:33117
🚀  Userspace file server: ufs starting
✅  Successfully mounted deploy/addons to /addons

📌  NOTE: This process must stay alive for the mount to be accessible ...

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 20, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andriyDev
To complete the pull request process, please assign medyagh after the PR has been reviewed.
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

@medyagh
Copy link
Member

medyagh commented Aug 20, 2021

very nice finding ! @andriyDev would u please take a look at the lint

@medyagh medyagh merged commit 01155b1 into kubernetes:master Aug 24, 2021
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. 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.

Unable to use external files for jobs through mounting
3 participants