On Tue, Sep 22, 2009 at 10:19 AM, Iustin Pop <[email protected]> wrote: > > On Tue, Sep 22, 2009 at 10:09:30AM +0100, Michael Hanselmann wrote: >> 2009/9/22 Iustin Pop <[email protected]>: >> > Here's the interdiff (with a realisation that an FQDN cannot be an UUID, >> > so no >> > issue about namespace conflicts): >> >> Except that Ganeti allows the user to specify only the part before the >> first, second, third, etc dot. Anyway LGTM. > > Hmm... I was only thinking about RAPI, and I was under the wrong impression it > requires FQDNs. > > Hmm, we are under the same issue as having two instances, one named > instance1.example and the other instance1.example.com, which ganeti allows at > create time but it completely breaks: > >>>> from ganeti.utils import MatchNameComponent >>>> MatchNameComponent("a", ["a", "a.b"]) >>>> MatchNameComponent("a.b", ["a", "a.b"]) > 'a.b' >
Does it break? It seems to be the correct behavior! (if you can't decide which one is it, decide there is no match). > So here we would: a) ignore it the same way we ignore today's breakage, or b) > fix MatchNameComponent at which point the UUID (by itself) would select the > UUID and the UUID.domain would select the instance. > Well, then we don't need to touch MatchNameComponent (as uuid lookup would probably come first, and only if there is no match we could move to matching). > We could also add a note in the man page and in the install/admin guide that > it's not recommended to have such instances. Would that suffice? > Definitely. Not many people would be using uuids anyway... We could also have an UUID regexp and abort at instance creation time if you try to create a new instance with a UUID as its name (and maybe alert in cluster verify if there is already one)? Thanks, Guido
