-
Notifications
You must be signed in to change notification settings - Fork 52
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
Let pfcwdmap creation fail gracefully #207
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
sonic_data_client/virtual_db.go
Outdated
|
||
var qos_key string | ||
for _, key := range resp { | ||
if strings.Contains(key, "Ethernet") { // Account for PORT_QOS_MAP|global |
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 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 understand this is to filter all key containing "Ethernet". However this prefix may be changed in future. Check not equal to "global" may be safer.
ADO: 27075747
Why I did it
There is a chance that PORT_QOS_MAP|global is used to fetc pfc_enable key, which will cause redis hget to fail and return err. All queries to counters_db will fail after that.
How I did it
Iterate and not use global as key for port_qos_map to check for pfc_enable
Any error creating pfcwd map will not stop future COUNTERS_DB queries
How to verify it
UT/Manual test. Tested in 202305
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)