Inconsistent XML config checks for domains with space in the name

Bug #672948 reported by wodny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

1) http://libvirt.org/formatdomain.html#elementsMetadata states:
"This name should consist only of alpha-numeric characters".

2) /usr/share/libvirt/schemas/domain.rng:
<element name="name">
  <ref name="domainName"/>
</element>

<define name="domainName">
    <data type="string">
      <param name="pattern">[A-Za-z0-9_\.\+\-&amp;:/]+</param>
    </data>
  </define>

3) Virsh accepts <name> with spaces, but then during a vm start some misguiding output is generated. It says aa_change_profile() fails. Virsh doesn't check the config with the schema as well.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The aa_change_profile() meesage is due to the function virDomainDefParseString() (from src/conf/domain_conf.c) failing to provide the name of the domain when the domain has a space in it. The name is required in order to setup the paths for the monitor, etc in the dynamic apparmor profile and virt-aa-helper exits with error when it doesn't have it.

The bug is in either virsh accepting a space in the name on define, etc, or in not handling the space properly. Either way, the documentation is correct for now: "This name should consist only of alpha-numeric characters" and therefore this bug does not have a high priority in Ubuntu. I suggest filing a bug with upstream (see http://libvirt.org/bugs.html) if you would like this resolved in Ubuntu. If you do, please reference the upstream bug here.

Changed in libvirt (Ubuntu):
importance: Undecided → Low
status: New → Triaged
summary: - Inconsistent XML config checks
+ Inconsistent XML config checks for domains with space in the name
Changed in libvirt (Ubuntu):
importance: Low → Wishlist
Revision history for this message
wodny (z-launchpad-wodny-org) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.