-
Notifications
You must be signed in to change notification settings - Fork 770
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
gen-mg broken for multi-asic kvm - issue #4343 #4420
Merged
Merged
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
… in VoQ chassis (sonic-net#3746)" (sonic-net#4351)" This reverts commit aa9c059.
- Use empty list as the default for switchids in the call to port_alias. - In port_alias ansible library, check the length of switchids before using it. - In minigraph_png, - For supporting not all ports connected to fanout, in minigraph_png.j2, we added DeviceInterfaceLink for only ports that are defined in the device_conn (from connection graph). But, for masic KVM, device_conn is not defined, and thus we were not adding any port. The fix is that if the inventory_hostname is not present in the device_conn, then add DeviceInterfaceLink for all front_panel_asic_ifnames - 'Bandwidth' for each DeviceInterfaceLink was hard-coded to 40G, we added code to get it from port_speed which also gets populated from the connection graph. However, port_speed is empty for KVM, and thus generation was failing. Fix is to check if the port is present in port_speed, and if so, use the speed defined in port_speed. Else, use default 40G.
abdosi
requested changes
Oct 9, 2021
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 have fixed the multi-asic issue also took your previous commit (multi-asic graph) in the PR: #4419
I would prefer to get my PR merge to avoid merge conflict. Are you ok with that ?
abdosi
approved these changes
Oct 12, 2021
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
abdosi
pushed a commit
to abdosi/sonic-mgmt
that referenced
this pull request
Oct 13, 2021
* Revert "Revert "[chassis] Support for gen-mg for multi-asic linecards in VoQ chassis (sonic-net#3746)" (sonic-net#4351)" This reverts commit aa9c059. * Fix for issue sonic-net#4343 when running gen-mg for multi-asic kvm - Use empty list as the default for switchids in the call to port_alias. - In port_alias ansible library, check the length of switchids before using it. - In minigraph_png, - For supporting not all ports connected to fanout, in minigraph_png.j2, we added DeviceInterfaceLink for only ports that are defined in the device_conn (from connection graph). But, for masic KVM, device_conn is not defined, and thus we were not adding any port. The fix is that if the inventory_hostname is not present in the device_conn, then add DeviceInterfaceLink for all front_panel_asic_ifnames - 'Bandwidth' for each DeviceInterfaceLink was hard-coded to 40G, we added code to get it from port_speed which also gets populated from the connection graph. However, port_speed is empty for KVM, and thus generation was failing. Fix is to check if the port is present in port_speed, and if so, use the speed defined in port_speed. Else, use default 40G.
This was referenced Apr 20, 2022
SuvarnaMeenakshi
added a commit
that referenced
this pull request
May 2, 2022
…eLink (#5538) What is the motivation for this PR? DeviceInterfaceLink for front panel interface to ASIC interface is not getting generated for multi-asic platform. #4420 introduced a change in minigraph_png.j2 template which caused this change. How did you do it? Fix png template so that DeviceInterfaceLink with front panel interface to asic interface is generated for all platforms. How did you verify/test it? Verified on multi-asic platform, DeviceInterfaceLink with front panel interface to asic interface mapping is generated correctly. In multi-asic linecard minigraph will nclude all DeviceInterfaceLinks. In multi-asic linecard, DEVICE_NEIGHBOR table in default config_db gets populated.
wangxin
pushed a commit
that referenced
this pull request
May 5, 2022
…eLink (#5538) What is the motivation for this PR? DeviceInterfaceLink for front panel interface to ASIC interface is not getting generated for multi-asic platform. #4420 introduced a change in minigraph_png.j2 template which caused this change. How did you do it? Fix png template so that DeviceInterfaceLink with front panel interface to asic interface is generated for all platforms. How did you verify/test it? Verified on multi-asic platform, DeviceInterfaceLink with front panel interface to asic interface mapping is generated correctly. In multi-asic linecard minigraph will nclude all DeviceInterfaceLinks. In multi-asic linecard, DEVICE_NEIGHBOR table in default config_db gets populated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix for issue #4343 when running gen-mg for multi-asic kvm.
How did you do it?
PR #3746 introduced generating minigraphs for multi-asic linecards in a VoQ chassis.
In generating minigraph for mulit-asic linecards in a VoQ chassis, switchids are required to be defined per asic. But, switchid for each asic doesn't exist for multi-asic KVM (pizza box) switchid. To fix this:
Use empty list as the default for switchids in the call to port_alias.
In port_alias ansible library, check the length of switchids before using it.
Also, in minigraph_png, made the following fixes:
Reverted PR Revert "Support for gen-mg for multi-asic linecards in VoQ chassis" #4351
How did you verify/test it?
Ran the steps defined in #4343, and made sure that the generated minigraph with the 'master' code (which reverted PR #3746) and the above code changes are the same.
Also, ran for multi-asic and single-asic linecards of a VoQ Chassis - as long a switchids are defined in the ansible inventory for each linecard, it works.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation