From: Tim Freeman Subject: no digit beginning name? Date: Sun, 3 Jul 2005 13:08:26 -0500 Message-ID: <20050703130826.4ff265f3.tfreeman@mcs.anl.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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? Thanks, Tim 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.