-
Notifications
You must be signed in to change notification settings - Fork 738
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 config_db.json backup in test_counterpoll_watermark.py
#16002
base: master
Are you sure you want to change the base?
Fix config_db.json backup in test_counterpoll_watermark.py
#16002
Conversation
Also fix '_backup_and_restore_config_db' to work on multi-asic lcs
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:
|
@arista-nwolfe using config db backup/restore to keep original configuration is a very expensive way of keep the configuration consistent. Because when using this method, when there is diff, the system will go through config reload, which is a 3 minutes+ operation on single ASIC. I don't know the operation time on multi-ASIC/multi-DUT. could be much longer. @yutongzhang-microsoft can you give some architectural guidance here? I feel that test should try best to revert configuration change to original and use the backup/restore infra to check and make sure that the configuration is restored? |
Note that this config reload due to config-mismatch is already happening today before this change. I agree we could improve this test to correct/revert it's config within the test but I don't think that needs to block this review as it shouldn't change the duration of the test. It'll just correct the saved config so future tests don't fail due to this. |
Hi, @yxieca , @arista-nwolfe . We have the fixture https://github.com/sonic-net/sonic-mgmt/blob/master/tests/conftest.py#L2403 to check the running config before and after the test script running. To achieve this, we have already backup the config in And I'm also wondering, our fixture |
It looks like it This came from a fairly recent PR: #14368
|
@arista-nwolfe It's expected behavior. The logic of core_dump_and_config_check is
@yutongzhang-microsoft please confirm the logic. @arista-nwolfe The only difference is non-chassis uses the golden config from 2.a, chassis uses the golen config from 1.a. |
But I think yes it's a gap that the chassis_recover should add the logic that save back the config_db*.json Line 2674 in dd14c06
So that we don't need this PR's fixture to store and restore config files? |
Hi, @yejianquan For no chassis, we will copy it back to |
Thanks, updated |
@yejianquan the fact that the |
Details of failure described in more detail in #15991
Created a new fixture
backup_and_restore_config_db_frontend
which usesenum_rand_one_per_hwsku_frontend_hostname
sotest_counterpoll_watermark.py
can run it.Updated
_backup_and_restore_config_db
to work on multi-asic LCsSummary:
Fixes #15991
Type of change
Back port request