-
Notifications
You must be signed in to change notification settings - Fork 672
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
[CLI][techsupport] Add NOOP option for commands that did not have that option #1445
Conversation
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.
Approving. However, it would be nice if we could add some kind of run_cmd()
wrapper function which we can pass every command, and that function would check the NOOP
variable and either echo the command or run it. However, this might require some refactoring because some commands are currently strung together.
retest this please |
1 similar comment
retest this please |
retest this please |
scripts/generate_dump
Outdated
mkdir -p $TARDIR | ||
$CP $V -rf /host/warmboot $TARDIR | ||
|
||
start_t=$(date +%s%3N) |
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.
This line needs to be out of the condition to be used for calculating the time.
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.
Another question is if we need to log the time of the output generation for noop case. What do you think?
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.
It's not needed, adding it to be consistent with other commands.
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.
This line needs to be out of the condition to be used for calculating the time.
😬
This PR needs to be cherry-picked to 202012 otherwise the latest community show_techsupport/tech_support_cmds.py will fail on 202012 image |
d03c6ccc90b92d9319c500a8adcf727a9fa5609b (HEAD -> 201911, origin/201911) [intfsorch] Init proxy_arp variable while adding router interface. (sonic-net#1473) 9e7c0bc8e3f2c7c5422f2f8a2c6498f659dcdf84 [drop counters] Clarify log messages for initial counter setup (sonic-net#1445) da8ac754fa1c36f9bb7ba1210017f915f339cfe0 Create vnet tunnel map only if it doesn't exist (sonic-net#1482) Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Including the following changes: [bitmap_vnet] Remove BMTOR implementation (sonic-net#1496) [intfsorch] Init proxy_arp variable while adding router interface. (sonic-net#1473) [drop counters] Clarify log messages for initial counter setup (sonic-net#1445) Signed-off-by: Liat Grozovik <liatg@nvidia.com>
What I did
Add NOOP option for 'save_proc' and 'docker cp' commands.
(this option can be used in pytest to check against all commands that will be executed for techsupport collection)
How I did it
Added "NOOP" option to print the command without executing it.
How to verify it
Platform INFO:
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)