[lxc-users] Dotted container names now invalid?

Andrey Repin anrdaemon at yandex.ru
Wed Oct 7 12:25:17 UTC 2015


Greetings, Mark Constable!

>>> 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.

> Well how about lxc itself transform any dots to hyphens on just those systems?

That's an overhead and conditional code that needs to be maintained by someone.

> Rather than require the majority of sane posix platforms to manually transform
> a dotted FQDN to some hyphenated version why not just apply this "magically"
> within lxc for the systems that can't cope with a dotted hostname?

>> 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

> Times thousand of hosts compared to just a plain "lxc list"?

If this is your typical use case, make an alias or otherwise automate it.
It will also allow you to store any other metadata you might want to add in
the future.
IMO, this is much more elegant and straightforward way to deal with it, rather
than abusing container names for unrelated intentions.

Though, I would like to know, which systems are not allowing dots as valid
filename characters. To avoid them in the future.


-- 
With best regards,
Andrey Repin
Wednesday, October 7, 2015 15:21:31

Sorry for my terrible english...



More information about the lxc-users mailing list