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

Hot plugging filesystem volume into VM with relative path causes it to be mounted under /run/lxd_agent/ #13406

Open
tomponline opened this issue Apr 30, 2024 · 0 comments
Assignees
Labels
Bug Confirmed to be a bug
Milestone

Comments

@tomponline
Copy link
Member

tomponline commented Apr 30, 2024

When hot-plugging a filesystem volume into a VM the behaviour of where that volume is mounted inside the guest when using a relative path setting differs from the behaviour of hot-plugging a filesystem volume into a container.

lxc storage volume create default foo --type=filesystem
lxc launch ubuntu:24.04 c1
lxc launch ubuntu:24.04 v1 --vm

# Hot-plugging it into a container with path=mnt causes it to be mounted at /mnt as expected.
lxc config device add c1 d0 disk source=foo pool=default path=mnt
lxc exec c1 -- mount | grep mnt
/dev/mapper/vgubuntu-root on /mnt type ext4 (rw,relatime,errors=remount-ro)

# Hot-plugging it into a VM with path=mnt causes it to be mounted at /run/lxd_agent/mnt (this is wrong, it should be /mnt).
lxc config device add v1 d0 disk source=foo pool=default path=mnt
lxc exec v1 -- mount | grep mnt
lxd_d0 on /run/lxd_agent/mnt type virtiofs (rw,relatime)

Note: This does not occur when the VM instance has the disk added before it is started, it only occurs when hot-plugging the disk.

We should ensure the agent uses the same behaviour during hot-plugging as it does at boot time.

@tomponline tomponline added the Bug Confirmed to be a bug label Apr 30, 2024
@tomponline tomponline added this to the lxd-6.1 milestone Apr 30, 2024
@gabrielmougard gabrielmougard self-assigned this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

No branches or pull requests

2 participants