-
Notifications
You must be signed in to change notification settings - Fork 771
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
Collect db dump from each asic on multi-asic DUT #5326
Conversation
What is the motivation for this PR? Db dump use 'redis-dump' to dump files, but on multi-asic DUT, output filename matches with the directory name within the same folder How did you do it? Use "ip netns exec 'namespace' redis-dump" to collect dumps from each asic on multi-asic DUT. How did you verify/test it? Run test in some loops Any platform specific information? Supported testbed topology if it's a new test case?
1.Improve some code habits 2.Skip state db dump on 201911 release
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
# The issue has been fixed in https://github.com/Azure/sonic-buildimage/pull/5646. | ||
# However, the fix is not included in 201911 release. So we have to skip STATE_DB on release 201911 | ||
# to avoid raising exception when dumping the STATE_DB. | ||
if i == state_db_id and duthosts[0].sonic_release in ['201911']: |
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.
@xwjiang2021 This line is giving a error as 'i' as undefined. Should this be db_id instead of i
db_dump_path = os.path.join(dut_file_path + "/" + namespace, request.module.__name__, request.node.name) | ||
duthosts.file(path=db_dump_path, state="directory") | ||
for i in dbs: | ||
duthosts.shell("ip netns exec {} redis-ducmp -d {} -y -o {}/{}".format(namespace, i, db_dump_path, i)) |
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.
@xwjiang2021the command should be 'redis-dump' and not 'redis-ducmp'
Thanks @mannytaheri for noticing the issues. I'll revert this one and ask the author to submit a new one. |
* Collect db dump fromeach asic on multi-asic DUT What is the motivation for this PR? Db dump use 'redis-dump' to dump files, but on multi-asic DUT, output filename matches with the directory name within the same folder How did you do it? Use "ip netns exec 'namespace' redis-dump" to collect dumps from each asic on multi-asic DUT. How did you verify/test it? Run test in some loops Any platform specific information? Supported testbed topology if it's a new test case? * Improve of Collect db dump from each asic on multi-asic DUT 1.Improve some code habits 2.Skip state db dump on 201911 release * Improve: Skip state db dump on 201911 release when add db_id to db set * Improve: Add some comments
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Db dump use 'redis-dump' to dump files, but on multi-asic DUT, output
filename matches with the directory name within the same folder.
How did you do it?
Use "ip netns exec 'namespace' redis-dump" to collect dumps from each
asic on multi-asic DUT.
How did you verify/test it?
Run test in some loops
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation