Re: I just updated to main-n261544-cee09bda03c8 based (via source) and now /etc/machine-id and /var/db/machine-id disagree ; more

From: Warner Losh <imp_at_bsdimp.com>
Date: Sat, 18 Mar 2023 14:55:09 UTC
On Fri, Mar 17, 2023 at 9:53 PM Mark Millard <marklmi@yahoo.com> wrote:

> This may all be fine. But it still leaves me expecting
> that there should be man page(s) covering these hostid
> and machine-id files and how they should be handled to
> match the usages to which they are put, such as the nfs
> use that was referenced. A note/reminder to look up
> that material could also be relevant.
>

It would be great if we could document this. I too recently
ran into a mismatch. If you load the /etc/hostid so that the
code in jail0_init picks it up and sets the host uuid, then
/etc/rc.d/hostid, enabled by default, will come along and
see there's no smbios.system.uuid and generate a new
uuid and smack that bad-boy into the kern.hostuuid sysctl
unconditionally. It was easy enough for me to work
around this by setting smbios.system.uuid in the boot
env that I was booting from, though.

Nothing to do with the upgrade, just that we have
multiple mechanisms to specify this stuff, and the code
we use today is somewhat less than robust to cover all
the cases that should be supported, but wind up being
buggy.

Warner