networkop / cx

Containerised Cumulus VX
19 stars 4 forks source link

Unable to add bridges to a running container #10

Open ramobis opened 1 year ago

ramobis commented 1 year ago

Hi @networkop

First of all great work on this! Really cool to have this router available in a container.

I am working for a network institute at a Swiss university and I am preparing a network lab about EVPN.

To do this I use version 5.3 of the cx image.

I'm currently following this guide to configure EVPN Symmetric Routing. https://docs.nvidia.com/networking-ethernet-software/cumulus-linux-53/Network-Virtualization/Ethernet-Virtual-Private-Network-EVPN/Configuration-Examples/

But I fail with this command. nv set interface bond1-3 bridge domain br_default

It is supposed to create the bridge br_default and assign the interface bond1 to bond3 to the bridge.

So I am trying to apply this:

root@leaf-02:/# nv config diff           
- set:
    interface:
      bond1-3:
        bridge:
          domain:
            br_default: {}

And I get the following error:

root@leaf-02:/# nv config apply
Unable to restart services (ifreload-nvue.service):
  Job for ifreload-nvue.service failed because the control process exited with error code.
During restart of ifreload-nvue.service:
  Failed to start ifreload wrapper service (for NVUE compatibility).

Failure during apply. Ignore? [y/N] N
apply_fail [rev_id: 5]
  Rolling back to rev_5_apply_2/start
applied [rev_id: rev_5_apply_2/start]

In my syslog I got only one error message which is this one:

2023-04-12T15:37:39.167819+00:00 leaf-02 ifreload[34180]: error: br_default: netlink: br_default: cannot set dev br_default address 29:26:5b:8c:b3:02: operation failed with 'Cannot assign requested address' (99)

Do you think it might be related to that the router is running in a container?

Those are the links present inside the container.

root@leaf-02:/# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: mgmt: <NOARP,MASTER,UP,LOWER_UP> mtu 65575 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether ca:27:9f:39:b0:30 brd ff:ff:ff:ff:ff:ff
5: eth0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue master mgmt state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether ce:30:97:cf:92:27 brd ff:ff:ff:ff:ff:ff
19: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether ea:63:84:1d:ab:0b brd ff:ff:ff:ff:ff:ff
20: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 02:79:10:07:14:c4 brd ff:ff:ff:ff:ff:ff
21: bond3: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether aa:58:e8:39:4b:6d brd ff:ff:ff:ff:ff:ff
732: swp0@if733: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether e6:e3:6c:b2:35:d9 brd ff:ff:ff:ff:ff:ff link-netnsid 0
734: swp1@if735: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 92:ba:51:a9:14:ef brd ff:ff:ff:ff:ff:ff link-netnsid 0
736: swp2@if737: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 12:d5:3c:3c:eb:dc brd ff:ff:ff:ff:ff:ff link-netnsid 0
738: swp3@if739: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 96:27:2d:c0:45:b3 brd ff:ff:ff:ff:ff:ff link-netnsid 0
740: swp4@if741: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc noqueue master bond1 state UP mode DEFAULT group default qlen 1000
    link/ether ea:63:84:1d:ab:0b brd ff:ff:ff:ff:ff:ff link-netnsid 0
742: swp5@if743: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc noqueue master bond2 state UP mode DEFAULT group default qlen 1000
    link/ether 02:79:10:07:14:c4 brd ff:ff:ff:ff:ff:ff link-netnsid 0
744: swp6@if745: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc noqueue master bond3 state UP mode DEFAULT group default qlen 1000
    link/ether aa:58:e8:39:4b:6d brd ff:ff:ff:ff:ff:ff link-netnsid 0

And important to mention at this point is that I renamed the swp0-6 from eth0-6 using the ip link command in a script during runtime. And the eth0 interface is now just a dummy interface as we don't need management access (might also be something which could mess it up).

Thank you really much for any feedback on this as I'm really new to Cumulus :)