avocado-framework-tests / avocado-misc-tests

Community maintained Avocado tests repository
Other
22 stars 123 forks source link

Fix cleanup issues of bond interface for SLES distro. #2912

Closed FarooqAbdulla02 closed 5 days ago

FarooqAbdulla02 commented 3 weeks ago

This code fixes the cleanup issues of bonding interfaces by flushing the IP address using "ip" utility as SLES does not support "nmcli".

FarooqAbdulla02 commented 3 weeks ago

Run logs:

~/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 : be546458779b478ff244ef47c60b27b951f01b27 JOB LOG : /root/avocado-fvt-wrapper/results/job-2024-10-24T12.33-be54645/job.log (1/6) bonding.py:Bonding.test_setup;run-Test-active-backup-0114: STARTED (1/6) bonding.py:Bonding.test_setup;run-Test-active-backup-0114: PASS (63.76 s) (2/6) bonding.py:Bonding.test_run;run-Test-active-backup-0114: STARTED (2/6) bonding.py:Bonding.test_run;run-Test-active-backup-0114: PASS (197.51 s) (3/6) bonding.py:Bonding.test_cleanup;run-Test-active-backup-0114: STARTED (3/6) bonding.py:Bonding.test_cleanup;run-Test-active-backup-0114: PASS (93.48 s) (4/6) bonding.py:Bonding.test_setup;run-Test-802.3ad-697c: STARTED (4/6) bonding.py:Bonding.test_setup;run-Test-802.3ad-697c: PASS (45.86 s) (5/6) bonding.py:Bonding.test_run;run-Test-802.3ad-697c: STARTED (5/6) bonding.py:Bonding.test_run;run-Test-802.3ad-697c: PASS (196.78 s) (6/6) bonding.py:Bonding.test_cleanup;run-Test-802.3ad-697c: STARTED (6/6) bonding.py:Bonding.test_cleanup;run-Test-802.3ad-697c: PASS (92.91 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-24T12.33-be54645/results.html JOB TIME : 791.63 s

~/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: "eth3 eth1" host_ips: "49.1.1.142 50.1.1.142" netmask: "255.255.255.0" peer_ips: "49.1.1.164" peer_interfaces: "env3" peer_public_ip: "9.x.x.x" peer_password: "xxxx" bond_name: "bondtest" user_name: "root" peer_bond_needed: False peer_wait_time: "20" sleep_time: "10" mtu: "1500"

FarooqAbdulla02 commented 3 weeks ago

Run logs with RHEL distro with above code

:~/avocado-fvt-wrapper/tests/avocado-misc-tests/io/net# avocado run bonding_with_sles.py -m bonding.py.data/bonding_virtual.yaml --execution-order tests-per-variant --max-parallel-tasks=1 JOB ID : c09e5d845d7757c7e90ba1478c824b7166736b2d JOB LOG : /root/avocado-fvt-wrapper/results/job-2024-10-25T04.30-c09e5d8/job.log (1/6) bonding_with_sles.py:Bonding.test_setup;run-Test-active-backup-1a2b: STARTED (1/6) bonding_with_sles.py:Bonding.test_setup;run-Test-active-backup-1a2b: PASS (21.38 s) (2/6) bonding_with_sles.py:Bonding.test_run;run-Test-active-backup-1a2b: STARTED (2/6) bonding_with_sles.py:Bonding.test_run;run-Test-active-backup-1a2b: PASS (286.18 s) (3/6) bonding_with_sles.py:Bonding.test_cleanup;run-Test-active-backup-1a2b: STARTED (3/6) bonding_with_sles.py:Bonding.test_cleanup;run-Test-active-backup-1a2b: PASS (19.97 s) (4/6) bonding_with_sles.py:Bonding.test_setup;run-Test-802.3ad-a167: STARTED (4/6) bonding_with_sles.py:Bonding.test_setup;run-Test-802.3ad-a167: PASS (21.33 s) (5/6) bonding_with_sles.py:Bonding.test_run;run-Test-802.3ad-a167: STARTED (5/6) bonding_with_sles.py:Bonding.test_run;run-Test-802.3ad-a167: PASS (337.47 s) (6/6) bonding_with_sles.py:Bonding.test_cleanup;run-Test-802.3ad-a167: STARTED (6/6) bonding_with_sles.py:Bonding.test_cleanup;run-Test-802.3ad-a167: PASS (20.36 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-25T04.30-c09e5d8/results.html JOB TIME : 729.10 s :~/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: "x.x.x.x" peer_password: "xxx" bond_name: "bondtest" user_name: "root" peer_bond_needed: False peer_wait_time: "20" sleep_time: "10" mtu: "1500" fail_over_mac: "0"

FarooqAbdulla02 commented 5 days ago

Latest run logs

avocado run bonding.py -m bonding.py.data/bonding_virtual.yaml --execution-order tests-per-variant --max-parallel-tasks=1

JOB ID : d913c4ef6de2be9a06d43ae9d6f7554a69a3608d JOB LOG : /root/avocado-fvt-wrapper/results/job-2024-11-13T04.36-d913c4e/job.log (1/6) bonding.py:Bonding.test_setup;run-Test-active-backup-a3a1: STARTED (1/6) bonding.py:Bonding.test_setup;run-Test-active-backup-a3a1: PASS (41.28 s) (2/6) bonding.py:Bonding.test_run;run-Test-active-backup-a3a1: STARTED (2/6) bonding.py:Bonding.test_run;run-Test-active-backup-a3a1: PASS (204.14 s) (3/6) bonding.py:Bonding.test_cleanup;run-Test-active-backup-a3a1: STARTED (3/6) bonding.py:Bonding.test_cleanup;run-Test-active-backup-a3a1: PASS (65.13 s) (4/6) bonding.py:Bonding.test_setup;run-Test-802.3ad-0cd4: STARTED (4/6) bonding.py:Bonding.test_setup;run-Test-802.3ad-0cd4: PASS (19.87 s) (5/6) bonding.py:Bonding.test_run;run-Test-802.3ad-0cd4: STARTED (5/6) bonding.py:Bonding.test_run;run-Test-802.3ad-0cd4: PASS (197.33 s) (6/6) bonding.py:Bonding.test_cleanup;run-Test-802.3ad-0cd4: STARTED (6/6) bonding.py:Bonding.test_cleanup;run-Test-802.3ad-0cd4: PASS (52.78 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-11-13T04.36-d913c4e/results.html JOB TIME : 745.66 s

cat bonding.py.data/bonding_virtual.yaml

Test: !mux active-backup: bonding_mode: "1" 802.3ad: bonding_mode: "4" bond_interfaces: "eth3 eth1" host_ips: "49.1.1.142" netmask: "255.255.255.0" peer_ips: "49.1.1.164" peer_interfaces: "env3" peer_public_ip: "9.xx.xxx.xx" peer_password: "xxxxx" bond_name: "bondtest" user_name: "root" peer_bond_needed: False peer_wait_time: "20" sleep_time: "10" mtu: "1500"