feat(netplan): render InfiniBand (IPoIB) interfaces#6927
Open
ArtsiomAntropau wants to merge 2 commits into
Open
feat(netplan): render InfiniBand (IPoIB) interfaces#6927ArtsiomAntropau wants to merge 2 commits into
ArtsiomAntropau wants to merge 2 commits into
Conversation
The netplan renderer's type dispatch only handled physical, bond, bridge and vlan interfaces, so `type: infiniband` links were silently dropped from the generated /etc/netplan/50-cloud-init.yaml. On OpenStack instances (network_data.json -> network config v1) IPoIB interfaces disappeared entirely, even though the eni, sysconfig and network-manager renderers already rendered them. Add an infiniband branch that configures IPoIB devices under `ethernets` (netplan has no dedicated infiniband section), matching on the 20-byte IPoIB hardware address and setting `infiniband-mode: datagram` when an MTU is present, mirroring the NetworkManager renderer. This is possible now that netplan supports IPoIB -- matching the long-form HWADDR and the infiniband-mode key (netplan 0.105, PR canonical#283) -- which was the missing-netplan-support blocker that had LP: #1848471 (GH canonical#3474) closed as won't-fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The netplan renderer's type dispatch only handled physical, bond, bridge and vlan interfaces, so
type: infinibandlinks were silently dropped from the generated /etc/netplan/50-cloud-init.yaml. On OpenStack instances (network_data.json -> network config v1) IPoIB interfaces disappeared entirely, even though the eni, sysconfig and network-manager renderers already rendered them.Add an infiniband branch that configures IPoIB devices under
ethernets(netplan has no dedicated infiniband section), matching on the 20-byte IPoIB hardware address and settinginfiniband-mode: datagramwhen an MTU is present, mirroring the NetworkManager renderer. This is possible now that netplan supports IPoIB -- matching the long-form HWADDR and the infiniband-mode key (netplan 0.105, PR canonical/netplan#283) -- which was the missing-netplan-support blocker that had LP: #1848471 (GH #3474) closed as won't-fix.Proposed Commit Message
Additional Context
The netplan renderer never handled
type: infiniband. The interfaceloop in
Renderer._render_contentonly has branches forphysical/bond/bridge/vlan, so IPoIB interfaces were silently dropped
from the generated netplan, while the eni, sysconfig and
network-manager renderers already rendered them.
This was reported before (GH-3474, LP: #1848471) and closed won't-fix at
the time, because netplan itself couldn't match the 20-byte IPoIB
HWADDR. That blocker is gone: netplan added IPoIB support in 0.105
(canonical/netplan#283), including matching the long HWADDR and the
infiniband-modekey, so the renderer can finally emit it.Practical impact: OpenStack instances with IPoIB links
(network_data.json -> network config v1) get those interfaces missing
from netplan on netplan-default distros; only the ENI renderer
configured them.
The new branch renders IB under
ethernets(netplan has no dedicatedinfiniband section), matches on the HWADDR, and sets
infiniband-mode: datagramwhen an MTU is present, mirroring theNetworkManager renderer. Address/MTU handling reuses
_extract_addresses.Test Steps
Unit tests: added a netplan round-trip case and updated the existing
large_v1fixture, which already contained an IB interface that used tobe dropped.
Manual check on a live system, non-destructive via net-convert:
netplan generateaccepts the output.Merge type