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

file from host is randomly mounted as empty file #7689

Open
vvavrychuk opened this issue Oct 28, 2024 · 0 comments
Open

file from host is randomly mounted as empty file #7689

vvavrychuk opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels
area/volume Access to host volumes from inside the VM or containers kind/bug Something isn't working platform/windows runtime/moby

Comments

@vvavrychuk
Copy link

Actual Behavior

Run container

docker run --mount type=bind,source=/etc/group,destination=/etc/group,readonly ...

Observe that in container /etc/group is empty. From Docker inspect observe

{
    "Type": "bind",
    "Source": "/mnt/wsl/rancher-desktop/run/docker-mounts/91686c29-1c1d-42f1-8c14-9f58a64ba6ca",
    "Target": "/etc/group",
    "ReadOnly": true
}

Check that binded file inode is completely different then needed

# stat /mnt/wsl/rancher-desktop/run/docker-mounts/91686c29-1c1d-42f1-8c14-9f58a64ba6ca
  File: /mnt/wsl/rancher-desktop/run/docker-mounts/91686c29-1c1d-42f1-8c14-9f58a64ba6ca
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 0,31    Inode: 138         Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-10-27 18:25:06.650820391 +0000
Modify: 2024-10-27 18:23:44.950617801 +0000
Change: 2024-10-27 18:23:44.950617801 +0000
 Birth: -

# stat /etc/group
  File: /etc/group
  Size: 795             Blocks: 8          IO Block: 4096   regular file
Device: 8,32    Inode: 2263281     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-10-27 01:11:53.073146035 +0000
Modify: 2024-10-21 17:29:46.191704563 +0000
Change: 2024-10-21 17:29:46.191704563 +0000
 Birth: 2024-10-21 17:29:46.191704563 +0000

File seems to be completely unrelated

> sudo debugfs -R "ncheck 138" /dev/sdc
debugfs 1.47.0 (5-Feb-2023)
Inode   Pathname
138     /etc/alternatives/vtrgb

Steps to Reproduce

Reproduced 50/50 as part of bigger command with custom image I could not share.

Result

/etc/group is empty

Expected Behavior

/etc/group is properly mount from host

Additional Information

No response

Rancher Desktop Version

1.16.0

Rancher Desktop K8s Version

1.16.0

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 11 23H2 (OS Build 22631.4317)

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

CrowdStrike

@vvavrychuk vvavrychuk added the kind/bug Something isn't working label Oct 28, 2024
@jandubois jandubois added platform/windows runtime/moby area/volume Access to host volumes from inside the VM or containers labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/volume Access to host volumes from inside the VM or containers kind/bug Something isn't working platform/windows runtime/moby
Projects
None yet
Development

No branches or pull requests

3 participants