-
Notifications
You must be signed in to change notification settings - Fork 708
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 reload_config failed on M0 device because PFCWD feature does not exist #14138
Fix reload_config failed on M0 device because PFCWD feature does not exist #14138
Conversation
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
tests/common/config_reload.py
Outdated
@@ -105,6 +106,13 @@ def config_reload_minigraph_with_rendered_golden_config_override( | |||
override_config=True, golden_config_path=golden_config_path, is_dut=is_dut) | |||
|
|||
|
|||
def pfcwd_feature_enabled(duthost): | |||
localhost_config = duthost.shell('sonic-db-dump -n CONFIG_DB -y -k \"DEVICE_METADATA|localhost\"') | |||
meta_data = json.loads(localhost_config["stdout"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency purposes, it might be better to use duthost.config_facts(host=duthost.hostname, source="running")['ansible_facts']['DEVICE_METADATA']['localhost']
. (This also protects against an old image running where sonic-db-dump
isn't available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
/AzurePipelines run Azure.sonic-mgmt |
Azure Pipelines successfully started running 1 pipeline(s). |
…exist (sonic-net#14138) Fix reload_config failed on M0 device because PFCWD feature does not exist #### Why I did it test case test_fallback_to_local_authorization_with_config_reload failed on M0 device when reload config. It's because PFCWD feature does not exist on M0. ### How I did it Ignore check when PFCWD feature not enable on device. #### How to verify it Pass all test case. ### Description for the changelog Fix reload_config failed on M0 device because PFCWD feature does not exist
Cherry-pick PR to 202405: #14446 |
@liuh-80 PR conflicts with 202311 branch |
@liuh-80 PR conflicts with 202305 branch |
…exist (#14138) Fix reload_config failed on M0 device because PFCWD feature does not exist #### Why I did it test case test_fallback_to_local_authorization_with_config_reload failed on M0 device when reload config. It's because PFCWD feature does not exist on M0. ### How I did it Ignore check when PFCWD feature not enable on device. #### How to verify it Pass all test case. ### Description for the changelog Fix reload_config failed on M0 device because PFCWD feature does not exist
…exist (sonic-net#14138) Fix reload_config failed on M0 device because PFCWD feature does not exist #### Why I did it test case test_fallback_to_local_authorization_with_config_reload failed on M0 device when reload config. It's because PFCWD feature does not exist on M0. ### How I did it Ignore check when PFCWD feature not enable on device. #### How to verify it Pass all test case. ### Description for the changelog Fix reload_config failed on M0 device because PFCWD feature does not exist
Fix reload_config failed on M0 device because PFCWD feature does not exist
Why I did it
test case test_fallback_to_local_authorization_with_config_reload failed on M0 device when reload config.
It's because PFCWD feature does not exist on M0.
Work item tracking
How I did it
Ignore check when PFCWD feature not enable on device.
How to verify it
Pass all test case.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Fix reload_config failed on M0 device because PFCWD feature does not exist
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)