Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cleanup issues of bond interface #2907

Merged

Conversation

FarooqAbdulla02
Copy link
Contributor

This code fixes the cleanup issues of bonding interfaces by flushing the IP address using nmcli command and restoring back the original IP cnfiguration file.

This code fixes the cleanup issues of bonding interfaces by
flushing the IP address using nmcli command and restoring back
the original IP cnfiguration file.

Signed-off-by: Shaik Abdulla <[email protected]>
@FarooqAbdulla02
Copy link
Contributor Author

root@ltcden7-lp5-test:/avocado-fvt-wrapper/tests/avocado-misc-tests/io/net# avocado run bonding.py -m bonding.py.data/bonding_virtual.yaml --execution-order tests-per-variant --max-parallel-tasks=1
JOB ID : d82c84a487d7c97de020a46984ebc761991825f5
JOB LOG : /root/avocado-fvt-wrapper/results/job-2024-10-13T12.03-d82c84a/job.log
(1/6) bonding.py:Bonding.test_setup;run-Test-active-backup-1a2b: STARTED
(1/6) bonding.py:Bonding.test_setup;run-Test-active-backup-1a2b: PASS (21.34 s)
(2/6) bonding.py:Bonding.test_run;run-Test-active-backup-1a2b: STARTED
(2/6) bonding.py:Bonding.test_run;run-Test-active-backup-1a2b: PASS (339.05 s)
(3/6) bonding.py:Bonding.test_cleanup;run-Test-active-backup-1a2b: STARTED
(3/6) bonding.py:Bonding.test_cleanup;run-Test-active-backup-1a2b: PASS (18.93 s)
(4/6) bonding.py:Bonding.test_setup;run-Test-802.3ad-a167: STARTED
(4/6) bonding.py:Bonding.test_setup;run-Test-802.3ad-a167: PASS (21.11 s)
(5/6) bonding.py:Bonding.test_run;run-Test-802.3ad-a167: STARTED
(5/6) bonding.py:Bonding.test_run;run-Test-802.3ad-a167: PASS (338.87 s)
(6/6) bonding.py:Bonding.test_cleanup;run-Test-802.3ad-a167: STARTED
(6/6) bonding.py:Bonding.test_cleanup;run-Test-802.3ad-a167: PASS (19.02 s)
RESULTS : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /root/avocado-fvt-wrapper/results/job-2024-10-13T12.03-d82c84a/results.html
JOB TIME : 782.10 s
root@ltcden7-lp5-test:
/avocado-fvt-wrapper/tests/avocado-misc-tests/io/net# cat bonding.py.data/bonding_virtual.yaml
Test: !mux
active-backup:
bonding_mode: "1"
802.3ad:
bonding_mode: "4"
bond_interfaces: "env9 env10"
host_ips: "192.168.101.102 192.168.201.102"
netmask: "255.255.255.0"
peer_ips: "192.168.101.175 192.168.201.175"
peer_interfaces: "env10 env8"
peer_public_ip: "9.53.174.1x"
peer_password: "xxxx"
bond_name: "bondtest"
user_name: "root"
peer_bond_needed: False
peer_wait_time: "20"
sleep_time: "10"
mtu: "1500"
fail_over_mac: "0"

Note: currently changes supports only for local bond interfaces, and "peer_bond_needed" should be "False"

@abdhaleegit abdhaleegit self-assigned this Oct 14, 2024
@abdhaleegit
Copy link
Collaborator

@FarooqAbdulla02 so you will be sending separate PR for nm_flush_ipaddr ?

@abdhaleegit
Copy link
Collaborator

waiting for avocado-framework/avocado#6042

@abdhaleegit abdhaleegit self-requested a review October 18, 2024 07:24
Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abdhaleegit abdhaleegit merged commit 3c6069c into avocado-framework-tests:master Oct 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants