Re: Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Petter Reinholdtsen
[Aurelien Jarno] > In any case it looks to me we should not reinvent the wheel. We > already ended-up with two implementations of a unique machine ID, one > in dbus and one for systemd (which fortunately now try to just copy > the other one if it already exists), I am not sure we want a third > one

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Richard Laager
On 09/28/2016 04:41 AM, Petter Reinholdtsen wrote: > I did not quite understand what you mean here. Do you mean the DMI > value in your experience isn't unique? Absolutely, yes. I found this out because, for some reason that I don't know, libvirtd wants a unique identifier. It defaults to looking

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Florian Weimer
* Michael Stone: > Other platforms have deprecated gethostid, that's the best way forward > for linux, IMO. I agree. It's the most likely outcome if this issue was reported to glibc upstream.

Re: Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Michael Stone
On Thu, Sep 29, 2016 at 12:30:39AM +0200, Aurelien Jarno wrote: Another question is about chroots. The above methods means we might end-up with the same machine-id in chroots id the DMI UUID is available. Is it something really wanted? One of the many ambiguities of gethostid. :) Is it a unique

Re: Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Aurelien Jarno
On 2016-09-28 09:33, Petter Reinholdtsen wrote: > Control: reassign -1 libc6 > Control: found -1 2.19-18 > Control: The value from gethostid() should be more unique and not change when > the host IP changes > > Reassigning to glibc as that is the source of gethostid() where the > problem with the

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Michael Stone
On Wed, Sep 28, 2016 at 11:11:21PM +0200, Petter Reinholdtsen wrote: [Michael Stone] Other platforms have deprecated gethostid, that's the best way forward for linux, IMO. Which platforms is this? I find FreeBSD recommend to use sysctl and KERN_HOSTID to get the hostid integer directly from t

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Petter Reinholdtsen
[Michael Stone] > Other platforms have deprecated gethostid, that's the best way forward for > linux, IMO. Which platforms is this? I find FreeBSD recommend to use sysctl and KERN_HOSTID to get the hostid integer directly from the kernel instead of using gethostid(), which isn't really depricati

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Florian Weimer
* 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 availab

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Michael Stone
On Wed, Sep 28, 2016 at 12:32:04PM +0200, Florian Weimer wrote: * Petter Reinholdtsen: Something like this should work, I guess: if [ ! -f /etc/hostid ]; then if [ -e /sys/class/dmi/id/product_uuid ]; then sethostidfromuuid $(cat /sys/class/dmi/id/product_uuid) else dd if=/

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread 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

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Florian Weimer
* Petter Reinholdtsen: > Something like this should work, I guess: > > if [ ! -f /etc/hostid ]; then >if [ -e /sys/class/dmi/id/product_uuid ]; then >sethostidfromuuid $(cat /sys/class/dmi/id/product_uuid) >else > dd if=/dev/urandom bs=1 count=4 of=/etc/hostid 2>/dev/null >

Re: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed

2016-09-28 Thread Petter Reinholdtsen
Control: reassign -1 libc6 Control: found -1 2.19-18 Control: The value from gethostid() should be more unique and not change when the host IP changes Reassigning to glibc as that is the source of gethostid() where the problem with the missing unique identifier originates. Using the version numb