GNU bug report logs - #64616
[PATCH 0/1] services: static-networking: Add support for bonds and vlans

Previous Next

Package: guix-patches;

Reported by: Alexey Abramov <levenson <at> mmer.org>

Date: Fri, 14 Jul 2023 15:31:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#64616: closed ([PATCH 0/1] services: static-networking: Add
 support for bonds and vlans)
Date: Wed, 11 Oct 2023 17:02:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 11 Oct 2023 19:00:35 +0200
with message-id <87h6mxt7po.fsf <at> gnu.org>
and subject line Re: [bug#64616] [PATCH v2] services: static-networking: Add support for bonding.
has caused the debbugs.gnu.org bug report #64616,
regarding [PATCH 0/1] services: static-networking: Add support for bonds and vlans
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
64616: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64616
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alexey Abramov <levenson <at> mmer.org>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/1] services: static-networking: Add support for bonds and
 vlans
Date: Fri, 14 Jul 2023 17:29:58 +0200
Hi Guix!

After new release of guile-netlink, I made some changes on a guix side to be
able to configure bonds and vlans using static-networking declaration.

In short, I introduced two more structures for *matching* existing interfaces:
<network-link-by-macaddress> and <network-link-by-name>. The reason for that
is that <network-link> struct creates new interfaces in network-set-up/linux.
And if we want to construct a bond we need a way to apply settings for
existing interfaces.

With these changes applied, it is passable to do something like this:

(static-networking
 (links (list (network-link
               (name "bond0")
               (type "bond")
               (arguments '((mode . "802.3ad")
                            (miimon . 100)
                            (lacp-active . "on")
                            (lacp-rate . "fast"))))

              (network-link-by-macaddress
               (macaddress "98:11:22:33:44:55")
               (arguments '((master . "bond0"))))
              (network-link-by-macaddress
               (macaddress "98:11:22:33:44:56")
               (arguments '((master . "bond0"))))

              (network-link
               (name "bond0.1055")
               (type "vlan")
               (arguments '((id . 1055)
                            (link . "bond0"))))))
 (addresses (list (network-address
                   (value "192.168.1.4/24")
                   (device "bond0.1055")))))

This example is taken from the test, where I removed interface renaming
step. You should also know that network stack in Qemu won't with this
configuration.  The purpose of the test was to check if the stack has proper
settings.  If it is not enough, Please let me know.  I can try to use
openvswitch for that

There is one thing that bothers me. Here is a comment I put in the code:

It is interesting that "modprobe bonding" creates an interface bond0 straigt
away.  If we won't have bonding module, and execute `ip link add name bond0
type bond' we will get

RTNETLINK answers: File exists

This breaks our configuration if we want to use `bond0' name.  Create (force
modprobe bonding) and delete the interface to free up.  As you can see I
create an interface bond0 (in case some bonds are in configuration). It is
forces netlink to load the bonding module and then delete it to free up the
'name'.

Please let me know what you think.

Alexey Abramov (1):
  services: static-networking: Add support for bonding.

 doc/guix.texi            |  61 ++++++++++++++++-
 gnu/services/base.scm    | 109 +++++++++++++++++++++++++++---
 gnu/tests/networking.scm | 141 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 299 insertions(+), 12 deletions(-)

-- 
2.40.1



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Alexey Abramov <levenson <at> mmer.org>
Cc: 64616-done <at> debbugs.gnu.org
Subject: Re: [bug#64616] [PATCH v2] services: static-networking: Add support
 for bonding.
Date: Wed, 11 Oct 2023 19:00:35 +0200
Hi Alexey,

Alexey Abramov <levenson <at> mmer.org> skribis:

> * gnu/services/base.scm (<network-link>): Add mac-address field. Set
> type field to #f by default, so it won't be mandatory. network-link
> without a type will be used for existing interfaces.
> (assert-network-link-mac-address, mac-address?): Add sanitizer. Allow
> valid mac-address or #f.
> (assert-network-link-type): Add sanitizer. Allow symbol or #f.
> * gnu/services/base.scm (network-set-up/linux,
> network-tear-down/linux): Adapt to new structure.
> * doc/guix.texi (Networking Setup): Document it.
> * gnu/tests/networking.scm (run-static-networking-advanced-test): New
> variable.

Finally applied, thank you!

Ludo’.


This bug report was last modified 1 year and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.