feat(opennebula): support ETHx_METHOD and ETHx_IP6_METHOD#6814
Open
mcanevet wants to merge 1 commit intocanonical:mainfrom
Open
feat(opennebula): support ETHx_METHOD and ETHx_IP6_METHOD#6814mcanevet wants to merge 1 commit intocanonical:mainfrom
mcanevet wants to merge 1 commit intocanonical:mainfrom
Conversation
22a11c2 to
ec4a406
Compare
cloud-init's OpenNebula datasource always generated static Netplan configuration, ignoring ETHx_METHOD and ETHx_IP6_METHOD entirely. Add get_method() and get_ip6_method() helpers and rework the IPv4/IPv6 blocks in gen_conf() to branch on the configured method: IPv4 (ETHx_METHOD): - static (default): existing behaviour, no regression - dhcp: emit dhcp4: true, no addresses - skip: omit interface from Netplan output entirely IPv6 (ETHx_IP6_METHOD): - static (default when ETHx_IP6 or ETHx_IP6_GATEWAY is present): existing behaviour - dhcp/dhcp6: emit dhcp6: true - auto/slaac: emit accept-ra: true - disable/skip: suppress all IPv6 config
ec4a406 to
e7733bf
Compare
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.
Proposed Commit Message
Additional Context
Part of a series bringing cloud-init's OpenNebula datasource to feature
parity with the context-linux package from one-apps.
The
get_ip6_method()helper infers the default IPv6 method from context:if
ETHx_IP6orETHx_IP6_GATEWAYis present, it defaults tostatic;otherwise
disable. This preserves backwards-compatible behaviour for allexisting tests.
Test Steps
In an OpenNebula VM context, set:
ETH0_METHOD="dhcp"After boot, verify the interface obtains its IP via DHCP (no static
address in
ip addr show).For IPv6 SLAAC:
ETH0_IP6_METHOD="auto"After boot, verify
ip addr showshows a SLAAC-derived IPv6 address.Merge type