-
Notifications
You must be signed in to change notification settings - Fork 54
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
Use ASICx suffix in DB target path only if the device is multi-asic #184
Conversation
Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
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.
LGTM, any unit tests needs a fix to cover this change ?
@judyjoseph @zbud-msft will add sonic-mgmt test case for this. It will be hard to cover this via UT.
|
||
if len(targetname) > 1 { | ||
// ASIC Suffix is only used in case if device is multi-asic/namespace | ||
if isMultiNamespace && len(targetname) > 1 { |
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.
"Before the fix client was getting error. After change it is getting data as expected." Can we get UT for this case?
@zbud-msft please add ADO number to this PR. thanks! |
What I did:
For supporting multi-asic as described here: sonic-net/sonic-telemetry#77 we added support to handle
ASICx
suffix in the target DB path. We should only use that suffix if the device is multi-asic else we can ignore it. This PR handle this case.ADO: 27085442
Why I did:
Telemetry Client can pass
ASICx
even for single asic device. To protect from that condition this change has been added.How I verify:
Manually Verified . Before the fix client was getting error. After change it is getting data as expected.