From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iJcrCtmcz2NI9wAAbAwnHQ (envelope-from ) for ; Tue, 24 Jan 2023 09:54:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KLFZCdmcz2OcAgEAG6o9tA (envelope-from ) for ; Tue, 24 Jan 2023 09:54:49 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E70A2FC3E for ; Tue, 24 Jan 2023 09:54:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKF4G-0003Te-Uc; Tue, 24 Jan 2023 03:54:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKF46-0003Qq-G2 for guix-patches@gnu.org; Tue, 24 Jan 2023 03:54:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKF46-0002yt-33 for guix-patches@gnu.org; Tue, 24 Jan 2023 03:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKF45-0003TU-PA for guix-patches@gnu.org; Tue, 24 Jan 2023 03:54:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60735] [PATCH v2 2/3] system: Deprecate hosts-file. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Jan 2023 08:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60735 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: 60735@debbugs.gnu.org Received: via spool by 60735-submit@debbugs.gnu.org id=B60735.167455042713334 (code B ref 60735); Tue, 24 Jan 2023 08:54:01 +0000 Received: (at 60735) by debbugs.gnu.org; 24 Jan 2023 08:53:47 +0000 Received: from localhost ([127.0.0.1]:55826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKF3r-0003T0-6m for submit@debbugs.gnu.org; Tue, 24 Jan 2023 03:53:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKF3q-0003Sn-74 for 60735@debbugs.gnu.org; Tue, 24 Jan 2023 03:53:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKF3k-0002t8-8T; Tue, 24 Jan 2023 03:53:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=bggO+lvyzUKNRvlfBQsMTzh6PYkqCIM7wOt+q9hgUEo=; b=ljkhUP72VSl4KmMUF8Y5 9yD9+hR/Xt3U9lKCnkdCH09gx8AyC/ZjLq2WIhlZ8jqfBW7rfs+X6+Mx3lktZ0Kf+qQhSzHKacp3U lKKDcCn+Bs8nQ03zMzHtTa6EoO1iGAOpxlxBPH39npkqCQSlL3QxwJBkZNBmpHX9bY56acwuIAOsW Kid99Lo3FA2VnALgyCho5SF7cclsrhqavPv7sQBsl4JAkDqy2aPbcJWLWaqpjCtfL22nObJqOeVc/ ztUm++nAanPh01dPySKmTghpNAjbp0TMMEOGSfMf2tCQKU+RAbmPltWY7Obb8rEUbnRObRpOAMCfN Pppx2UZjaZHzgQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKF3j-0000ms-H9; Tue, 24 Jan 2023 03:53:39 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87o7qoyj0i.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?UTF-8?Q?Pluvi=C3=B4se?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Taureau X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 24 Jan 2023 09:53:37 +0100 In-Reply-To: (Bruno Victal's message of "Mon, 23 Jan 2023 23:19:00 +0000") Message-ID: <87tu0gwbxq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674550488; a=rsa-sha256; cv=none; b=R7+3GS4cDQ+WriEi28Lhsacn9aYFFPPkXw+7KOhq7spLdDsO5U/UsbLRVjQoQW58Tuw4FP 1qrGoQEC7qIXdXnZMCkZEp15K+qg1L16UTPk0xk+0VwwRdLUyTqO2sZRmhSJq2kb7GpPxo Q26ocu1/n9oIHajPJDD4xewN4VkCNgSwcnm6v/QjXAPwZlxf6cGHQP9QF69Y6VwMNgk3v8 DeCBz4Ukx3EptpPDNVyJacRgJIZDgdDiKuafcgiXVUM9MDRuQCCS09MdhhW6nce9TwNycK 60hepsf6bZQAn+j5Y99n9ieyY9ZGX74p4FK7lfsRFu6bCERRdyAYe/39e9exqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674550488; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bggO+lvyzUKNRvlfBQsMTzh6PYkqCIM7wOt+q9hgUEo=; b=ZDkxxLTGv+fZllfrPkzP2WwKXMIuELvjLmMTScMLCH6+W8WGnhdRNAgNbNmTtMJfuJaF1v tEH2FkpVh6PIBpZZ2YiQH+EcRzEob1WuH6qJkcfWj3dN69gjXG9einqKmAOJ/2Qc1WYrIS LZOtYzNnO2+wqfo5MZEcGz9dqZw/ZJT7f7fSGEi0w37U9CYE2CJ6g9zJzzZutsCgx267Et hoqpK1vhoqTdexvC0xh7V/NDaZ8/N8Q7lQpJP+76tMVOxkz8K9jtS+EM0XkHcIFZT+7ro3 ZXYxBhB5eJa2gcw31YvoqfUuyJPPCNJfyU2KYGzWqvvNRCb9Bbwl+4JF6fVlsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ljkhUP72; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.59 X-Spam-Score: -3.59 X-Migadu-Queue-Id: 9E70A2FC3E Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ljkhUP72; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: fFuybVKWAkWW Hi Bruno! Bruno Victal skribis: > On 2023-01-23 22:37, Ludovic Court=C3=A8s wrote: >> Bruno Victal skribis: >>=20 >>> --- >>> >>> WIP, the ganeti tests fail because host-name is added as an alias of lo= calhost. >>=20 >> Before these patches, =E2=80=98host-name=E2=80=99 was already an alias o= f =E2=80=98localhost=E2=80=99. >> Is there something else interfering? > > In some cases, it's not desired for host-name to be an alias of localhost. > The ganeti tests did this by passing a hosts-file file-like object where > host-name wasn't an alias of localhost. Oh, I see. > I've brainstormed a bit on this and here's what I thought: > > Approach 1 (DOESN'T WORK): > * hosts-service-type in essential-services (gnu/systems.scm), default val= ue: > 127.0.0.1 localhost > ::1 localhost > * simple-service extension on base-services (gnu/services/base.scm): > \\FLOPS since both /etc/hosts and /etc/hostname are provisioned with act= ivation-service-type. > This means we can't write /etc/hosts AFTER /etc/hostname or host-name-se= rvice-type is ready. > > Approach 2: > * NO /etc/hosts in essential-services (is this possible?) > * is an absent /etc/hosts (or absent %base-services) a valid OS? > * Value set in %base-services, hosts-service-type as a ONE-SHOT shepherd = service. > * Can be changed with modify-services. > * It's a one-shot shepherd service since we're depending on /etc/hostnam= e which is activation-service-type. (we're depending on either etc-service-= type or host-name-service-type) > > Approach 3: > * Do not set our hostname as an alias of localhost by default. > * Manpage doesn't seem to make this mandatory, in fact, our hostname can= point to any IP. (it says 'often', not 'mandatory') > * We only set localhost name. > * Is this mandatory? If not, there might be cases where this entry is u= ndesired. Wait, why don=E2=80=99t we keep =E2=80=98hosts-service-type=E2=80=99 in =E2= =80=98essential-services=E2=80=99, with the localhost/host-name alias, and have =E2=80=98%ganeti-os=E2=80=99 i= n (gnu tests ganeti) modify its essential services to get what it wants? As in: (operating-system ;; =E2=80=A6 (essential-services (modify-services (operation-system-default-essential-services this-op= erating-system) (hosts-service-type config =3D> =E2=80=A6)))) Granted, that=E2=80=99s a bit verbose :-), but it should do the job just li= ke setting =E2=80=98hosts-file=E2=80=99 currently in =E2=80=98master=E2=80=99,= no? >> It doesn=E2=80=99t matter because it=E2=80=99s removed in the commit tha= t follows I >> think using =E2=80=98string-tokenize=E2=80=99 instead of =E2=80=98string= -split=E2=80=99 may bring >> simplifications. > > It was added because otherwise the "split" commits would seem to be missi= ng some context. > I can leave it as is, delete it here or try your suggestion. Yeah leave it as is. >>> + #:use-module (guix discovery) >>=20 >> Do we really need this module? > > IIRC this was for the deprecated procedures to work. Can they work withou= t this module? Yes, =E2=80=98define-deprecated=E2=80=99 is defined in (guix deprecation). Thanks! Ludo=E2=80=99.