1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-06 00:07:12 +00:00

nmcli: fix check/diff for bond arp_interval and arp_ip_target (#11588) (#12085)

* nmcli: bond ARP options stop lying in check/diff (#11588)

Align arp_interval/arp_ip_target keys with bond.options parsing, route
ARP settings via +bond.options, and fix bond MTU false positives.

* Changelog: nmcli fragment gets PR links and clearer diff wording

Address reviewer feedback on #12085 — both entries now cite the PR URL
and the MTU entry says "incorrectly reports diff" instead of "false positives".

---------

Co-authored-by: Asif Draxi <asif.draxi@blackline.com>
This commit is contained in:
Asif Draxi 2026-05-23 17:05:40 +05:30 committed by GitHub
parent e6ca0df592
commit fdace38501
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 275 additions and 9 deletions

View file

@ -1941,8 +1941,8 @@ class Nmcli:
if self.type == "bond":
options.update(
{
"arp-interval": self.arp_interval,
"arp-ip-target": self.arp_ip_target,
"arp_interval": self.arp_interval,
"arp_ip_target": self.arp_ip_target,
"downdelay": self.downdelay,
"miimon": self.miimon,
"mode": self.mode,
@ -2474,11 +2474,8 @@ class Nmcli:
if key in self.SECRET_OPTIONS:
self.edit_commands += [f"set {key} {value}"]
continue
if key == "xmit_hash_policy":
cmd.extend(["+bond.options", f"xmit_hash_policy={value}"])
continue
if key == "fail_over_mac":
cmd.extend(["+bond.options", f"fail_over_mac={value}"])
if key in ("xmit_hash_policy", "fail_over_mac", "arp_interval", "arp_ip_target"):
cmd.extend(["+bond.options", f"{key}={value}"])
continue
cmd.extend([key, value])
@ -2680,7 +2677,7 @@ class Nmcli:
elif all(
[
key == self.mtu_setting,
self.type == "dummy",
self.type in ("bond", "bond-slave", "dummy"),
current_value is None,
value == "auto",
self.mtu is None,