* 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.