From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4FUUBjF6eWHHSAAAgWs5BA (envelope-from ) for ; Wed, 27 Oct 2021 18:11:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8BerATF6eWGKMAAAbx9fmQ (envelope-from ) for ; Wed, 27 Oct 2021 16:11:29 +0000 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 BB5FF17F7B for ; Wed, 27 Oct 2021 18:11:28 +0200 (CEST) Received: from localhost ([::1]:55502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mflWR-0000rI-RF for larch@yhetil.org; Wed, 27 Oct 2021 12:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfktK-00026x-Sf for guix-patches@gnu.org; Wed, 27 Oct 2021 11:31:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfktK-0006Dp-KK for guix-patches@gnu.org; Wed, 27 Oct 2021 11:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfktK-00013r-DN for guix-patches@gnu.org; Wed, 27 Oct 2021 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51440] [PATCH 00/10] Declarative static networking interface Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51440 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51440@debbugs.gnu.org, ludo@gnu.org X-Debbugs-Original-To: debbugs-submit@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , 51440@debbugs.gnu.org Received: via spool by 51440-submit@debbugs.gnu.org id=B51440.16353486083941 (code B ref 51440); Wed, 27 Oct 2021 15:31:02 +0000 Received: (at 51440) by debbugs.gnu.org; 27 Oct 2021 15:30:08 +0000 Received: from localhost ([127.0.0.1]:50243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfksR-00011I-Gi for submit@debbugs.gnu.org; Wed, 27 Oct 2021 11:30:08 -0400 Received: from lepiller.eu ([89.234.186.109]:36856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfksP-00010s-0F; Wed, 27 Oct 2021 11:30:05 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 41d33272; Wed, 27 Oct 2021 15:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=P2Wqqvzz/97J TzqgAmxyWf1wS6UfGrurXZm2Y7AC1kw=; b=L2XSCUDpSnFRMtU3Vhrb5DCFjQvF 85J4gUo9N/HOzW8nmsP+R+oSabuRsykANqb20bcgcV94Al40jWIJcC1NZ5WxpKo6 /oHQ6i+RpYo/sLuPhUEQmFVwWZQTf7RTU3Sy/bRU1LZlov77oKzIEHZQSNtmHlt5 hwh8TC/BQ9UlsDULZb5eKcoZM/yd6yYA/vM03ue5wrH6AfTQL66a2r/2EUOpak6i 5pIARzovAtEcGES4rts7RFQxqC84F6bpw83oh3QAwbP1hQIwxTl3qCjJZBQs8pwe MKETsvwJh5Vry31iNdFHEnYQ9hZF/rHrUvJVqKvILbMhcpUQzeS1beHyrQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id b05bfbf9 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 27 Oct 2021 15:30:02 +0000 (UTC) Date: Wed, 27 Oct 2021 11:29:47 -0400 From: Julien Lepiller User-Agent: K-9 Mail for Android In-Reply-To: <20211027135918.18833-1-ludo@gnu.org> References: <20211027135918.18833-1-ludo@gnu.org> Message-ID: <98B14704-7A97-4D5A-80CD-6A44DBAEFBC7@lepiller.eu> 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635351088; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=451r/hy5Wzw81UvpofHNtpPKdpnkKP7Jn+z+EFrWSdo=; b=WauO4b58Kwhg8lsZxnE7Q/jmMjNScIq4LoCHZu+meuDEOdUNoZzXtH/++jR2PltUZI/9Lk 5Ylfvk+lu6o55hlCo/TuZ5Tthl8lK7Z4I3ITDw4rpPq7OnUWZ61SS3XEszZeCAspaji4KZ S6UT5vrdG9thmrXQBXRkuUcvMy+gJqwPhB6TAORuOBKkO8MCXFUs12lVFHmY+h/VCbOKGE Fa9SJD0lwCIKezYtFu3vSmkr8ywXRrqYP3otG0Xupst/XjqDQ0Vp0BnVoguecn9n+pYi7H HS/dJRxnpMzcbI5z2Q6wPnpAfV1afaX62MnEJB3+7b0BXbJE1g1wDgBEusb4Eg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635351088; a=rsa-sha256; cv=none; b=JftJp+c8sAgoSPzvz0aS/ZYKPZaV5EkINrAEN5suj7sKjPBCK1+oY6sG18c7hA6d71CtHz qdtaSJrrknhY2Sz4FakXY/ghz8xZkMin1/tGdiGJK3RbNYQBbKrXtUIyAymWsfvQAk3CqB 8NNCNFzT+dVHBxyqaXtWdNwL+0BSe0lVIOtqE8/Y9czw+qcFtyI/J6BPkI8rzOVEGAMnCb rFdKRjyrNjIHmikx5frWlAuG67407sjkGlwD9Fro0fO0Zdfga4wZXFlLx9AsqfWw7b5R7p jB51ygO8vYRV9zYkf3TF7uv1KKrEs11ZKQGPVO8EL6/DNmt97Khuu2HboYnc7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=L2XSCUDp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=L2XSCUDp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: BB5FF17F7B X-Spam-Score: 0.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: 00MkIgM4V5JJ Le 27 octobre 2021 09:59:18 GMT-04:00, "Ludovic Court=C3=A8s" a =C3=A9crit=C2=A0: >Hi! > >This patch set builds on Julien=E2=80=99s neat Guile-Netlink to finally >provide a proper static networking configuration interface=2E One >can now write things like: > > (service static-networking-service-type > ;; Network configuration for one NIC, IPv4 + IPv6=2E > (static-networking > (addresses (list (network-address > (device "eno1") > (value "10=2E0=2E2=2E15/24")) > (network-address > (device "eno1") > (value "2001:123:4567:101::1")))) > (routes (list (network-route > (destination "default") > (gateway "10=2E0=2E2=2E2")) > (network-route > (destination "default") > (gateway "2020:321:4567:42::1")))) > (name-servers '("10=2E0=2E2=2E3")))) > >For the record, the =E2=80=98static-networking-service=E2=80=99 procedure= currently >in =E2=80=98master=E2=80=99 is IPv4-only and would not allow you to assig= n more >than one address to an interface anyway, among other limitations=2E >These long-overdue patches close an embarrassing gap=2E > >The interface provided here is a direct mapping of that of Guile-Netlink, >which is the same as that of the =E2=80=98ip=E2=80=99 command, itself clo= sely >modeled after Linux=E2=80=99s internal interfaces AIUI=2E Thus, it shoul= d be >roughly as expressive as =E2=80=98ip=E2=80=99, but declarative=2E > >I=E2=80=99m not a network person though, so I=E2=80=99d appreciate if mor= e >knowledgeable people would take a look at the interface=2E In particular= , >I=E2=80=99d like to have examples of =E2=80=98links=E2=80=99 to include i= n the manual=E2=80=94I=E2=80=99m not >quite sure how to use that=2E Ideas? > >This patches preserve backward-compatibility: the >=E2=80=98static-networking-service=E2=80=99 procedure still works the sam= e=2E There=E2=80=99s >one observable difference though: there=E2=80=99s only one =E2=80=98netwo= rking=E2=80=99 >Shepherd service now; you no longer get =E2=80=98networking-eno1=E2=80=99= and similar=2E >The =E2=80=98static-networking=E2=80=99 constructor was public since comm= it >c9436025a90b86047ba2203d58bbf238f8f9b2f9 but undocumented; thus I >changed the fields of without worrying about >compatibility=2E > >I tested this with: > > make check-system \ > TESTS=3D"static-networking openvswitch ganeti-kvm dhcpd childhurd" > >I would appreciate more testing, including tests on the bare metal >for IPv6 support=2E > >Ensuring portability to GNU/Hurd took me more time than I=E2=80=99d have >thought, but it works=2E =E2=80=9CLinks=E2=80=9D are not supported there= , and only >=E2=80=9Cdefault=E2=80=9D routes are supported=2E > >I took a detour in commit =E2=80=9CUse Guile-Netlink on GNU/Linux=E2=80= =9D: that >patch shows that I was blissfully hoping to use good=E2=80=99ol ioctls >on GNU/Hurd, but that turned out to be a dead end because they >don=E2=80=99t support IPv6 (which really isn=E2=80=99t a surprise but I d= on=E2=80=99t know, >I must have been lacking focus at that point of my journey!)=2E > >With all this I think we should be able to do =E2=80=9Ccool things with >containers=E2=80=9D, but again, that=E2=80=99s not my area of expertise s= o please >do chime in if you container networking is your thing=2E > >Feedback welcome! > >Ludo=E2=80=99=2E > >Ludovic Court=C3=A8s (10): > tests: Add 'static-networking' test=2E > tests: openvswitch: Check whether ovs0 is up=2E > doc: Add new "Networking Setup" node for the main setup options=2E > gnu: guile-netlink: Allow cross-compilation=2E > services: static-networking: Use Guile-Netlink on GNU/Linux=2E > services: secret-service: Turn into a Shepherd service=2E > services: static-networking: Change interface to mimic netlink=2E > services: Define '%qemu-static-networking'=2E > services: Define '%loopback-static-networking'=2E > tests: Replace uses of deprecated 'static-networking-service'=2E > > doc/guix=2Etexi | 505 ++++++++++++++++++++++---------- > gnu/build/hurd-boot=2Escm | 10 +- > gnu/build/secret-service=2Escm | 17 +- > gnu/packages/guile-xyz=2Escm | 11 +- > gnu/services/base=2Escm | 391 +++++++++++++++++++------ > gnu/services/virtualization=2Escm | 45 ++- > gnu/system/hurd=2Escm | 12 +- > gnu/system/install=2Escm | 5 +- > gnu/tests/ganeti=2Escm | 7 +- > gnu/tests/networking=2Escm | 141 ++++++++- > 10 files changed, 851 insertions(+), 293 deletions(-) > > >base-commit: 0a42998a50e8bbe9e49142b21a570db00efe7491 Looks good at first glance=2E I noticed a few typos in the manual, so I'll= send you more details after I read it more carefully=2E I'll try that on m= y hardware, although again I'm not sure how I can run reconfigure from my c= heckout exactly? (Where do I use sudo, and what options do I need)