Skip to content

[multi-asic][vs]: Update topology script to retrieve hwsku from minigraph#6219

Merged
SuvarnaMeenakshi merged 5 commits intosonic-net:masterfrom
SuvarnaMeenakshi:topology
Feb 19, 2021
Merged

[multi-asic][vs]: Update topology script to retrieve hwsku from minigraph#6219
SuvarnaMeenakshi merged 5 commits intosonic-net:masterfrom
SuvarnaMeenakshi:topology

Conversation

@SuvarnaMeenakshi
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi commented Dec 15, 2020

Update topology script to retrieve hwsku from minigraph
if hwsku information is not available in config_db.
Fix clean up of interfaces in msft_multi_asic_vs hwsku
topology script.

Signed-off-by: Suvarna Meenakshi sumeenak@microsoft.com

- Why I did it
When bringing up multi-asic VS switch, topology service is started during boot up.
Topology service starts a shell script which runs the topology script present in /usr/share/sonic/device// directory. To invoke hwsku specific script, the topology script tries to retrieve hwsku information from config_db.
During initial boot up config_db might not be populated. In order to start topology service before config_db is updated,
update topology script to get hwsku information from minigraph.xml if it is available.
This will be helpful to bring up multi-asic VS testbed by loading minigraph and starting topology service.

- How I did it

  • Update topology.sh script to retrieve hwsku information from minigraph.xml.
  • Fix clean up function on msft_multi_asic_vs toplogy script.

- How to verify it

  • single-asic VS - no change; topology service is only enabled for multi-asic VS.
  • multi-asic VS - Bring up multi-asic VS image, copy minigraph to vs image, start topology service. Topology service should be successful.
  • to test clean up function fix, start topology service - make sure interfaces are created and moved to the right namespaces.
    stop topology service - make sure namespace do not have any interface and all front end interfaces are present in default namespace.

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

information from minigraph if hwsku information is not
available in config_db.
Fix clean up of interfaces in msft_multi_asic_vs hwsku
topology script.

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
@SuvarnaMeenakshi
Copy link
Contributor Author

retest this please

1 similar comment
@SuvarnaMeenakshi
Copy link
Contributor Author

retest this please

@SuvarnaMeenakshi
Copy link
Contributor Author

retest vsimage please

1 similar comment
@SuvarnaMeenakshi
Copy link
Contributor Author

retest vsimage please

@SuvarnaMeenakshi
Copy link
Contributor Author

retest this please

in config_db.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
If HWSKU is not available in config_db and minigraph is not
available, exit with hwsku not found message.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
judyjoseph
judyjoseph previously approved these changes Feb 4, 2021
start also fails.
Set interface mtu to 9100.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
HWSKU=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]' 2>&1`
if [[ $? -ne 0 || HWSKU == "" ]]; then
if [[ -f "/etc/sonic/minigraph.xml" ]]; then
HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']" 2>&1`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add this logic in function instead of duplicating it for start/stop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as suggested.

minigraph.xml as per review comment.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 5a49a0f into sonic-net:master Feb 19, 2021
abdosi pushed a commit that referenced this pull request Feb 26, 2021
…raph (#6219)

Update topology script to retrieve hwsku from minigraph
if hwsku information is not available in config_db.
Fix clean up of interfaces in msft_multi_asic_vs hwsku
topology script.
- Why I did it
When bringing up multi-asic VS switch, topology service is started during boot up.
Topology service starts a shell script which runs the topology script present in /usr/share/sonic/device// directory. To invoke hwsku specific script, the topology script tries to retrieve hwsku information from config_db.
During initial boot up config_db might not be populated. In order to start topology service before config_db is updated,
update topology script to get hwsku information from minigraph.xml if it is available.
This will be helpful to bring up multi-asic VS testbed by loading minigraph and starting topology service.
- How I did it
Update topology.sh script to retrieve hwsku information from minigraph.xml.
Fix clean up function on msft_multi_asic_vs toplogy script.
- How to verify it
single-asic VS - no change; topology service is only enabled for multi-asic VS.
multi-asic VS - Bring up multi-asic VS image, copy minigraph to vs image, start topology service. Topology service should be successful.
to test clean up function fix, start topology service - make sure interfaces are created and moved to the right namespaces.
stop topology service - make sure namespace do not have any interface and all front end interfaces are present in default namespace.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…raph (sonic-net#6219)

Update topology script to retrieve hwsku from minigraph
if hwsku information is not available in config_db.
Fix clean up of interfaces in msft_multi_asic_vs hwsku
topology script.
- Why I did it
When bringing up multi-asic VS switch, topology service is started during boot up.
Topology service starts a shell script which runs the topology script present in /usr/share/sonic/device// directory. To invoke hwsku specific script, the topology script tries to retrieve hwsku information from config_db.
During initial boot up config_db might not be populated. In order to start topology service before config_db is updated,
update topology script to get hwsku information from minigraph.xml if it is available.
This will be helpful to bring up multi-asic VS testbed by loading minigraph and starting topology service.
- How I did it
Update topology.sh script to retrieve hwsku information from minigraph.xml.
Fix clean up function on msft_multi_asic_vs toplogy script.
- How to verify it
single-asic VS - no change; topology service is only enabled for multi-asic VS.
multi-asic VS - Bring up multi-asic VS image, copy minigraph to vs image, start topology service. Topology service should be successful.
to test clean up function fix, start topology service - make sure interfaces are created and moved to the right namespaces.
stop topology service - make sure namespace do not have any interface and all front end interfaces are present in default namespace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants