wtf: hostid gives '0' as a hostid

Sam'l B samlb at am-cath.org
Sat Feb 16 20:54:30 PST 2008


Really Dumb Solution:

	Create a text file, like "/etc/DumbID" on each of the machines.

	Put something unique in each text file.

	Look at "/etc/DumbID" when you log on to each machine and act accordingly.

	Why is it dumb?

		1)	Done by hand

		2)	Doesn't scale at all well

	Why is it maybe not-so-dumb?

		1)	You know exactly what to look for, and don't have to parse source 
files, or generate PERL hacks.

		2)	It can be self-documenting.

Sam'l Bassett


Wing Wong wrote:
> Regarding vmware mac addresses, those are typically generated and made
> to be as unique as possible. However, this can be overridden. But it
> is possible to ensure uniqueness of mac addresses for virtual machines
> using vmware vm(s).
> 
> Ensuring uniqueness takes more than just finding something unique to
> the instance. This is where infrastructure external to the host comes
> into play to keep track of systems. This will probably require a means
> of generating a unique serial number for the host yourself and keeping
> track of it with informational tags/files on both the host itself as
> wells as in your management/inventory system.
> 
> This way, if you lose track of a host, you can employ a "best guess"
> aproximation of finding your host again.
> 
> Definitely an interesting problem...
> 
> Wing
> 
> On 2/16/08, adrian cockcroft <adrian.cockcroft at gmail.com> 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