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 convert_and_restore_config_db_to_ipv6_only reload config failure #13277

Merged

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jun 13, 2024

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it

convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it

Ignore config reload AnsibleConnectionFailure exception.

How to verify it

Pass all test case.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liuh-80 liuh-80 marked this pull request as ready for review June 14, 2024 01:42
@liuh-80 liuh-80 requested a review from yejianquan June 14, 2024 01:42
@liuh-80
Copy link
Contributor Author

liuh-80 commented Jun 14, 2024

load_minigraph and config reload will restart mgmt interface, working on a PR to make config command wait mgmt interface finish restart before exit: sonic-net/sonic-utilities#3365

The PR will break some IPV6 test case because the test case will remove IPV4 address from mgmt interface, after this change the duthost connection will raise "device not reachable" exception.

Without above PR the fix still necessary, because the mgmt still have chance restart before config command exit and break IPV6 test case.

Copy link
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit 8ca933e into sonic-net:master Jun 14, 2024
14 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 14, 2024
…onic-net#13277)

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it
convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it
Ignore config reload AnsibleConnectionFailure exception.

How to verify it
Pass all test case.

Description for the changelog
Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

co-authorized by: [email protected]
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #13295

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 14, 2024
…onic-net#13277)

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it
convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it
Ignore config reload AnsibleConnectionFailure exception.

How to verify it
Pass all test case.

Description for the changelog
Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 14, 2024
…onic-net#13277)

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it
convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it
Ignore config reload AnsibleConnectionFailure exception.

How to verify it
Pass all test case.

Description for the changelog
Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

co-authorized by: [email protected]
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #13296

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #13297

mssonicbld pushed a commit that referenced this pull request Jun 14, 2024
…13277)

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it
convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it
Ignore config reload AnsibleConnectionFailure exception.

How to verify it
Pass all test case.

Description for the changelog
Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this pull request Jun 14, 2024
…13277)

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it
convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it
Ignore config reload AnsibleConnectionFailure exception.

How to verify it
Pass all test case.

Description for the changelog
Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this pull request Jun 14, 2024
…13277)

Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

Why I did it
convert_and_restore_config_db_to_ipv6_only fixture will delete ipv4 mgmt address by config reload.
If mgmt interface restart before config reload, the duthost class will lost connection to device and throw unreachable exception.

How I did it
Ignore config reload AnsibleConnectionFailure exception.

How to verify it
Pass all test case.

Description for the changelog
Fix convert_and_restore_config_db_to_ipv6_only reload config failure.

co-authorized by: [email protected]
yejianquan pushed a commit that referenced this pull request Jun 14, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: #13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 18, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: sonic-net#13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 18, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: sonic-net#13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 18, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: sonic-net#13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this pull request Jun 18, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: #13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this pull request Jun 18, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: #13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this pull request Jun 18, 2024
Fix import AnsibleConnectionFailure from ansible.errors issue.

Why I did it
In ansible the AnsibleConnectionFailure defined in 2 place:
pytest_ansible.errors
ansible.errors

In this PR: #13277
The code should import the pytest_ansible.errors.AnsibleConnectionFailure

How I did it
Import AnsibleConnectionFailure from pytest_ansible.errors

How to verify it
Pass all test case.

co-authorized by: [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants