On Thu, Dec 29, 2005 at 09:01:47AM +0900, Yoshinori Katase wrote:
> >> Now, Domname is permitted numeric only name.
> > 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 ?
I 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.
Xen-devel mailing list