[baylisa] Re: wtf: hostid gives '0' as a hostid

Ray Wong rayw at rayw.net
Sat Feb 16 19:11:02 PST 2008



Indeed, fairly safe to say that any uniqueness is valid only insofar as the
local site policy enforces it.  I've used SSH host keys to check uniqueness
at some sites, but I've also shared host keys amongst interchangable hosts
to smooth failover scenarios (clearly not at the same site).

I suppose since we're likely all perl hax0Rz it could make sense to make
a hash of hash of hash index using several items and try to remember never
to violate uniqueness on all of them at once. :)

Ray


On Sat, Feb 16, 2008 at 11:20:45AM -0800, adrian cockcroft wrote:
> Uniqueness of a machine is a slippery concept.
> 
> Its possible for a mac address to be assigned on a per-machine basis,
> and used for all NICs (older Sun machines definitely did this). Mac
> addresses can also be per-NIC, and multiple IP addresses can be on the
> same Nic. Cluster failover could also migrate the mac address between
> machines.
> 
> Partitionable hardware such as Sun F15K class and IBM P-series are one
> box with a variable number of partitions, perhaps even sharing the
> same NIC. Then there is VMWare and its brethren so you have multiple
> virtual machines on the same hardware, possibly with the same Nic and
> hostid, but different OS instances.
> 
> I don't think there is a 100% reliable answer unless you can constrain
> the deployed configurations to a known limited set of options.
> 
> ...interesting times.
> Adrian
> 
> On Feb 16, 2008 10:00 AM, David Alban <extasia at extasia.org> wrote:
> > On Feb 14, 2008 9:29 PM, Rick Moen <rick at linuxmafia.com> wrote:
> > > I know of no implications of the hostid value for networking.  Maybe I'm
> > > wrong about this (you tell me), but I get the somewhat fuzzy impression
> > > that its main use is in licensing managers for proprietary *ix software.
> >
> > having a unique id for each host means that i can with confidence know
> > that i've processed a particular host in a set of hosts.  say i have
> > host foo.bar.bat.  say it has two ip addresses.  say there are two
> > additional cnames that point to it.  say i have a config file for a
> > program that allows a user to specify a hostname or ip address for a
> > host.  and that any host may appear multiple times in the config file.
> >
> > say it's very important that the host get processed only once, for
> > some reason.  if there are tasks in the config file for:
> >
> >   foo
> >   foo.bar
> >   foo.bar.bat
> >   addl_cname_01.bar.bat
> >   addl_cname_02.bar.bat
> >   10.1.2.3
> >   10.2.3.4
> >
> > which are all references to the host foo.bar.bat, then i the only way
> > i know to collect all the tasks for foo.bar.bat is for the program to
> > connect to each of these "host handles" and get the hostid.  then it
> > can create sets of tasks for each host based on hostid, and all of the
> > tasks identified by the hostnames / ip addresses above will become a
> > single set.
> >
> > i suppose i could use hostname instead of hostid, but now that i know
> > on what hostid is based, it makes even more sense to use it (or
> > something similar).  it's possible someone could mess up hostnames
> > and/or dns.  but if a host can be reached via the network, it's hostid
> > should be a unique identifier.
> >
> > so the value for me is not with regard to networking per se, but truly
> > one of determining the uniqueness of a machine, despite the many "host
> > handles" we can use to get to that machine.
> >
> > p.s.  i'm starting to think that maybe a mac address on a host might
> > be better yet than the output of hostid...
> >
> >
> > --
> > Live in a world of your own, but always welcome visitors.
> >



More information about the Baylisa mailing list