When xr-compose processes a topology with a macvlan management network, it generates XR_MGMT_INTERFACES using an internal network counter (e.g. linux:xr-n120).
Docker names macvlan interfaces inside the container eth0, not xr-n<N>. The generated output is therefore incorrect for macvlan-based management networks and XRd boots up with the management interface mapped to a non-existant container interface.
Current output (8-node SR topology)
XR_MGMT_INTERFACES: linux:xr-n120,xr_name=Mg0/RP0/CPU0/0,chksum,snoop_v4,snoop_v4_default_route
Required value
XR_MGMT_INTERFACES: linux:eth0,xr_name=Mg0/RP0/CPU0/0,chksum,snoop_v4,snoop_v4_default_route
Request
Add a way to specify the Linux interface name for management interfaces, either:
- In the
.xr.yml — e.g. a linux_name field on the mgmt interface entry:
xr_interfaces:
- Mg0/RP0/CPU0/0:
snoop_v4: True
snoop_v4_default_route: True
linux_name: eth0
- As a CLI flag — e.g.
--mgmt-linux-interface eth0, applied globally to all XR_MGMT_INTERFACES entries.
Workaround in use today
I currently post-process the generated file with a script that targets only XR_MGMT_INTERFACES lines and replaces linux:xr-n[0-9]+ with linux:eth0 - https://github.com/CiscoDevNet/XRd-Sandbox/blob/main/scripts/lib/fix-mgmt-interface.sh
When
xr-composeprocesses a topology with a macvlan management network, it generatesXR_MGMT_INTERFACESusing an internal network counter (e.g.linux:xr-n120).Docker names macvlan interfaces inside the container
eth0, notxr-n<N>. The generated output is therefore incorrect for macvlan-based management networks and XRd boots up with the management interface mapped to a non-existant container interface.Current output (8-node SR topology)
Required value
Request
Add a way to specify the Linux interface name for management interfaces, either:
.xr.yml— e.g. alinux_namefield on the mgmt interface entry:--mgmt-linux-interface eth0, applied globally to allXR_MGMT_INTERFACESentries.Workaround in use today
I currently post-process the generated file with a script that targets only
XR_MGMT_INTERFACESlines and replaceslinux:xr-n[0-9]+withlinux:eth0- https://github.com/CiscoDevNet/XRd-Sandbox/blob/main/scripts/lib/fix-mgmt-interface.sh