This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
Pfcwd path fix #44
Open
TildenWinston
wants to merge
10
commits into
sonic-net:master
Choose a base branch
from
TildenWinston:pfcwd-path-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pfcwd path fix #44
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Accidentally included
Changing from PFC_WD_TABLE to PFC_WD
hui-ma
reviewed
Aug 15, 2020
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.
Please do a cleaning round. Thansk!
@@ -335,6 +346,7 @@ restart: //Remote server might go down, in that case we restart with next destin | |||
return | |||
} | |||
cs.cMu.Unlock() | |||
log.V(7).Infof("Before switch 346 %v", cs) |
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.
debuging line, remove
if clientCfg.TLS != nil { | ||
opts = append(opts, grpc.WithTransportCredentials(credentials.NewTLS(clientCfg.TLS))) | ||
} else { | ||
opts = append(opts, grpc.WithInsecure()) |
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.
This should not belong to the PR
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes made to virtual_db.go to fix the Pfcwd redis data path. I fixed the table name, updated the count used to get port number accordingly, and added if statment to filter out smaller keys like PFC_WD|Global.
Based on the current code in the Sonic-telemetry repo, the original expected path for the PFC_WD keys was PFC_WD_TABLE: https://github.com/Azure/sonic-telemetry/blob/master/sonic_data_client/virtual_db.go#L133. This change was made back when warm boot support was added to SONiC-swss-common, the table name for Pfcwd was changed from PFC_WD_TABLE to PFC_WD. So this changed caused the COUNTERS/Ethernet*/Pfcwd command to look for the ports listed with the PFC_WD_TABLE key which always returned nothing given that it no longer exists. Changing the length then caused line 147 (https://github.com/Azure/sonic-telemetry/blob/master/sonic_data_client/virtual_db.go#L147) to fail to get the proper port number from the keys because the removing the first 14 characters parsed to et## instead of the intended ##.