fix(opennebula): coerce MTU to int in gen_conf()#6856
Merged
blackboxsw merged 1 commit intocanonical:mainfrom May 1, 2026
Merged
fix(opennebula): coerce MTU to int in gen_conf()#6856blackboxsw merged 1 commit intocanonical:mainfrom
blackboxsw merged 1 commit intocanonical:mainfrom
Conversation
9b98d75 to
40066d1
Compare
ONE_CONTEXT passes ETHx_MTU as a string, but Netplan's network-config-v2 schema requires mtu to be an integer. Without this, cloud-init schema validation fails with "'1500' is not of type 'integer'".
40066d1 to
21bf1c1
Compare
2 tasks
blackboxsw
approved these changes
May 1, 2026
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
Thanks for the quick fix there @mcanevet +1 on this correction and changset. I can confirm failures on py 3.14 without this 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.
Proposed Commit Message
```
fix(opennebula): coerce MTU to int in gen_conf()
ONE_CONTEXT passes ETHx_MTU as a string, but Netplan's network-config-v2
schema requires mtu to be an integer. Without this,
cloud-init schema --systemfails with "'1500' is not of type 'integer'".```
Additional Context
Discovered while backporting to cloud-init 25.1.4-1+deb13u1 (trixie).
The fix is a one-liner:
int(mtu)ingen_conf(). The accompanying testexpectation updates (
"1280"→1280) reflect the corrected behaviour.The regression is caught by the schema validation fixture introduced in #6855.
With that PR,
test_gen_conf_mtu,test_eth0_v4v6_override, andtest_multiple_nicsall fail before this fix and pass after.Test Steps
Boot an OpenNebula VM with
ETH0_MTUset in the context, then run:Before this fix, the command fails with:
After this fix, validation passes.
Merge type