Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed
- To: Michael Stone <mstone@debian.org>, Petter Reinholdtsen <pere@hungry.com>, Florian Weimer <fw@deneb.enyo.de>, Carlos Alberto Lopez Perez <clopez@igalia.com>, Martin F Krafft <madduck@debian.org>, pkg-zfsonlinux-devel@lists.alioth.debian.org, Bob Proulx <bob@proulx.com>, 595790@bugs.debian.org, Debian GNU/kBSD <debian-bsd@lists.debian.org>
- Subject: Bug#595790: [Pkg-zfsonlinux-devel] Bug#595790: hostid: useless unless fixed
- From: Richard Laager <rlaager@wiktel.com>
- Date: Thu, 29 Sep 2016 15:00:51 -0500
- Message-id: <[🔎] fa4fbed4-23eb-8dc5-a83e-268d2c9feaba@wiktel.com>
- Reply-to: Richard Laager <rlaager@wiktel.com>, 595790@bugs.debian.org
- In-reply-to: <[🔎] 88a29328-862d-11e6-9b6a-00163eeb5320@msgid.mathom.us>
- References: <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> <[🔎] bfee156d-15d0-4446-c897-81da79a424e2@wiktel.com> <[🔎] 88a29328-862d-11e6-9b6a-00163eeb5320@msgid.mathom.us>
On 09/29/2016 05:19 AM, Michael Stone wrote:
> On Wed, Sep 28, 2016 at 09:03:38PM -0700, Richard Laager wrote:
>> Getting back to ZFS and /etc/hostid... I would think that a
>> randomly-generated /etc/hostid is probably sufficient. Whether that's
>> done in the libc, spl, or zfs package makes no difference to me.
>
> You still haven't explained why zfs doesn't just generate a uuid itself.
>
> There's a large body of work ensuring reasonable uniqueness for uuids,
> and there isn't a clear benefit to clinging to getuid.
It can't be a full UUID. The on-disk format of ZFS uses a 32-bit
integer. It doesn't really matter what we use to derive it, but a 32-bit
integer is the constraint.
For example, if you want to use the low 32-bits of /etc/machine-id, that
would work too. It'd mean carrying a patch on Debian, but if the pain of
a patch and different behavior is less than the benefits of the change,
go for it.
> Even on solaris
> there's a big honkin' warning on the man page that it isn't guaranteed
> to be unique (IIRC, getuid on containers reflects the hardware the
> container is running on).
On Solaris the zone (container) wouldn't import the pool. Pools are
imported in the "global zone". So this isn't a problem.
--
Richard
Reply to: