Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1030513

Summary: Multiple --mount commands do not work in virt-sandbox-service
Product: Red Hat Enterprise Linux 7 Reporter: Daniel Walsh <dwalsh>
Component: libvirt-sandboxAssignee: Daniel Berrangé <berrange>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: 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:
Embargoed:
Attachments:
Description Flags
Patch fixes multiple mount points. none

Description Daniel Walsh 2013-11-14 15:33:23 UTC
virt-sandbox-service create --copy -N dhcp,mac='52:54:00:ec:b6:c2',source=virbr1 -m host-bind:/etc/crontab=/containers/vm2/etc/crontab -m host-bind:/etc/shadow=/containers/vm2/etc/shadow --unitfile crond.service $name


Only the /etc/shadow line gets added not the /etc/crontab.

Comment 2 Daniel Walsh 2013-11-14 15:43:46 UTC
Created attachment 824012 [details]
Patch fixes multiple mount points.

Comment 3 Daniel Berrangé 2013-11-15 17:20:12 UTC
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>

Comment 5 Alex Jia 2013-11-19 03:50:07 UTC
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.

Comment 7 Ludek Smid 2014-06-13 09:33:57 UTC
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.