cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

fix(openstack): correct bond parameter translation for sysconfig

Open ftarasenko opened this issue 1 month ago • 3 comments

Fix regression in bond parameter handling when using OpenStack network_data.json with sysconfig renderer.

The issue occurred when translating bond parameters from OpenStack format (bond_xmit_hash_policy) to cloud-init format. The previous implementation only replaced "bond_" prefix with "bond-", leaving remaining underscores unchanged. This created a mixed format like "bond-xmit_hash_policy" which didn't match either lookup variant in the sysconfig renderer:

  • bond_xmit_hash_policy (all underscores)
  • bond-xmit-hash-policy (all hyphens)

As a result, bond options like xmit_hash_policy and lacp_rate were silently dropped from BONDING_OPTS in sysconfig rendering.

The fix replaces ALL underscores with hyphens, ensuring parameters match the expected format in sysconfig renderer.

Before: BONDING_OPTS="mode=802.3ad" After: BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer3+4 lacp_rate=fast"

Affects versions: 24.4+

Proposed Commit Message

fix: correct handling of bonding options in network_data.json

Fix regression in bond parameter handling when using OpenStack network_data.json with sysconfig renderer.

Additional Context

Test Steps

Merge type

  • [x] Squash merge using "Proposed Commit Message"

ftarasenko avatar Nov 14 '25 10:11 ftarasenko

Thanks for this contribution @ftarasenko. Can you please sign the CLA?

holmanb avatar Nov 20 '25 18:11 holmanb

@holmanb Oh, sorry — I thought I had already signed the CLA. I’ll take a look at the failing test. I don’t yet see why it’s failing, since with this commit bonding was working correctly on the RHEL image.

ftarasenko avatar Nov 21 '25 10:11 ftarasenko

Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.

If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon.

(If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.)

github-actions[bot] avatar Dec 14 '25 00:12 github-actions[bot]