-
Notifications
You must be signed in to change notification settings - Fork 746
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]: Add multi-asic virtual switch testbed #2168
[multi-asic]: Add multi-asic virtual switch testbed #2168
Conversation
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Add a new parameter in port_alias.py to retrieve only external interfaces. Remove incorrect changes. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
multi-asic vs. - Add num_asic parameter in veos_vtb to denote number of asics of that device. - Update port_alias to get port_config files for each asic for multi-asic device. - Update sonic-kickstart to add number of asics in asic.conf file. - Reboot sonic-vs number of asics is more than 1 so that the vs comes up as multi-asic vs. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
of minigraph. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
…vs_check Signed-off-by: Ubuntu <sumeenak@sumeenak-ubuntu-vm0.q3q211rtov2etb23rce1vewych.cx.internal.cloudapp.net>
Signed-off-by: Ubuntu <sumeenak@sumeenak-ubuntu-vm0.q3q211rtov2etb23rce1vewych.cx.internal.cloudapp.net>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
ansible/vtestbed.csv
Outdated
@@ -4,3 +4,4 @@ vms-kvm-t0-64,vms6-1,t0-64,docker-ptf,ptf-01,10.250.0.102/24,fec0::ffff:afa:2/64 | |||
vms-kvm-t1-lag,vms6-2,t1-lag,docker-ptf,ptf-02,10.250.0.106/24,fec0::ffff:afa:6/64,server_1,VM0104,[vlab-03],Tests virtual switch vm | |||
vms-kvm-t0-2,vms6-3,t0,docker-ptf,ptf-03,10.250.0.108/24,fec0::ffff:afa:8/64,server_1,VM0104,[vlab-04],Tests virtual switch vm | |||
vms-kvm-dual-t0,vms6-4,dualtor,docker-ptf,ptf-04,10.250.0.109/24,fec0::ffff:afa:9/64,server_1,VM0108,[vlab-05;vlab-06],Dual-TOR testbed | |||
vms-kvm-multi-asic-t1-lag,vms6-4,t1-lag,docker-ptf,ptf-unknown,10.250.0.106/24,fec0::ffff:afa:6/64,server_1,VM0104,[vlab-07],Tests multi-asic virtual switch vm |
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 think a new PTF should be defined for this multi-ASIC setup. For example:
ptf-05
10.250.0.109
fec0::ffff:afa:a/64
The ptf-05
host also should be added to ansible/veos_vtb
.
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.
Added new ptf-docker as suggested.
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
retest vsimage please |
retest vsimage please |
1 similar comment
retest vsimage please |
ansible/library/port_alias.py
Outdated
else: | ||
num_asic = allmap.get_num_asic() | ||
if num_asic == 1: | ||
(aliases, portmap, aliasmap, portspeed) = allmap.get_portmap(all_ports) |
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.
remove this if else.. for loop should be enough.
ansible/library/port_alias.py
Outdated
if m_args['num_asic'] is not None: | ||
num_asic = m_args['num_asic'] | ||
else: | ||
num_asic = allmap.get_num_asic() |
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.
use sonic-py-common utility here
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.
Modified to use sonic_py_common utility.
But as port_alias.py script is invoked from sonic_mgmt docker during VS bring up or is run on the device/VS during minigraph generation, the import of sonic_py_common library cannot be done globally as it will not present when run on sonic-mgmt docker.
ansible/library/port_alias.py
Outdated
if os.path.exists(portconfig): | ||
return portconfig | ||
return None | ||
|
||
def get_portmap(self): | ||
def get_num_asic(self): | ||
num_asic = 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.
we can remove this.
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.
Removed
@@ -117,6 +117,7 @@ def session(new_params): | |||
('ip route add 0.0.0.0/0 via %s table default' % str(new_params['mgmt_gw']), [r'#']), | |||
('ip route', [r'#']), | |||
('echo %s:%s | chpasswd' % (str(new_params['login']), str(new_params['new_password'])), [r'#']), | |||
('echo NUM_ASIC=%s > /usr/share/sonic/device/x86_64-kvm_x86_64-r0/asic.conf' % (str(new_params['num_asic'])), [r'#']), |
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.
will not be needed
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.
Removed.
register: kickstart_output | ||
|
||
- name: Fail if kickstart gives error for {{ dut_name }} | ||
fail: msg="Start sonic vm weren't succesfull" | ||
when: kickstart_output.kickstart_code != 0 | ||
|
||
- name: Reboot sonic-vm to bring up as multi-asic vs {{ num_asic }} | ||
command: "virsh reboot {{ dut_name }}" |
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.
not needed
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.
Removed as we can use a pre-built sonic-vs image where number of asics is updated in asic.conf.
- Use a pre build sonic multiasic VS image with asic.conf updated with number of asics. - Remove updation on asic.conf during multiasic VS testbed image bring up. - Remove function added to retrieve number of asics in port_alias. When executed from DUT, use sonic_py_common function to retrieve number of asics. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
retest vsimage please |
exception on import error. Remove all_ports variable added, will always retrieve external ports alone. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
For multi-asic platform, there will be multiple swss services running. So instead of checking for each swss services, check if all services are up and then proceed with configuring eth0 IP address. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
@@ -108,7 +108,7 @@ def logout(self): | |||
|
|||
def session(new_params): | |||
seq = [ | |||
('while true; do if [ $(systemctl is-active swss) == "active" ]; then break; fi; echo $(systemctl is-active swss); sleep 1; done', [r'#'], 180), | |||
('while true; do if [ $(systemctl is-system-running) == "degraded" ]; then break; fi; echo $(systemctl is-system-running); sleep 1; done', [r'#'], 180), |
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.
Can you add the check for the state "is-system-running" == "running" also ? It could go into this state as well.
https://www.freedesktop.org/software/systemd/man/systemctl.html.
before assigning eth0 IP address. As there is no default configuration for multi-asic VS, interfaces-config will nto override the configured eth0 IP address so we do not need to check for interfaces-config service completion for multi-asic VS. No change in behavior for single asic VS. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
Add new testbed for multi-asic VS platform with HwSKU: msft_multi_asic_vs
How did you do it?
To create a multi-asic VS testbed, the assumption is that the vs image is a multi-asic VS, which means that the asic.conf is updated with the right number of asics. In this PR, multi-asic VS of SKU: msft_multi_asic_vs is used with number of ASICS as 6.The below changes will address the modification:
How did you verify/test it?
Bring up vs testbed using the command: ./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-multi-asic-t1-lag password.txt
Ensure that the sonic-vs testbed comes up fine. Sonic vm should be accessible via console access. Configuration changes are not added in this PR.
Ensure that single-asic vs testbed comes up fine using:
./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-t0 password.txt
./testbed-cli.sh -t vtestbed.csv -m veos_vtb deploy-mg vms-kvm-t0 lab password.txt
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation