Yoshinori Katase
2005-Dec-28 05:00 UTC
[Xen-devel] Is it valid to permit numeric only DomName ?
Hi, Now, Domname is permitted numeric only name. It is permitted even 0 ! Is this a specification ? # xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 503.1 22 21 64 1 ------ 1.2 21 22 64 1 -b---- 1.0 I typed "xm shutdown 21", when I want to shutdown DomID 21. But this command shutdowned Domname 21. # xm shutdown 21 # xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 506.0 22 21 64 1 -b---- 1.2 It seems that the priority is given to Domname. But Domname "0" is an exception. # xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 512 1 r----- 521.8 0 23 64 1 -b---- 1.0 # xm shutdown 0 Error: Can''t specify Domain-0 This is serious, when many domains are running. To avoid confusion, Domname shuld be an identifier. That is the first letter of Domname shuld be alphabetic. Am I wrong ? Best Regards, Yoshinori Katase _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
James Harper
2005-Dec-28 05:20 UTC
RE: [Xen-devel] Is it valid to permit numeric only DomName ?
I have visions of the "who''s on first" sketch in my head... :) I assume you are pointing this out because you see it as a bug, not because it is something you would ever actually want to do? James> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel- > bounces@lists.xensource.com] On Behalf Of Yoshinori Katase > Sent: Wednesday, 28 December 2005 16:00 > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] Is it valid to permit numeric only DomName ? > > Hi, > > Now, Domname is permitted numeric only name. > It is permitted even 0 ! > Is this a specification ? > > # xm list > Name ID Mem(MiB) VCPUs State Time(s) > Domain-0 0 512 1 r----- 503.1 > 22 21 64 1 ------ 1.2 > 21 22 64 1 -b---- 1.0 > > I typed "xm shutdown 21", when I want to shutdown DomID 21. > But this command shutdowned Domname 21. > > # xm shutdown 21 > # xm list > Name ID Mem(MiB) VCPUs State Time(s) > Domain-0 0 512 1 r----- 506.0 > 22 21 64 1 -b---- 1.2 > > It seems that the priority is given to Domname. > But Domname "0" is an exception. > > # xm list > Name ID Mem(MiB) VCPUs State Time(s) > Domain-0 0 512 1 r----- 521.8 > 0 23 64 1 -b---- 1.0 > # xm shutdown 0 > Error: Can''t specify Domain-0 > > This is serious, when many domains are running. > To avoid confusion, Domname shuld be an identifier. > That is the first letter of Domname shuld be alphabetic. > Am I wrong ? > > Best Regards, > Yoshinori Katase > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt
2005-Dec-28 13:44 UTC
RE: [Xen-devel] Is it valid to permit numeric only DomName ?
> Now, Domname is permitted numeric only name. > It is permitted even 0 ! > Is this a specification ? > > # xm list > Name ID Mem(MiB) VCPUs State Time(s) > Domain-0 0 512 1 r----- 503.1 > 22 21 64 1 ------ 1.2 > 21 22 64 1 -b---- 1.0 > > I typed "xm shutdown 21", when I want to shutdown DomID 21. > But this command shutdowned Domname 21.domain names should be enforced to start with a non-numeric character. This used to be the case, but obviously got lost somewhere. An alternative to re-instating the test would be to make it such that the ''domain'' parameter to commands is only interpretted as a domid iff a lookup as a name fails. That would at least make things consistent, but sometimes its just better to avoid the opportunity for confusion... Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yoshinori Katase
2005-Dec-29 00:01 UTC
RE: [Xen-devel] Is it valid to permit numeric only DomName ?
>> Now, Domname is permitted numeric only name.(snip)> domain names should be enforced to start with a non-numeric character. > This used to be the case, but obviously got lost somewhere.Is here ? http://thread.gmane.org/gmane.comp.emulators.xen.devel/11913 Yoshinori Katase _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Jan-03 14:22 UTC
Re: [Xen-devel] Is it valid to permit numeric only DomName ?
On Thu, Dec 29, 2005 at 09:01:47AM +0900, Yoshinori Katase wrote:> >> Now, Domname is permitted numeric only name. > (snip) > > > domain names should be enforced to start with a non-numeric character. > > This used to be the case, but obviously got lost somewhere. > > Is here ? > http://thread.gmane.org/gmane.comp.emulators.xen.devel/11913I think that the original argument in that thread is reasonable. He would like to use UUIDs as the domain name, for interfacing with external systems, and I think that is a reasonable request. Other people may like to use the domain name as a handle or key to external information, so I think that we ought to allow the first character to be a digit. I agree that it is confusing when "xm destroy 0" is blocked, even though the name "0" belongs to another domain, and it''s really quite bad that "xm destroy 00" reboots domain 0. I think that the rule in general ought to be that domain names are checked first, and if the domain name does not exist, then the integer-equivalent of that name is compared with the domain IDs instead. This is the current behaviour for non-privileged domains, so that is OK. The problem here is that the checks to see whether a domain can be destroyed or shutdown are in the wrong place -- some are in the client, some are in the server, and even the ones in the server aren''t in the right place. The algorithm ought to be See if there is a name that matches, and if so, that is the domain to use, otherwise, see if there is a domain ID that matches, and if so, use that. Given that domain ID, _now_ check whether it is domain 0, and if so, refuse to shutdown/pause/migrate/destroy. This should all be in XendDomain.py. There is no need for any checks inside xm/shutdown.py, because a) they cannot see whether domain 0 has been renamed, and b) they are just duplicating checks that belong in the server. If someone could produce a patch to this effect, that would be great. Cheers, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel