-
Notifications
You must be signed in to change notification settings - Fork 684
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
Add a command to update log level and refresh configuration #3428
Conversation
8698c9b
to
3fb0263
Compare
3fb0263
to
f58bff8
Compare
/azpw run Azure.sonic-utilities |
/AzurePipelines run Azure.sonic-utilities |
Azure Pipelines successfully started running 1 pipeline(s). |
baa004d
to
d633c46
Compare
d633c46
to
cb72134
Compare
Hi @prgeor , kindly reminder |
Hi @Junchao-Mellanox, as debug purpose, do you want to add it into show cli? |
There is an existing command |
@prgeor can you please help to review comment feedback ? |
return | ||
|
||
log_config = cfg_db.get_entry('LOGGER', identifier) | ||
require_manual_refresh = log_config.get('require_manual_refresh') |
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.
@Junchao-Mellanox Who add this configuration to config DB and when?
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.
Python logger will add this to config DB in init function. Check this PR https://github.com/sonic-net/sonic-buildimage/pull/19611/files line 62
Fix review comment
d670aec
to
1b6aac7
Compare
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of `require_manual_refresh` was added. This leads to YANG failures in the factory-default configuration for the `xcvrd` log entry which by default is written as true. Signed-off-by: Brad House (@bradh352)
Why I did it YANG failures during config replace with default configuration. As of #19611 and sonic-net/sonic-utilities#3428 a new database field of require_manual_refresh was added. This leads to YANG failures in the factory-default configuration for the xcvrd log entry which by default is written as true. Work item tracking How I did it Updated YANG file for new field. How to verify it Verify config replace works with factory default configuration.
Why I did it YANG failures during config replace with default configuration. As of sonic-net#19611 and sonic-net/sonic-utilities#3428 a new database field of require_manual_refresh was added. This leads to YANG failures in the factory-default configuration for the xcvrd log entry which by default is written as true. Work item tracking How I did it Updated YANG file for new field. How to verify it Verify config replace works with factory default configuration.
What I did
Add a command "config syslog level" to set log level at runtime.
How I did it
Add a command "config syslog level" to set log level at runtime. This command shall update log level in CONFIG DB and send SIGHUP to relevant daemon if it requires a manual refresh
How to verify it
manual test
new unit test case
Previous command output (if the output of a command-line utility has changed)
N/A
New command output (if the output of a command-line utility has changed)