[lxc-devel] [RFC] Container name vs utsname... All templates.
Michael H. Warfield
mhw at WittsEnd.com
Fri May 17 15:57:11 UTC 2013
On Fri, 2013-05-17 at 08:43 -0500, Serge Hallyn wrote:
> Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > 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?
> On the one hand I fear adding too many options for the many things we
> might want configured on the host.
Concur
> On the other hand what you're asking for makes sense...
> Do you think it makes sense to have only the longname (--utsname or
> --fqdn) and not use -u for this?
Actually, not that you mention it, yeah that would make sense to just
use a long name for an advanced option like that. And --fqdn might be a
better choice as well (more descriptive in the doco).
> -serge
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/20130517/34a84e4d/attachment.pgp>
More information about the lxc-devel
mailing list