[lxc-devel] [RFC] Container name vs utsname... All templates.
Michael H. Warfield
mhw at WittsEnd.com
Thu May 16 14:50:08 UTC 2013
This is my second of two requests for comments. This one applies to ALL
the templates.
I noticed, in working on the Fedora template, lxc-fedora, that the host
name and utsname configuration value is set to the simple name of the
container. IMHO, that's suboptimal.
In practice, the hostname and utsname should be the FQDN (fully
qualified domain name) of the system. Often, on installation of a new
Fedora system, I find that it's derived from the DHCP information and I
end up with something like "rasputin.local" on the install screens,
which I generally change.
I don't want to use the FQDN as the container name, but rather the
simple name (or something different). Should we provide a separate
(optional) option for the utsname which is then used for the hostname?
Logic, maybe, as follows???
-n Container_Name
-u UTS_Name
(-u is just a thought - I want other thoughts there.)
If UTS_Name is NULL, set UTS_Name to Container_Name
If UTS_Name does not contain a domain (no "."), extract domain from host
name of host and append domain to UTS_Name.
Assign utsname and hostname of container to UTS_Name rather than
Container_Name.
This way, container "Rasputin" could be created with "-n Rasputin -u
Rasputin.WittsEnd.com" and have the hostname set properly in the
container and not have the container namespace polluted with multiple
instantiations of "WittsEnd.com". Creating just "-n Rasputin" would
cause the script to extract a ".WittsEnd.com" to be extracted from the
host "Forest.WittsEnd.com" and appended for "Rasputin.WittsEnd.com",
which is what I would want.
Another thought would be to overburden -n with the concept that the
container name would be a simple name (strip from the first "." to the
end) but that would be too many changes in too many places and result in
too many headaches, in my mind.
Thoughts?
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 985-6132 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130516/8ef30425/attachment.pgp>
More information about the lxc-devel
mailing list