From nobody Sat Mar 04 16:21:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PTVTw1dS6z3wBQV; Sat, 4 Mar 2023 16:21:56 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PTVTv6j9hz3hVc; Sat, 4 Mar 2023 16:21:55 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.16.1/8.16.1) with ESMTP id 324GLmUC006375; Sat, 4 Mar 2023 10:21:49 -0600 (CST) (envelope-from mike@karels.net) Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id PF2oOBxwA2TlGAAAs/W3XQ (envelope-from ); Sat, 04 Mar 2023 10:21:48 -0600 From: Mike Karels To: Baptiste Daroussin Cc: =?utf-8?q?T=C4=B3l_Coosemans?= , re@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a28ccb32bf56 - main - machine-id: generate a compact version of the uuid Date: Sat, 04 Mar 2023 10:21:48 -0600 X-Mailer: MailMate (1.14r5937) Message-ID: <77AEE73C-6D27-4BEE-8ABA-D23CFDA54E08@karels.net> In-Reply-To: <25c644b8deafb5436c76dbffd48adfd07518f513@freebsd.org> References: <98A14373-D09C-437D-AAB8-0A140FB46C5E@karels.net> <202303011818.321IIXIT067595@gitrepo.freebsd.org> <20230303164028.35766f35@hal.tijl.coosemans.org> <25c644b8deafb5436c76dbffd48adfd07518f513@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PTVTv6j9hz3hVc X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4 Mar 2023, at 0:03, Baptiste Daroussin wrote: > 3 mars 2023 =C3=A0 17:12 "Mike Karels" a =C3=A9crit: > > >> >> On 3 Mar 2023, at 9:40, T=C4=B3l Coosemans wrote: >> >>> >>> On Wed, 1 Mar 2023 18:18:33 GMT Baptiste Daroussin = wrote: >>> >>>> >>>> The branch main has been updated by bapt: >>>> >>>> URL: >>>> https://cgit.freebsd.org/src/commit/?id=3Da28ccb32bf5678fc401f160286= 5ee9b37ca4c990 >>>> >>>> commit a28ccb32bf5678fc401f1602865ee9b37ca4c990 >>>> >>>> Author: Baptiste Daroussin >>>> >>>> AuthorDate: 2023-02-28 10:31:06 +0000 >>>> >>>> Commit: Baptiste Daroussin >>>> >>>> CommitDate: 2023-03-01 18:16:25 +0000 >>>> >>>> machine-id: generate a compact version of the uuid >>>> >>>> dbus and other actually expect an uuid without hyphens >>>> >>>> Reported by: tijl >>>> >>>> MFC After: 3 days >>>> >>>> --- >>>> >>>> libexec/rc/rc.d/machine_id | 2 +- >>>> >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/libexec/rc/rc.d/machine_id b/libexec/rc/rc.d/machine_i= d >>>> >>>> index 7cfd7b2d92f8..8bf3e41d0603 100644 >>>> >>>> --- a/libexec/rc/rc.d/machine_id >>>> >>>> +++ b/libexec/rc/rc.d/machine_id >>>> >>>> @@ -23,7 +23,7 @@ machine_id_start() >>>> >>>> if [ ! -f ${machine_id_file} ] ; then >>>> >>>> startmsg -n "Creating ${machine_id_file} " >>>> >>>> t=3D$(mktemp -t machine-id) >>>> >>>> - /bin/uuidgen -r -o $t >>>> >>>> + /bin/uuidgen -r -c -o $t >>>> >>>> install -C -o root -g wheel -m ${machine_id_perms} "$t" "${machine_= id_file}" >>>> >>>> rm -f "$t" >>>> >>>> startmsg 'done.' >>>> >>> >>> I really think this file should be defined to contain the same UUID = as >>> >>> /etc/hostid such that there's one and only one UUID per machine. Hav= ing >>> >>> two different IDs needlessly complicates things if they end up in lo= gs >>> >>> etc. >>> >>> It also looks like on Linux virtual machines this file contains the >>> >>> SMBIOS UUID just like our /etc/hostid. If /etc/machine-id is suppose= d >>> >>> to be a portable way to obtain that UUID it should be the same as >>> >>> /etc/hostid. >>> >> >> I agree. I had the same reaction when the machine-id was added, but >> >> thought the requirements were different (in particular, the UUID versi= on). >> >> If at all possible, the two should be the same except for hyphens. >> >>> >>> Please have another look at . This >>> https://reviews.freebsd.org/D38811 >>> file is supposed to remain constant across updates. If we get this >>> >>> wrong in 13.2, applications may have to deal with the complications = for >>> >>> a very long time. >>> >> >> This should be resolved for 13.2 if at all possible. >> >> Mike >> > > > The requirements are diff=C3=A9rent rfc 422 yes would accept what hosti= d format uses still all new uuid should follow rfc422. Does this mean that if hostid already exists, a compact version of hostid= would be acceptable as the machine-id? This situation will happen as machines are upgraded to 13.2, and it would certainly be preferable to creating a different UUID. Mike