Switching to randomly generated hostnames
pgf at laptop.org
Tue May 1 11:39:56 EDT 2012
> Currently, XO hostnames are set on first boot in the following format:
> Where A, B and C are the last 3 bytes of the MAC address expressed in hex.
> In Nicaragua we are seeing cases where XOs have no hostname set, both
> on XO-1 and XO-1.5. On XO-1 this is presumably because libertas
> usb8388 init was never 100% reliable, and on XO-1.5 its presumably
> because the wireless card was DOA but was replaced after first boot.
> When no hostname is set in this way, networking doesn't work properly,
> since we don't create a network config (oops).
> Also, the hostname must be unique within a group of peers for
> avahi-based collaboration to work (as we've learnt from painful
that sounds like a bug in avahi. but i don't really need the details.
> We could harden up our initialisation to work better in the face of no
> MAC address being available on first boot, but actually that is
> becoming more complicated (due to increased parallelisation, the
> network adapter will now come up late in boot). Moving to a simpler
> scheme would solve the issues seen in the field and avoid the
> challenges around network device initialisation.
> I propose we move to generating hostnames in the same format as before
> (xo-A-B-C), but with A, B and C assigned as random hex digits on first
> (If people are worried about collisions, maybe we add a D digit.)
another option might be S/N, but you'd still need a fallback if it
isn't set. i guess random is fine. is the current format required?
i'd prefer that the new style of hostname look different, to avoid
confusion, but if there are tools that expect that format, so be it.
> As far as I can see, the hostname is not really of relevance to
> anything except avahi. It is not broadcast to the DHCP server when
> connecting to a network, for example.
> Any thoughts/objections?
> Devel mailing list
> Devel at lists.laptop.org
paul fox, pgf at laptop.org
More information about the Devel