[generate_dump] allow to extend dump with plugin scripts.#1335
[generate_dump] allow to extend dump with plugin scripts.#1335liat-grozovik merged 3 commits intosonic-net:masterfrom
Conversation
Plugins scripts are placed at /usr/bin/debug-dump/ and the output of these scripts will be gzipped and placed under dump archive in dump/<script-name>.gz Signed-off-by: Stepan Blyshchak <[email protected]>
|
retest this please |
Signed-off-by: Stepan Blyshchak <[email protected]>
bandaru-viswanath
left a comment
There was a problem hiding this comment.
Looks good to me. It would be great to explicitly call out these 'plugins' as 'dump plugins' or equivalent.
|
@stepanblyschak what information does this dump plugin try to collect? |
|
@sujinmkang This mechanism is going to be used by Application Extension infrastructure - https://github.com/stepanblyschak/SONiC/blob/sonic-app-ext-3/doc/sonic-application-extention/sonic-application-extention-hld.md. This Infra allows to install/upgrade/remove dockers at runtime without image rebuild. |
|
PR description says "Plugins scripts are placed at /usr/bin/debug-dump/ and". Isn't it "/usr/local/bin/debug-dump/"? |
|
One more question, even with this dump plugin, I think any new package installed to SONiC can also use the syslog service and write the messages to /var/log/<package_name> directory then 'show tech' can collect that log while it's generating the dump file. What is the purpose of this dump plug for? |
|
@sujinmkang Logging and dump generation are different things. For my application I generate a dump by executing a command inside docker (lets say this command takes 10 sec). Now, if I don't have this proposed mechanism to extend dump generation I have to continuously print my dump to syslog which has the following issues:
|
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…1335) - What I did Added support for tech support extension scripts. - How I did it It looks at /usr/bin/debug-dump for scripts, if it finds one it will execute them and save the output to dump/ folder. - How to verify it Write a simple scripts that outputs something and place it under /usr/bin/debug-dump/ Signed-off-by: Stepan Blyshchak <[email protected]>
) #### What I did Added support for tech support extension scripts, by cherry-picking of #1335 to branch 202012 The purpose is to have dumps of extensions in SONiC techsupport, even without App Extension infrastructure. The new application will write a file that contains the dump command into /usr/bin/debug-dump folder, and it will appear in the output of `show techsupport` command. #### How I did it It looks at /usr/bin/debug-dump for scripts, if it finds one it will execute them and save the output to dump/ folder. #### How to verify it Write a simple scripts that outputs something and place it under /usr/bin/debug-dump/
) - What I did Added support for tech support extension scripts, by cherry-picking of #1335 to 202012 branch. The purpose is to have dumps of extensions in SONiC techsupport, even without App Extension infrastructure. The new application will write a file that contains the dump command into /usr/bin/debug-dump folder, and it will appear in the output of show techsupport command. - How I did it It looks at /usr/bin/debug-dump for scripts, if it finds one it will execute them and save the output to dump/ folder. - How to verify it Write a simple scripts with an output and place it under /usr/bin/debug-dump/
Plugins scripts are placed at /usr/local/bin/debug-dump/ and
the output of these scripts will be gzipped and placed
under dump archive in dump/.gz
Signed-off-by: Stepan Blyshchak [email protected]
- What I did
Added support for tech support extension scripts.
- How I did it
It looks at /usr/bin/debug-dump for scripts, if it finds one it will execute them and save the output to dump/ folder.
- How to verify it
Write a simple scripts that outputs something and place it under /usr/bin/debug-dump/
- 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)