[lxc-users] Dotted container names now invalid?

Stéphane Graber stgraber at ubuntu.com
Wed Oct 7 08:53:37 UTC 2015


On Wed, Oct 07, 2015 at 10:28:02AM +1000, Mark Constable wrote:
> On 06/10/15 20:48, Stéphane Graber wrote:
> >>>Why are dotted domain-like container names now invalid?
> >
> >As the container name is set as the container hostname and may be
> >included in DNS records through the use of DHCP, we needed it to comply
> >to both hostname and DNS records specifications.
> 
> Right, so I was abusing the hostname part and using it as a full domainname
> for the container, which was very convenient. It also allowed me to easily
> see the full domainname of each container via lxc list.
> 
> However this change now introduces a problem I am not sure how to get
> around in that if I want to set up various vhosts such as...
> 
> www.example1.org
> www.example2.org
> www.example3.org
> 
> and...
> 
> mail.example1.org
> mail.example2.org
> mail.example3.org
> 
> for typical hosting purposes then I cannot have multiple hostnames of
> www, www and another www (times 1000+).
> 
> So now I have to come up with some otherwise useless scheme to provide
> dummy hostnames where I have to use some persistent centralised database
> to map and keep track of, ie;...
> 
> client1w -> www.example1.org
> client2w -> www.example2.org
> client3w -> www.example3.org
> 
> client1m -> mail.example1.org
> client2m -> mail.example2.org
> client3m -> mail.example3.org
> 
> Which is incredibly lame compared to how 0.18 worked.
> 
> >This results in the following rule:
> >  - Hostname must be between 1 and 63 characters in length
> >  - The character set is alpha numberical characters and hyphens
> >  - Hostname may not started with a digit or an hyphen
> >  - Hostname may not end with an hyphen
> 
> Surely DHCP can also work with full domainnames?
> 
> Is there any chance this restriction could be loosened slightly to include
> a dot char to re-enable a FQDN for container names?

Not all operating systems we may run on at some point support dots in
their hostnames, so allowing this would make things inconsistent across
platforms and I'd really rather avoid this.

Note that if what you need is a way to find containers easily, you can do:
    lxc config set container-name user.customer=blah
    lxc list user.customer=blah

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151007/87345d9a/attachment.sig>


More information about the lxc-users mailing list