From 5c9456a8a3e41ed849333446b622f124906d4eb5 Mon Sep 17 00:00:00 2001 From: Wen Liang Date: Fri, 7 Oct 2022 09:22:09 -0400 Subject: [PATCH] bond: attach ports when creating the bonding connection When ports are not attached, the bonding connection may risk not in fully connected state, e.g. connecting (getting IP configuration). Therefore, attach ports for the bonding connection. Signed-off-by: Wen Liang --- tests/playbooks/tests_bond_options.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/playbooks/tests_bond_options.yml b/tests/playbooks/tests_bond_options.yml index 5d00eee..f64854d 100644 --- a/tests/playbooks/tests_bond_options.yml +++ b/tests/playbooks/tests_bond_options.yml @@ -126,6 +126,18 @@ arp_ip_target: 192.0.2.128 arp_validate: none primary: "{{ dhcp_interface1 }}" + # add an ethernet to the bond + - name: "{{ port1_profile }}" + state: up + type: ethernet + interface_name: "{{ dhcp_interface1 }}" + controller: "{{ controller_profile }}" + # add a second ethernet to the bond + - name: "{{ port2_profile }}" + state: up + type: ethernet + interface_name: "{{ dhcp_interface2 }}" + controller: "{{ controller_profile }}" - command: cat /sys/class/net/{{ controller_device }}/bonding/'{{ item.key }}' name: "** TEST check bond settings"