ceos: support remapping and manual wiring of the management interface - #3220
ceos: support remapping and manual wiring of the management interface#3220philsphicas wants to merge 1 commit into
Conversation
Derive the EOS management interface name from the MGMT_INTF environment variable so that MGMT_INTF=ma1 yields a usable Management1 (and maN -> ManagementN in general). When attached to the runtime management network, the runtime-provided eth0 is renamed to the requested maN netdev before init so the management address and reachability are preserved. The management interface can also be wired as a regular point-to-point link to another node by setting network-mode: none and using a maN link endpoint that matches MGMT_INTF. In that mode no management address is assigned by the runtime; it is taken from the link addresses or left to the startup-config. Only maN values are special-cased. Any other MGMT_INTF value (including the eth0 default) keeps the previous behaviour unchanged; a non-eth0, non-maN value is passed through to cEOS and logged with a warning.
|
Hi @hellt and @ankudinov - would appreciate your feedback on this when you get a chance. I know mgmt-interface naming has been discussed before (#3037 et al.), and I tried to address the concerns raised in those earlier discussions - it's explicit opt-in ( |
|
@philsphicas Thank you for submitting this PR. Mgmt interfaces on cEOS-lab definitely need fixing.
|
|
@ankudinov Thanks, that helps. Letting the image take care of the mapping definitely sounds like the best approach. Two smaller things I'd still like to do, separately:
|
|
we've discussed this with @ankudinov at the conference, and it seems we agree that ceos will handle the interface mapping of the bits related to mapping of the maN interfaces with |
|
@philsphicas |
|
Hi @ankudinov and @hellt ... Thanks very much for the feedback! I created #3237 and will abandon this one. My feelings on the new PR are slightly mixed. It maintains the invariant that Either way, we need to manually insert an interface - the other option is to insert it as Unfortunately, I won't be able to work on it for a couple of weeks ... if you need to make edits, feel free, otherwise I will resume in the first week of July. |
|
this begs the question if then we should wait for Ma1 to arrive first and then revisit this problem with a cleaner approach? |
|
This is slightly orthogonal to the future change. Once you do network mode none, eth0 is gone. To wire the management interface, we need to plumb a new interface. The main question is: do you care what the interface is named at the OS level? Creating it as eth0 (what the change does) is compatible with INTF_MAP_ETH0 and lets cEOS map correctly (to ManagementX) but you still reference it as eth0 in the links. Creating the interface as ma0 (or ma1 etc.) still lets cEOS do the mapping, and allowing wiring as maX, but it violates the principle that "eth0 is always the management interface". |
Adds two opt-in management-interface options to the cEOS kind.
MGMT_INTF: maNexposes the management interface asManagementN(e.g.Management1) while still using the containerlab management network and its assigned address.Management1is the management interface name used by vEOS and physical EOS switches, so startup-configs and automation written for those devices can be reused without renaming the management interface.network-mode: none, the management interface can be wired as a regular link to another node — cabled directly to a management host, or to a management switch that aggregates several nodes' management ports. No management address is assigned unless the link (or startup-config) provides one, so the interface only comes up addressed when the wiring is actually in place.The default is unchanged: without
MGMT_INTF(or witheth0) the node keepsManagement0on the management network. Any non-maNvalue is passed through to cEOS with a warning. The legacyMAPETH0flag (a no-op on current cEOS images) is dropped automatically whenmaNis used.Docs: new Management interface section on the cEOS kind page.
Tested with
arista_ceos:Management0on the management network),MGMT_INTF: ma1on the management network (usableManagement1, reachability preserved),ma1wired to a Linux node withnetwork-mode: none(no auto address; address from the link).Relates to #3037, #1469, #389, #2019.