This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] no digit beginning name?

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] no digit beginning name?
From: Tim Freeman <tfreeman@xxxxxxxxxxx>
Date: Sun, 3 Jul 2005 13:08:26 -0500
Delivery-date: Sun, 03 Jul 2005 18:07:24 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
In XendDomainInfo.py --> check_name() there is a restriction in place that a
domain can not begin with a digit.  If I comment out this check:

        if name[0] in string.digits:
            raise VmError('invalid vm name')

... I can start and stop a domain whose name starts with a digit just fine.  Is
there a reason this restriction is in place?  

And actually, the way the logic goes here: 

        if name[0] in string.digits:
            raise VmError('invalid vm name')
        for c in name:
            if c in string.digits: continue
            if c in '_-.:/+': continue
            if c in string.ascii_letters: continue
            raise VmError('invalid vm name')

... you could have "+-5ac" as a name but not "5ac".  (the intent is maybe "if
name[0] not in string.ascii_letters"?). 

Anyhow, I'm using UUIDs, and currently (to avoid needing to patch Xend) just
stripping any incoming UUIDs of digits in the beginning, but this is a little
unsavory, so I was curious if it was possible to change it upstream if there is
no reason for the check?  

Is there some use of the domain name I am missing that bars digits? 


Another thing: 

"+-5ac" works but actually when I tried "+-/5ac" (which passes the validity
check too), xm create fails with "Error: invalid domain:+-" and xm list reports
no dom0 but just this:

Name              Id  Mem(MB)  CPU  State  Time(s)  Console
Error: invalid domain:+-

Rebooting xend has no effect, needed to reboot the node. 

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>