Bug 1530451 - Failed to start guest when duplicate mount point existing in the /dev
Summary: Failed to start guest when duplicate mount point existing in the /dev
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: yafu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-03 05:20 UTC by yafu
Modified: 2018-10-30 09:52 UTC (History)
5 users (show)

Fixed In Version: libvirt-4.3.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:52:20 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 None None None 2018-10-30 09:52:59 UTC

Description yafu 2018-01-03 05:20:31 UTC
Description of problem:
Failed to start guest when duplicate mount point existing in the /dev.

Version-Release number of selected component (if applicable):
libvirt-3.9.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.#mount --bind /dev/log /dev/log

2.#mount --bind /dev/log /dev/log

3.#mount | grep log
devtmpfs on /dev/log type devtmpfs (rw,nosuid,seclabel,size=5899976k,nr_inodes=1474994,mode=755)
devtmpfs on /dev/log type devtmpfs (rw,nosuid,seclabel,size=5899976k,nr_inodes=1474994,mode=755)
devtmpfs on /dev/log type devtmpfs (rw,nosuid,seclabel,size=5899976k,nr_inodes=1474994,mode=755)

4.# virsh start iommu1
error: Failed to start domain iommu1
error: internal error: Process exited prior to exec: libvirt: QEMU Driver error : Failed to create /var/run/libvirt/qemu/16-iommu1.log: No such device or address

Actual results:
Failed to start guest when duplicate mount point existing in the /dev.

Expected results:
Guest can start successfully when duplicate mount point existing in the /dev.

Additional info:

Comment 2 Michal Privoznik 2018-01-03 06:08:46 UTC
Fixed upstream already by:

commit 3d899b99653bfa8f0fa275e689d0f5716142f5a5
Author:     Michal Privoznik <mprivozn@redhat.com>
AuthorDate: Wed Nov 8 15:20:10 2017 +0100
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: Wed Nov 8 16:38:26 2017 +0100

    qemu-ns: Detect /dev/* mount point duplicates even better
    
    In 4f1570720218302 I've tried to make duplicates detection for
    nested /dev mount better. However, I've missed the obvious case
    when there are two same mount points. For instance if:
    
      # mount --bind /dev/blah /dev/blah
      # mount --bind /dev/blah /dev/blah
    
    Yeah, very unlikely (in qemu driver world) but possible.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>


$ git describe --contains 3d899b99653bfa8f0fa275e689d0f5716142f5a5
v3.10.0-rc1~165

Comment 5 yafu 2018-06-06 04:55:47 UTC
Verified with libvirt-4.3.0-1.el7.x86_64.

Test steps:
1.#mount --bind /dev/log /dev/log

2.#mount --bind /dev/log /dev/log

3.#mount | grep log
devtmpfs on /dev/log type devtmpfs (rw,nosuid,seclabel,size=5899976k,nr_inodes=1474994,mode=755)
devtmpfs on /dev/log type devtmpfs (rw,nosuid,seclabel,size=5899976k,nr_inodes=1474994,mode=755)
devtmpfs on /dev/log type devtmpfs (rw,nosuid,seclabel,size=5899976k,nr_inodes=1474994,mode=755)

4.# virsh start iommu1
Domain iommu1 started

Comment 7 errata-xmlrpc 2018-10-30 09:52:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:3113


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