Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed
- To: Petter Reinholdtsen <pere@hungry.com>
- Cc: 595790@bugs.debian.org, Michael Stone <mstone@debian.org>, Darik Horn <dajhorn@vanadac.com>, Carlos Alberto Lopez Perez <clopez@igalia.com>, Bob Proulx <bob@proulx.com>, Martin F Krafft <madduck@debian.org>, pkg-zfsonlinux-devel@lists.alioth.debian.org, "Debian GNU\/kBSD" <debian-bsd@lists.debian.org>
- Subject: Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed
- From: Florian Weimer <fw@deneb.enyo.de>
- Date: Wed, 28 Sep 2016 14:12:12 +0200
- Message-id: <[🔎] 877f9wi5pf.fsf@mid.deneb.enyo.de>
- Reply-to: Florian Weimer <fw@deneb.enyo.de>, 595790@bugs.debian.org
- In-reply-to: <[🔎] 2flzims8d5r.fsf@diskless.uio.no> (Petter Reinholdtsen's message of "Wed, 28 Sep 2016 13:41:20 +0200")
- References: <20100906173518.GA22201@piper.oerlikon.madduck.net> <51242E84.6000307@igalia.com> <51252C1A.3060704@igalia.com> <20130220213825.GA16789@hysteria.proulx.com> <8b6ba8a4-7bb1-11e2-894e-001cc0cda50c@msgid.mathom.us> <51256560.7010701@igalia.com> <188299ba-7bc0-11e2-85e0-001cc0cda50c@msgid.mathom.us> <CAPbcu1MYqHjKZycuRETyBGCLuAnLASmha9C6E0rsgcq-9hcVBg@mail.gmail.com> <[🔎] 20160928073305.GA25169@diskless.uio.no> <[🔎] 87bmz8jowr.fsf@mid.deneb.enyo.de> <[🔎] 2flzims8d5r.fsf@diskless.uio.no>
* Petter Reinholdtsen:
> [Florian Weimer]
>> That's not very different from /etc/machine-id, isn't it?
>
> Ah, thank you very much for bringing this systemd setting to my
> attention. I was not aware of it.
>
> I agree that it seem very similar in purpose and implementation. Will
> it be available on non-linux Debian architectures too?
It might be possible to port over this part, yes.
>>> We need to figure out how to transform the UUID to a 32 bit integer,
>>> of course.
>>
>> And I think this is the crux of the problem. Whatever we do, with
>> today's cluster sizes it's just not reliably unique.
>
> Well, for the set of machines we have available at work (ca. 3000) it
> would be sufficiently unique.
I simulated 100,000 random assigns of 32-bit host IDs to 3,000 hosts,
and got collisions in 104 cases.
For 5,000 hosts, I got 286, and for 10,000, 1,112 (again in 100,000
runs). I was lazy, it shouldn't be too hard to calculate expected
values accurately.
So a 32-bit value without central coordination is pretty much a time
bomb.
> For most sites it would make the return value from gethostid()
> unique.
The IP address of a host could be better than that. I doubt it is
possible to imrpove upon the glibc implementation.
>> DMI data seems risky because it depends on firmware, and there are so
>> many firmware bugs out there.
>
> I did not quite understand what you mean here. Do you mean the DMI
> value in your experience isn't unique?
I wouldn't count on them being unique. Most such ID fields are
definitely not, and there are groups out there who strongly oppose
device IDs.
Reply to: