-
Notifications
You must be signed in to change notification settings - Fork 664
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 CLI support for configurable drop counters #688
Conversation
I got some feedback on the behavior of the scripts that I wanted to note here:
|
self.config_db.set_entry(DEBUG_COUNTER_CONFIG_TABLE, counter_name, None) | ||
self.config_db.delete_table(self.config_db.serialize_key((DROP_REASON_TABLE_PREFIX, counter_name))) | ||
|
||
def add_reasons(self, counter_name, reasons): |
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.
Do user need to reset the drop counter explicitly when drop_reasons are added/removed?
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.
Good catch! I don't believe the counter gets cleared when drop reasons are added and removed from the counter but I need to verify.
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.
They don't appear to be automatically cleared when drop reasons are added/removed. Do you have any concerns with this approach?
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.
The counters are cleared when drop reasons are added and removed.
can you follow example here to add unit test for your show command. https://github.com/Azure/sonic-utilities/tree/master/sonic-utilities-tests |
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.
need unit test for show 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.
commented
added! |
- Adds dropconfig script to configure drop counters - Adds dropstat script to show and clear drop counters - Adds handlers for drop counters to show, config, and sonic-clear Signed-off-by: Danny Allen <daall@microsoft.com>
d54e96f
to
3597154
Compare
retest this please |
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.
Looks good to me. Please check other review comments.
In future, please minimize force-push, because we are using internal tool to compare between iterations, and force push will lose comment context.
Will do, thanks for the heads up! And thanks for the review! :) |
Add CLI support for configurable drop counters
New command output (if the output of a command-line utility has changed)
Details if related
Depends on:
Signed-off-by: Danny Allen daall@microsoft.com