From nobody Fri Jan 13 00:53:47 2023 X-Original-To: dev-commits-src-all@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 4NtNG50sxkz2p0nk; Fri, 13 Jan 2023 00:53:49 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4NtNG42b41z3hml; Fri, 13 Jan 2023 00:53:48 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net; dmarc=none Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTP id 30D0rltU076189; Thu, 12 Jan 2023 18:53:47 -0600 (CST) (envelope-from mike@karels.net) Received: from [10.0.2.130] ([10.0.1.1]) by mail.karels.net with ESMTPSA id M5iWIZurwGObKQEA4+wvSQ (envelope-from ); Thu, 12 Jan 2023 18:53:47 -0600 From: Mike Karels To: Rick Macklem Cc: Baptiste Daroussin , dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 62a149bf6219 - main - Add new rc: machine_id to generate /etc/machine-id Date: Thu, 12 Jan 2023 18:53:47 -0600 X-Mailer: MailMate (1.14r5933) Message-ID: In-Reply-To: References: <202212231636.2BNGaluc012056@gitrepo.freebsd.org> <876513140.46.1671814393751@mailrelay> <20230109143951.txy43nin5yv3qkym@ubertino.local> <20230112082359.dxgbexyhucr4lsv7@aniel.nours.eu> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.16 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; FREEFALL_USER(0.00)[mike]; ARC_NA(0.00)[]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[karels.net]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4NtNG42b41z3hml X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 12 Jan 2023, at 18:25, Rick Macklem wrote: > On Thu, Jan 12, 2023 at 12:24 AM Baptiste Daroussin = wrote: >> >> On Wed, Jan 11, 2023 at 07:08:39PM -0800, Rick Macklem wrote: >>> On Mon, Jan 9, 2023 at 6:40 AM Matteo Riondato w= rote: >>>> >>>> On 2022-12-24 at 03:39 EST, Tobias C. Berner = wrote: >>>> >>>>> Moin moin >>>>> >>>>> I think it tries to solve the same problem of giving the machine a = unique id. >>>>> >>>>> From the linux man page [1] >>>>> >>>>> The machine ID does not change based on local or network >>>>> configuration or when hardware is replaced. Due to this and i= ts >>>>> greater length, it is a more useful replacement for the >>>>> gethostid(3) call that POSIX specifies. >>>>> >>>> >>>> Does this make or should it make hostid obsolete? >>> I hope not, since the NFSv4 client uses /etc/hostid. >>> >>>> If yes, then changes are needed to deorbit hostid. If not, why not? >>> If this is somehow a better algorithm than the one used by uuidgen(1)= >>> then I would prefer seeing that utility improved instead of a new one= >>> being added. >> >> This is exactly what has been done. Here we are speaking a rc script t= o generate >> the file expected by userland software (from the ports tree). >> >> https://cgit.freebsd.org/src/commit/bin/uuidgen/uuidgen.c?id=3Df176fe8= e7f638e585afcd2f4dd52a522c4648f63 >> > Oops, sorry about that. From the original commit log, I thought that th= e commit > added a new utility, so that there were now two utilities in the source= tree. > >>> >>> If software needs to acquire the host uuid, the code can simply >>> get the sysctl kern.hostuuid. >> >>> >>> Unless there is a really good reason to have this one in the >>> system as well as uuidgen(1), I'd suggest you revert this commit. >>> >>> rick >> >> I don't see why it should be reverted. more and more of the package ec= osystem >> requires this feature (and it what is provided by dbus is not sufficie= nt >> anymore), this is what those changes (addition to uuidgen(1) and rc sc= ript to >> generate the machine-id file) is addressing. >> > I agree. I mistakenly thought a new utility had been added. Now I see = it is > a noew option on uuidgen(1), which seems fine to me. > > Sorry for the noise, rick > >> Now can we reuse part of the changes to improve/replace hostid, this i= s a >> complerly unrelated study that could (should?) be done by whom is will= ing to >> have a look and knowledgeable enough in this area. I think this would be a good idea. It seems strange to have two uuids fo= r a host, although the two clearly differ in several ways. It would also be = nice to have documentation that cross-referenced the two and explained them. I=E2=80=99m not sure where that should be; maybe hostuuid and machine-id = should have man pages. All I see now is the gethostid/sethostid(3) man page, al= l of which is historical. Mike >> Best regards, >> Bapt