From nobody Fri Mar 17 17:15:47 2023 X-Original-To: freebsd-stable@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 4PdW476L3Xz3ybjM; Fri, 17 Mar 2023 17:15:51 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PdW475ktGz4LY2; Fri, 17 Mar 2023 17:15:51 +0000 (UTC) (envelope-from tijl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679073351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IKBcKNvQb8Dd2AueR4yCp6kHiqtCJ+ECJEVh32EbF84=; b=Mb/iXXHrTbqfnAgt+sK4YpvV3JTqjU/nvdA3nVj+XpfHUEiHqdYe8O1W71MzwxDkuOPFhe EgExR2+ulMOXFgGSavlfeipWWgx/meYdaA8V5S3x6V7sXaZkYUYo+btJskxG9PTLnVRuPY PdstgzjNbT7l9durxFemwMdzpBvNzoZqqRlyPdqqjYa3DDtF31F5luVE/URgDurx4w5CLE SYtYUGeUzu5zjBNGaYgi6jdl0Zv8vm7aZ9gvsbgMcz2YRCODkx/MDqGhyCLRNR4Uyo+Joy JN4qXRx3Ew+JlC2WJe456klvyNdkAwQ+ZMyNCN9DbGGy+PfRCTyFDIAvonk49g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679073351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IKBcKNvQb8Dd2AueR4yCp6kHiqtCJ+ECJEVh32EbF84=; b=t0PD6ah9xvS+TAngxo7Al0FZ4dpkQVKHR/76Ysjnr5pCgCkBRNdYj89KzgQzCqTJwPc+3f q/1aRpiU6v/qWVR4gD2ymjaAFPibzgesFKWdCL2Al4x2BpXkwKHy0A5ACw3vCAiIyq/2RU jIuw4XBpHKGer3HWn2tX3uxFgI2saZ/QYPbw9k224/GICZ+5GnDsJfbsUbeZLCqaRqmkjF MZ1pqFM/BfWJ8BEmO51rlz6a+eDdHMVnPoN0IdSYcv43wzb6AtCBEgkA6F+lOAWfSs5ayz 6RitqA+17TRDJb88S35Pqm9BR9wx/9Q4NxkK5fc6lW2gndFADqgj8/b2IciT2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679073351; a=rsa-sha256; cv=none; b=Bg+ckZDyhKemup2H4VC8qlk9SH92SnNStnlqAgbp1yYl9d/JDNyg4v+a3wVDrlOLQPNVBF 4h3PCq4NQH66hU7VOhpLGQlsUdFgnoq2trkhrtCvoCrAHuz7+AwUCR8WUZnoM8h7u4Nu6X ATuj1yBSOGg7rVbjHsz+x7a2YP4rgjlLusKklco5M6miMKdmMuH21tUkofF3T7w/PLrp++ yiq4lbcgi6EczN6SxcmUjsGBnDBhwB0hgbnvEpmplwkzj5yIdM+5zpP29r1JghnSS9TENk sDsfOvRYIGezFWCpF5rO5CI9QtXGB47l8OOlPkdiuAr1QLB7AUc+qEIWnLvBpg== Received: from hal.tijl.coosemans.org (unknown [IPv6:2a02:a03f:894b:4700:750a:4519:2272:b3dd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: tijl) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PdW466fqzz15jp; Fri, 17 Mar 2023 17:15:50 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Date: Fri, 17 Mar 2023 18:15:47 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Colin Percival Cc: Mark Millard , Current FreeBSD , FreeBSD-STABLE Mailing List , Baptiste Daroussin Subject: Re: I just updated to main-n261544-cee09bda03c8 based (via source) and now /etc/machine-id and /var/db/machine-id disagree ; more Message-ID: <20230317181547.4d75e897@hal.tijl.coosemans.org> In-Reply-To: <2cf7d953-2493-9673-5ea3-fba22c694015@freebsd.org> References: <2cf7d953-2493-9673-5ea3-fba22c694015@freebsd.org> List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On Thu, 16 Mar 2023 16:48:40 -0700 Colin Percival wrote: > I think the current situation should be sorted out aside from potential issues > for people who upgraded to a "broken" version before updating to the latest > code -- CCing bapt and tijl just in case since they're more familiar with this > than I am. > > Colin Percival > > On 3/16/23 15:55, Mark Millard wrote: >> # cat /etc/hostid /etc/machine-id /var/db/machine-id >> a4f7fbeb-f668-11de-b280-ebb65474e619 >> a4f7fbebf66811deb280ebb65474e619 >> 7227cd89727a462186e3ba680d0ee142 >> >> (I'll not be keeping these values for the example system.) >> >> # ls -Tld /etc/hostid /etc/machine-id /var/db/machine-id >> -rw-r--r-- 1 root wheel 37 Dec 31 16:00:18 2009 /etc/hostid >> -rw-r--r-- 1 root wheel 33 Mar 16 15:16:18 2023 /etc/machine-id >> -r--r--r-- 1 root wheel 33 Mar 3 23:03:25 2023 /var/db/machine-id >> >> I observed the delete-old-files deleting >> /etc/machine-id during the upgrade. It did >> nothing with /var/db/machine-id . delete-old deletes /etc/rc.d/machine-id, etcupdate deletes /etc/machine-id. I suppose delete-old could also delete /var/db/machine-id but the file is harmless so I don't think this is important for 13.2. >> Also, modern hostid generation was switched to >> random to avoid an exposure. But the update kept >> the old hostid and propogated it (not "-"s) into >> /etc/machine-id . So /etc/machine-id now has the >> same exposure. These files are meant to remain constant across reboots, so the update process cannot change an existing /etc/hostid. For example, it is used by NFS servers to restore state when a client crashes and reboots. If nothing relies on the old ID you can generate a new one by running "uuidgen -r > /etc/hostid" and rebooting the machine. >> Later I'll see if stable/13 also got such behavior >> for its upgrade. >> >> I've not been dealing with releng/13.2 but upgrades >> from releng/13.1 and before likely have the same >> questions for what the handling should be vs. what it >> might actually be. Different ways of upgrading might >> not be in agreement, for all I know.