Skip to content
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

[multi-asic][vs]: Deploy minigraph broken #4343

Closed
SuvarnaMeenakshi opened this issue Sep 24, 2021 · 5 comments
Closed

[multi-asic][vs]: Deploy minigraph broken #4343

SuvarnaMeenakshi opened this issue Sep 24, 2021 · 5 comments

Comments

@SuvarnaMeenakshi
Copy link
Contributor

Description

Steps to reproduce the issue:

  1. Bring up multi-asic VS testbed using 4-asic VS image from: https://artprodcus3.artifacts.visualstudio.com/Af91412a5-a906-4990-9d7c-f697b81fc04d/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zc29uaWMvcHJvamVjdElkL2JlMWIwNzBmLWJlMTUtNDE1NC1hYWRlLWIxZDNiZmIxNzA1NC9idWlsZElkLzM4MjQ4L2FydGlmYWN0TmFtZS9zb25pYy1idWlsZGltYWdlLnZz0/content?format=file&subPath=%2Ftarget%2Fsonic-4asic-vs.img.gz.
    wget -O sonic-vs.img.gz "https://artprodcus3.artifacts.visualstudio.com/Af91412a5-a906-4990-9d7c-f697b81fc04d/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zc29uaWMvcHJvamVjdElkL2JlMWIwNzBmLWJlMTUtNDE1NC1hYWRlLWIxZDNiZmIxNzA1NC9idWlsZElkLzM4MjQ4L2FydGlmYWN0TmFtZS9zb25pYy1idWlsZGltYWdlLnZz0/content?format=file&subPath=%2Ftarget%2Fsonic-4asic-vs.img.gz"
  2. Place the above image in ~/sonic-vm/images and follow steps to bring up vs testbed.
  3. ./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-four-asic-t1-lag password.txt
  4. deploy minigraph: ./testbed-cli.sh -t vtestbed.csv -m veos_vtb deploy-mg vms-kvm-four-asic-t1-lag veos_vtb password.txt.
    deploy minigraph fails with this error:
TASK [find interface name mapping and individual interface speed if defined from dut] *************************************************************************************************************************
Friday 24 September 2021  01:13:32 +0000 (0:00:00.547)       0:00:02.145 ****** 
[WARNING]: Platform linux on host vlab-08 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change this. See
https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html for more information.

fatal: [vlab-08]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "failed to find the correct port config for msft_four_asic_vslist index out of range"}

This is due to #3746 commit.
https://github.com/Azure/sonic-mgmt/blob/master/ansible/library/port_alias.py#L262 - switchid default value is [0] and here n-asic id reference is done. Same referencing is done in minigraph_meta.j2 template.

deploy-mg is successful if I revert the above commit.

Describe the results you received:
deploy-mg on multi-asic testbed fails with an error failed to find the correct port config for msft_four_asic_vslist index out of range
/testbed-cli.sh -t vtestbed.csv -m veos_vtb deploy-mg vms-kvm-four-asic-t1-lag veos_vtb password.txt

Describe the results you expected:

deploy-mg should be successful.
Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@SuvarnaMeenakshi
Copy link
Contributor Author

@sanmalho-git can you please take a look at this issue.

SuvarnaMeenakshi added a commit that referenced this issue Sep 25, 2021
sanmalho-git added a commit to sanmalho-git/sonic-mgmt that referenced this issue Oct 4, 2021
- 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.
@sanmalho-git
Copy link
Contributor

@SuvarnaMeenakshi - PR #4420 fixes this issue. Can you please review the PR

abdosi pushed a commit that referenced this issue Oct 13, 2021
* Revert "Revert "[chassis] Support for gen-mg for multi-asic linecards in VoQ chassis (#3746)" (#4351)"

This reverts commit aa9c059.

* Fix for issue #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.
abdosi pushed a commit to abdosi/sonic-mgmt that referenced this issue 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.
@yxieca
Copy link
Collaborator

yxieca commented Oct 20, 2021

@SuvarnaMeenakshi is this issue still outstanding?

@SuvarnaMeenakshi
Copy link
Contributor Author

@SuvarnaMeenakshi is this issue still outstanding?

No, currently this issue will not be seen because, I had reverted the PR which caused this issue, There was a new PR with the right fix. I shall review the new PR and close this issue once it is merged in.

@SuvarnaMeenakshi
Copy link
Contributor Author

Issue resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants