Bug 1035403 - libvirt does not mount multiple bind mounts if one target begins with the other target
Summary: libvirt does not mount multiple bind mounts if one target begins with the oth...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-27 16:40 UTC by Daniel Berrangé
Modified: 2014-06-18 01:00 UTC (History)
10 users (show)

Fixed In Version: libvirt-1.1.1-14.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1033278
Environment:
Last Closed: 2014-06-13 13:25:27 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Daniel Berrangé 2013-11-27 16:40:28 UTC
+++ This bug was initially created as a clone of Bug #1033278 +++

We are trying to setup a virt-sandbox-service where we are mounting over /etc/aliases and /etc/aliases.db

When we setup the container, /etc/aliases gets mounted but /etc/aliases.db does not.

I experimented with /etc/dan and /etc/dan_long and saw the same behaviour, once I changed to use /etc/dan1 and /etc/dan_long both containers worked.  

virsh edit

shows the correct xml.

Here is the command we were using to set this up.

virt-sandbox-service create --copy -N dhcp,mac='52:54:00:ec:b6:c4',source=virb\
r1 -m host-bind:/etc/aliases.db=/containers/$name/etc/aliases.db -m host-bind:/\
etc/aliases=/containers/$name/etc/aliases -m host-bind:/etc/resolv.conf=/contai\
ners/$name/etc/resolv.conf --unitfile postfix.service -p /var/lib/libvirt/files\
ystems $name

--- Additional comment from Daniel Berrange on 2013-11-27 16:39:45 GMT ---

Fix posted upstream

https://www.redhat.com/archives/libvir-list/2013-November/msg01257.html

Comment 4 Hao Liu 2013-12-09 14:37:09 UTC
This bug is VERIFIED.

Verification Steps:

1. Make the source to be mounted on host.
# mkdir -p /containers/lxc-vm/etc/                  
# echo "I'm test!" > /containers/lxc-vm/etc/test     
# echo "I'm test.new!" > /containers/lxc-vm/etc/test.new

2. Create and start VM with source files mounted.
# virt-sandbox-service create --copy -m host-bind:/home/test.new=/containers/lxc-vm/etc/test.new -m host-bind:/home/test=/containers/lxc-vm/etc/test --unitfile postfix.service -p /var/lib/libvirt/filesystems lxc-vm
# virsh -c lxc:/// start lxc-vm

3. Check files.
# virt-sandbox-service execute lxc-vm ls /home/
test
test.new
# virt-sandbox-service execute lxc-vm cat /home/test
I'm test!
# virt-sandbox-service execute lxc-vm cat /home/test.new
On libvirt-1.1.1-13:
<empty line>
On libvirt-1.1.1-14:
I'm test.new!
# virt-sandbox-service execute lxc-vm mount | grep test
On libvirt-1.1.1-13:
/dev/mapper/rhel-root on /home/test type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
On libvirt-1.1.1-14:
/dev/mapper/rhel-root on /home/test.new type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/rhel-root on /home/test type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

4. Clean up.
# virsh -c lxc:/// destroy lxc-vm
# virt-sandbox-service delete lxc-vm
# rm -rf /containers/

So this fix if verified.

Comment 5 Ludek Smid 2014-06-13 13:25:27 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.


Note You need to log in before you can comment on or make changes to this bug.