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]: Add context_config.json files for multi-asic vs hwskus #7697

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

SuvarnaMeenakshi
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi commented May 24, 2021

Signed-off-by: Suvarna Meenakshi [email protected]

Why I did it

For multi-asic platforms, orchagent process in swss docker is started by passing device_ids(or asic_ids).
Each swss docker starts orchagent with a different device_id. This device_id is passed as Hardware info to syncd. For syncd to start with the right hwinfo, context_config.json is passed as an argument. context_config.json file is looked up to get the hwinfo information.
sonic-sairedis PRs required for this diff to be used to bring up multi-asic VS:
sonic-net/sonic-sairedis#830
sonic-net/sonic-sairedis#832

How I did it

Add context_config.json for each asic in the same structure as provided here: https://github.com/Azure/sonic-sairedis/blob/master/lib/src/context_config.json
Each asic context_config.json will have different hwinfo string.
hwinfo string will be same as device id retrieved from asic.conf file.

How to verify it

With the sonic-sairedis changes mentioned above, bring up multi-asic vs image:
./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-four-asic-t1-lag password.txt
./testbed-cli.sh -t vtestbed.csv -m veos_vtb deploy-mg vms-kvm-four-asic-t1-lag lab password.txt
Ensure that interfaces and BGP sessions are coming up:

admin@vlab-08:~$ show interfaces status -d all
      Interface        Lanes    Speed    MTU    FEC        Alias             Vlan    Oper    Admin    Type    Asym PFC
---------------  -----------  -------  -----  -----  -----------  ---------------  ------  -------  ------  ----------
      Ethernet0      1,2,3,4      40G   9100    N/A  Ethernet1/1  PortChannel0002      up       up     N/A         off
      Ethernet4      5,6,7,8      40G   9100    N/A  Ethernet1/2  PortChannel0002      up       up     N/A         off
      Ethernet8   9,10,11,12      40G   9100    N/A  Ethernet1/3  PortChannel0005      up       up     N/A         off
     Ethernet12  13,14,15,16      40G   9100    N/A  Ethernet1/4  PortChannel0005      up       up     N/A         off
     Ethernet16      1,2,3,4      40G   9100    N/A  Ethernet1/5  PortChannel0001      up       up     N/A         off
     Ethernet20      5,6,7,8      40G   9100    N/A  Ethernet1/6  PortChannel0003      up       up     N/A         off
     Ethernet24   9,10,11,12      40G   9100    N/A  Ethernet1/7  PortChannel0004      up       up     N/A         off
     Ethernet28  13,14,15,16      40G   9100    N/A  Ethernet1/8  PortChannel0006      up       up     N/A         off
   Ethernet-BP0  17,18,19,20      40G   9100    N/A   Eth4-ASIC0  PortChannel4020      up       up     N/A         off
   Ethernet-BP4  21,22,23,24      40G   9100    N/A   Eth5-ASIC0  PortChannel4020      up       up     N/A         off
   Ethernet-BP8  25,26,27,28      40G   9100    N/A   Eth6-ASIC0  PortChannel4030      up       up     N/A         off
  Ethernet-BP12  29,30,31,32      40G   9100    N/A   Eth7-ASIC0  PortChannel4030      up       up     N/A         off
  Ethernet-BP16  17,18,19,20      40G   9100    N/A   Eth4-ASIC1  PortChannel4021      up       up     N/A         off
  Ethernet-BP20  21,22,23,24      40G   9100    N/A   Eth5-ASIC1  PortChannel4021      up       up     N/A         off
  Ethernet-BP24  25,26,27,28      40G   9100    N/A   Eth6-ASIC1  PortChannel4031      up       up     N/A         off
  Ethernet-BP28  29,30,31,32      40G   9100    N/A   Eth7-ASIC1  PortChannel4031      up       up     N/A         off
  Ethernet-BP32      1,2,3,4      40G   9100    N/A   Eth0-ASIC2  PortChannel4002      up       up     N/A         off
  Ethernet-BP36      5,6,7,8      40G   9100    N/A   Eth1-ASIC2  PortChannel4002      up       up     N/A         off
  Ethernet-BP40   9,10,11,12      40G   9100    N/A   Eth2-ASIC2  PortChannel4012      up       up     N/A         off
  Ethernet-BP44  13,14,15,16      40G   9100    N/A   Eth3-ASIC2  PortChannel4012      up       up     N/A         off
  Ethernet-BP48  17,18,19,20      N/A   9100    N/A   Eth4-ASIC2           routed    down     down     N/A         off
  Ethernet-BP52  21,22,23,24      N/A   9100    N/A   Eth5-ASIC2           routed    down     down     N/A         off
  Ethernet-BP56  25,26,27,28      N/A   9100    N/A   Eth6-ASIC2           routed    down     down     N/A         off
  Ethernet-BP60  29,30,31,32      N/A   9100    N/A   Eth7-ASIC2           routed    down     down     N/A         off
  Ethernet-BP64      1,2,3,4      40G   9100    N/A   Eth0-ASIC3  PortChannel4003      up       up     N/A         off
  Ethernet-BP68      5,6,7,8      40G   9100    N/A   Eth1-ASIC3  PortChannel4003      up       up     N/A         off
  Ethernet-BP72   9,10,11,12      40G   9100    N/A   Eth2-ASIC3  PortChannel4013      up       up     N/A         off
  Ethernet-BP76  13,14,15,16      40G   9100    N/A   Eth3-ASIC3  PortChannel4013      up       up     N/A         off
  Ethernet-BP80  17,18,19,20      N/A   9100    N/A   Eth4-ASIC3           routed    down     down     N/A         off
  Ethernet-BP84  21,22,23,24      N/A   9100    N/A   Eth5-ASIC3           routed    down     down     N/A         off
  Ethernet-BP92  25,26,27,28      N/A   9100    N/A   Eth6-ASIC3           routed    down     down     N/A         off
  Ethernet-BP96  29,30,31,32      N/A   9100    N/A   Eth7-ASIC3           routed    down     down     N/A         off
PortChannel0001          N/A      40G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel0002          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel0003          N/A      40G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel0004          N/A      40G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel0005          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel0006          N/A      40G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4002          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4003          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4012          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4013          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4020          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4021          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4030          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A
PortChannel4031          N/A      80G   9100    N/A          N/A           routed      up       up     N/A         N/A

admin@vlab-08:~$ show ip bgp summary -d all

IPv4 Unicast Summary:
asic0: BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 6402
asic1: BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 9062
asic2: BGP router identifier 8.0.0.2, local AS number 65100 vrf-id 0
BGP table version 6398
asic3: BGP router identifier 8.0.0.3, local AS number 65100 vrf-id 0
BGP table version 6398
RIB entries 51176, using 9825792 bytes of memory
Peers 14, using 305424 KiB of memory
Peer groups 12, using 768 bytes of memory


Neighbhor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down      State/PfxRcd  NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------
10.0.0.1       4  65200       3306       3314         0      0       0  00:05:50             6370  ARISTA01T2
10.0.0.5       4  65200       3306       3312         0      0       0  00:05:50             6370  ARISTA03T2
10.0.0.33      4  64001        125       3313         0      0       0  00:05:51                3  ARISTA01T0
10.0.0.35      4  64002        125       3312         0      0       0  00:05:51                3  ARISTA02T0
10.0.0.37      4  64003        126       3313         0      0       0  00:05:51                4  ARISTA03T0
10.0.0.39      4  64004        122       3312         0      0       0  00:05:51                3  ARISTA04T0
10.1.0.0       4  65100       3321       3314         0      0       0  00:05:55             6398  ASIC2
10.1.0.1       4  65100       3314       3321         0      0       0  00:05:56             6377  ASIC0
10.1.0.2       4  65100       3323       3314         0      0       0  00:05:55             6398  ASIC3
10.1.0.3       4  65100       3315       3327         0      0       0  00:05:57             6377  ASIC0
10.1.0.4       4  65100       3321        134         0      0       0  00:05:56             6398  ASIC2
10.1.0.5       4  65100        134       3323         0      0       0  00:05:56               21  ASIC1
10.1.0.6       4  65100       3323        134         0      0       0  00:05:56             6398  ASIC3
10.1.0.7       4  65100        135       3326         0      0       0  00:05:57               21  ASIC1

Total number of neighbors 14

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

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

@kcudnik
Copy link
Contributor

kcudnik commented May 25, 2021

you can have only 1 context_config witch will have all those configurations, and a different guid value, then you can choose for each syncd that specific guid

@SuvarnaMeenakshi
Copy link
Contributor Author

you can have only 1 context_config witch will have all those configurations, and a different guid value, then you can choose for each syncd that specific guid

My understanding was that different guid is for single swss and multiple syncd scenario, for multiple swss and multiple syncd, we could have same guid. Is that right?

@kcudnik
Copy link
Contributor

kcudnik commented May 25, 2021

depends what your configuration is, but if you want to run multiple syncds, even if each is in separate docker, you can still use single cotext_confg.json file, but then you must select right guid for pari OA-syncd, so hardcoding "- 0" in scripts would not be possible then, but your choice

@SuvarnaMeenakshi
Copy link
Contributor Author

depends what your configuration is, but if you want to run multiple syncds, even if each is in separate docker, you can still use single cotext_confg.json file, but then you must select right guid for pari OA-syncd, so hardcoding "- 0" in scripts would not be possible then, but your choice

Reasoning for this separate context_config.json and same guid is:

  1. Each swss and syncd docker is mounted with /usr/share/sonic/device///<asic_id> is mounted as /usr/share/sonic/hwsku, which is the default path of context_config.json file. IF we have a single context_config.json we will have to mount that in a different way or change the default path of context_config.json.
  2. As mentioned above, For multi-asic, If guid is different, we will have to pass that as an argument to syncd and hardcoding as "0" will not be possible.

@SuvarnaMeenakshi SuvarnaMeenakshi merged commit a557dbd into sonic-net:master Jun 1, 2021
@SuvarnaMeenakshi SuvarnaMeenakshi deleted the masicvs_master branch June 1, 2021 17:18
SuvarnaMeenakshi added a commit that referenced this pull request Jul 9, 2021
SuvarnaMeenakshi added a commit that referenced this pull request Jul 11, 2021
…c vs (#7697)" (#8147)

This reverts commit a557dbd.
Reverting this PR as it is not required currently for multi-asic VS.
multi-asic VS will come up with multiple instances of swss and syncd. syncd will use default hwinfo string, same as in single asic VS.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…nic-net#7697)

hwskus.
Why I did it
For multi-asic platforms, orchagent process in swss docker is started by passing device_ids(or asic_ids).
Each swss docker starts orchagent with a different device_id. This device_id is passed as Hardware info to syncd. For syncd to start with the right hwinfo, context_config.json is passed as an argument. context_config.json file is looked up to get the hwinfo information.
sonic-sairedis PRs required for this diff to be used to bring up multi-asic VS:
sonic-net/sonic-sairedis#830
sonic-net/sonic-sairedis#832

How I did it
Add context_config.json for each asic in the same structure as provided here: https://github.com/Azure/sonic-sairedis/blob/master/lib/src/context_config.json
Each asic context_config.json will have different hwinfo string.
hwinfo string will be same as device id retrieved from asic.conf file.
Signed-off-by: Suvarna Meenakshi <[email protected]>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…c vs (sonic-net#7697)" (sonic-net#8147)

This reverts commit a557dbd.
Reverting this PR as it is not required currently for multi-asic VS.
multi-asic VS will come up with multiple instances of swss and syncd. syncd will use default hwinfo string, same as in single asic VS.
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

Successfully merging this pull request may close these issues.

2 participants