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

David Alban extasia at extasia.org
Sat Feb 16 10:00:02 PST 2008


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