Skip to content

Commit

Permalink
Fix ssip issue (sonic-net#15639)
Browse files Browse the repository at this point in the history
when removing mgmt vrf, dut connection will be lost for a while. So, before config reload we need remove mgmt vrf, otherwise it will cause host unreachable.
  • Loading branch information
JibinBao authored Dec 9, 2024
1 parent 195af4c commit a275a29
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/syslog/test_syslog_source_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,19 @@ def is_support_ssip(duthosts, enum_rand_one_per_hwsku_frontend_hostname):


@pytest.fixture(scope="module", autouse=True)
def restore_config_by_config_reload(duthosts, enum_rand_one_per_hwsku_frontend_hostname):
def restore_config_by_config_reload(duthosts, enum_rand_one_per_hwsku_frontend_hostname, localhost):
yield
config_reload(duthosts[enum_rand_one_per_hwsku_frontend_hostname])
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]

if is_mgmt_vrf_enabled(duthost):
# when removing mgmt vrf, dut connection will be lost for a while. So, before config reload,
# we need remove mgmt vrf, otherwise it will cause host unreachable
remove_vrf(duthost, VRF_LIST[2])
localhost.wait_for(host=duthost.mgmt_ip, port=SONIC_SSH_PORT, search_regex=SONIC_SSH_REGEX,
state='absent', delay=1, timeout=30)
localhost.wait_for(host=duthost.mgmt_ip, port=SONIC_SSH_PORT, search_regex=SONIC_SSH_REGEX,
state='started', delay=2, timeout=180)
config_reload(duthost)


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit a275a29

Please sign in to comment.