Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1333248 - Libvirt rejects object name starting with '.'
Libvirt rejects object name starting with '.'
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-05 01:54 EDT by Fangge Jin
Modified: 2016-11-03 14:44 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:44:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description Fangge Jin 2016-05-05 01:54:59 EDT
Description of problem:
Libvirt should reject domain name starting with '.', because file name starting with '.' is invisible in linux, the domain will disappear after restarting libvirtd.

Version-Release number of selected component:
libvirt-1.3.4-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
0.
# /usr/bin/virsh define /tmp/aaa.xml
Domain .aaa defined from /tmp/aaa.xml

1.
# /usr/bin/virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     .aaa                           shut off

2.
# ls /etc/libvirt/qemu/.aaa.xml
/etc/libvirt/qemu/.aaa.xml

3.
# systemctl restart libvirtd

# /usr/bin/virsh list --all
 Id    Name                           State
----------------------------------------------------


Actual results:
As step3, domain disappeared after restarting libvirtd

Expected results:
Libvirt reject object name starting with '.'.


Additional info:
The issue also exists with network/pool name
Comment 2 Ján Tomko 2016-06-21 12:06:05 EDT
Upstream patches:
https://www.redhat.com/archives/libvir-list/2016-June/msg01388.html
Comment 3 Ján Tomko 2016-06-23 16:46:07 EDT
Pushed upstream as:
commit 5217fe3db439e3dd66e2d657d2c0bebe0443ed22
Author:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2016-06-23 21:58:38 +0200

    Allow configs to start with a dot
    
    This fixes the disappearance of domains and networks starting with a
    dot.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1333248

git describe: v1.3.5-413-g5217fe3
Comment 5 zhe peng 2016-07-15 04:27:08 EDT
I can reproduce this.
verify with build:
libvirt-2.0.0-1.el7.x86_64

step:
 1. define a guest which name staring with a dot 
# virsh define q35.xml 
Domain .q35 defined from q35.xml
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     rhel7                          running
 -     .q35                           shut off

# systemctl restart libvirtd
[root@intel-e5530-8-1 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     rhel7                          running
 -     .q35                           shut off

test pool:
#virsh pool-define pool.xml 
Pool .test defined from pool.xml

# systemctl restart libvirtd
# virsh pool-list --all
 Name                 State      Autostart 
-------------------------------------------
 .test                active     no        
 default              active     yes    

test network:
# virsh net-define net.xml 
Network ..test defined from net.xml
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 ..test               inactive   no            yes
 default              active     yes           yes

# systemctl restart libvirtd
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 ..test               inactive   no            yes
 default              active     yes           yes

worked as expect, move to verified.
Comment 7 errata-xmlrpc 2016-11-03 14:44:42 EDT
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://rhn.redhat.com/errata/RHSA-2016-2577.html

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