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

[action] [PR:13277] Fix convert_and_restore_config_db_to_ipv6_only reload config failure #13297

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/common/fixtures/duthost_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import time
import json

from ansible.errors import AnsibleConnectionFailure
from paramiko.ssh_exception import AuthenticationException

from tests.common import config_reload
Expand Down Expand Up @@ -752,7 +753,13 @@ def convert_and_restore_config_db_to_ipv6_only(duthosts):
for duthost in duthosts.nodes:
if config_db_modified[duthost.hostname]:
logger.info(f"config changed. Doing config reload for {duthost.hostname}")
config_reload(duthost, wait=120)
try:
config_reload(duthost, wait=120)
except AnsibleConnectionFailure as e:
# IPV4 mgmt interface been deleted by config reload
# In latest SONiC, config reload command will exit after mgmt interface restart
# Then 'duthost' will lost IPV4 connection and throw exception
logger.warning(f'Exception after config reload: {e}')
duthosts.reset()

for duthost in duthosts.nodes:
Expand Down
Loading