| Summary: | Multiple --mount commands do not work in virt-sandbox-service | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Daniel Walsh <dwalsh> | ||||
| Component: | libvirt-sandbox | Assignee: | Daniel Berrangé <berrange> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.0 | CC: | ajia, jdenemar, mjenner | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libvirt-sandbox-0.5.0-6.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-06-13 09:33:57 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Daniel Walsh
2013-11-14 15:33:23 UTC
Created attachment 824012 [details]
Patch fixes multiple mount points.
Applied upstream as
commit 6f145fe4338f0ea6e67a46e6c7c85456e3c0b08e
Author: Dan Walsh <dwalsh>
Date: Fri Nov 15 17:18:59 2013 +0000
Handle the case of multiple mounts with virt-sandbox-service.
Currently if you execute
virt-sandbox-service create --mount=... --mount=...
Only the last mount gets added via the argparser, since the
arg is parsed as a scalar, not a list
Signed-off-by: Daniel P. Berrange <berrange>
I can reproduce this on libvirt-sandbox-0.5.0-5.el7.x86_64 with libvirt-1.1.1-12.el7.x86_64 and kernel-3.10.0-0.rc7.64.el7.x86_64.
To fake /containers/vm2/etc/{crontab,shadow}.
# mkdir -p /containers/vm2/etc/
# touch /containers/vm2/etc/{crontab,shadow}
To create multi-mount container and start it
# virt-sandbox-service create --copy -N dhcp,mac='52:54:00:ec:b6:c2',source=default -m host-bind:/etc/crontab=/containers/vm2/etc/crontab -m host-bind:/etc/shadow=/containers/vm2/etc/shadow --unitfile crond.service multi-mount
Created sandbox container dir /var/lib/libvirt/filesystems/multi-mount
Created unit file /etc/systemd/system/multi-mount_sandbox.service
Created sandbox config /etc/libvirt-sandbox/services/multi-mount/config/sandbox.cfg
# virsh -c lxc:/// start multi-mount
Domain multi-mount started
Log into container and check mounting file
[root@localhost ~]# virt-sandbox-service connect multi-mount
sh-4.2# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/rhel-00 39240 14864 22361 40% /
devfs 1 0 1 0% /dev
10.66.90.121:/vol/S3/libvirtmanual/libvirt-pkg/all-pkgs-pool/ 819200 750905 68296 92% /mnt
tmpfs 1 0 1 0% /sys/fs/cgroup
tmpfs 10 1 10 2% /run
tmpfs 100 0 100 0% /tmp
tmpfs 100 0 100 0% /dev/shm
/dev/mapper/rhel-00 39240 14864 22361 40% /etc/shadow
Notes, only the /etc/shadow line gets added not the /etc/crontab.
Verify this on libvirt-sandbox-0.5.0-6.el7.
[root@localhost ~]# virt-sandbox-service connect multi-mount
sh-4.2# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/rhel-00 39240 14862 22363 40% /
devfs 1 0 1 0% /dev
10.66.90.121:/vol/S3/libvirtmanual/libvirt-pkg/all-pkgs-pool/ 819200 750905 68296 92% /mnt
tmpfs 1 0 1 0% /sys/fs/cgroup
tmpfs 10 1 10 2% /run
tmpfs 100 0 100 0% /tmp
tmpfs 100 0 100 0% /dev/shm
/dev/mapper/rhel-00 39240 14862 22363 40% /etc/crontab
/dev/mapper/rhel-00 39240 14862 22363 40% /etc/shadow
Notes, if downgrade libvirt-sandbox from -6 to -5, users need to restart libvirt daemon.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |