-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Flex Counters] Reset flex counters delay flag on config DB when enable_counters script is called #8500
[Flex Counters] Reset flex counters delay flag on config DB when enable_counters script is called #8500
Conversation
…alled This is to delay the flex counters even if the flex counters tables are present in the config DB json file. Signed-off-by: Shlomi Bitton <[email protected]>
@shlomibitton should we set label to 202106? |
@liat-grozovik Yes we should, thanks. |
@@ -17,6 +17,9 @@ def enable_counter_group(db, name): | |||
info = {} | |||
info['FLEX_COUNTER_STATUS'] = 'enable' | |||
db.mod_entry("FLEX_COUNTER_TABLE", name, info) | |||
else: | |||
entry_info.update({"FLEX_COUNTER_DELAY_STATUS":"false"}) | |||
db.mod_entry("FLEX_COUNTER_TABLE", name, entry_info) |
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.
Shouldn't the disabling of delay status happen regardless of entry_info
exists or not?
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.
There is no reason too, if the entry not exist on the DB so we push it without the delay indicator and orchagent will start the flow normally.
Please check:
https://github.com/Azure/sonic-swss/blob/0febef7d167bc7ef77bf1c8b03ee91b88cb3e213/orchagent/flexcounterorch.cpp#L89
@@ -23,6 +23,13 @@ module sonic-flex_counter { | |||
} | |||
} | |||
|
|||
typedef flex_delay_status { | |||
type enumeration { | |||
enum true; |
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.
Why is enumeration
used instead of using type boolean
?
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.
no special reason for it, changed to boolean
typedef flex_delay_status { | ||
type boolean { | ||
boolean true; | ||
boolean false; | ||
} | ||
} |
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.
I think just type boolean should be enough. Can you confirm?
typedef flex_delay_status { | |
type boolean { | |
boolean true; | |
boolean false; | |
} | |
} | |
typedef flex_delay_status { | |
type boolean; | |
} |
@vaibhavhd can you please sign-off? |
…le_counters script is called (#8500) #### Why I did it Reset flex counters delay flag on config DB when enable_counters script is called to allow enablement of flex counters in orchagent. #### How I did it Push to config DB 'false' value for delay indication when enable_counters script is called before enabling the counters. #### How to verify it Observe counters are created when enable_counters script is called.
Signed-off-by: Shlomi Bitton [email protected]
Why I did it
Reset flex counters delay flag on config DB when enable_counters script is called to allow enablement of flex counters in orchagent.
How I did it
Push to config DB 'false' value for delay indication when enable_counters script is called before enabling the counters.
How to verify it
Observe counters are created when enable_counters script is called.
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)