Subject: Re: bug#52511: service networking provided more than once

From: Ludovic Courtès <[email-masked]>
Date: Wed, 15 Dec 2021 14:28:36 +0100

Hi!

Mathieu Othacehe <[email-masked]> skribis:

> When using this service:
>
> (service static-networking-service-type
>           (list (static-networking
>                  (addresses
>                   (list
>                    ;; Connection to the DMZ for public access
>                    ;; This is a 10G port.
>                    (network-address
>                     (device "eno2")
>                     (value "141.80.181.40/24"))))
>                  (routes
>                   (list (network-route
>                          (destination "default")
>                          (gateway "141.80.181.1")))))
>                 (static-networking
>                  (addresses
>                   (list
>                    ;; Connection to build nodes
>                    (network-address
>                     (device "eno1")
>                     (value "141.80.167.131/26")))))))
>
>
> I have the following error message:
>
> service networking provided more that once
>
> I guess it boils down to tweak the "provision" field accordingly, but it
> should be automated or documented properly.

In this particular case, you could/should have a single
‘static-networking’ with multiple addresses:

  (static-networking
    (addresses
      (list (network-address …)
            (network-address …)))
    (routes …))

I’m not sure if there are other situations where this limitation is
problematic.

WDYT?

Thanks,
Ludo’.