Add option to copy minigraph to DUT#2888
Add option to copy minigraph to DUT#2888SuvarnaMeenakshi wants to merge 7 commits intosonic-net:masterfrom
Conversation
loading minigraph. Topolgy service should be started only for multi-asic vs. Add support to copy a generated minigraph and load it on the device. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
before loading minigraph. This will be required for multi-asic vs hwsku. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
| echo " $0 [options] (connect-vms | disconnect-vms) <topo-name> <vault-password-file>" | ||
| echo " $0 [options] config-vm <topo-name> <vm-name> <vault-password-file>" | ||
| echo " $0 [options] (gen-mg | deploy-mg | test-mg) <topo-name> <inventory> <vault-password-file>" | ||
| echo " $0 [options] (gen-mg | deploy-mg | test-mg | copy-mg) <topo-name> <inventory> <vault-password-file>" |
There was a problem hiding this comment.
what is the difference between copy-mg and deploy-mg?
There was a problem hiding this comment.
deploy_mg will create minigraph from templates and load the minigraph.
copy_mg will copy an existing minigraph, placed in ansible/minigraph/<dut_name>.topology.xml, and execute load_minigraph with the copied minigraph on DUT.
For multi-asic platform, minigraph creation from templates is not completed yet, so to load minigraph configuration for multi-asic vs, added a new option to help load a created minigraph, for example, we could load an existing minigraph from here:
https://github.com/Azure/sonic-mgmt/blob/4986dbd816b4bb6f539ddacb32cd99fc03678c5f/ansible/minigraph/vlab-07.t1-8-lag.xml
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
|
For a T2 VOQ chassis, we have a need to just copy the generated minigraph but not deploy them (due to missing functionality that is still under development). So, we need to call 'gen-mg' with deploy=false flag. However, the port_alias calls in 'config_sonic_basedon_testbed.yml' are dependent on the 'deploy' flag, and thus with deploy=false, we run 'port_alias' delegated to localhost and fail when trying to gen-mg on h/w. To address this issue, can we use the new 'copy' flag instead of the 'deploy' flag - name: find interface name mapping and individual interface speed if defined from dut
port_alias: hwsku="{{ hwsku }}"
when: copy is defined and copy|bool == true
- name: find interface name mapping and individual interface speed if defined with local data
port_alias: hwsku="{{ hwsku }}"
delegate_to: localhost
when: copy is not defined or copy|bool == false
Also, move the 'copy' task in config_sonic_basedon_testbed.yml outside the block when 'deploy=true' Then for our T2 chassis scenario, we could use: ./testbed-cli.sh -t testbed.csv -m veos gen-mg chassis1-t2 lab password.txt -e copy=true -e deploy=false |
device. Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Updated copy functionality to just copy and not load unless deploy option is provided. Updated PR description to explain the options. |
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
…atically (sonic-net#15835) src/sonic-utilities * bc7c7929 - (HEAD -> 202205, origin/202205) Add FEC correctable and uncorrectable port stats (sonic-net#2027) (10 hours ago) [Prince George] * 58db48ad - [show][muxcable] update `show mux tunnel-route` to check soc_ipv6 as well (10 hours ago) [Jing Zhang] * 24fc1db8 - [dualtor][route_check] filter out `soc_ipv6` (sonic-net#2899) (10 hours ago) [Jing Zhang] * d89d4832 - [route_check][dualtor] Ignore vlan neighbor route miss (sonic-net#2888) (10 hours ago) [Longxiang Lyu]
…lly (sonic-net#17094) src/sonic-swss * 01bf3b19 - (HEAD -> 202205, origin/202205) [muxorch] Fixing updateRoute logic (sonic-net#2950) (5 hours ago) [Nikola Dancejic] * 1e264e01 - Handle Mac address 'none' (sonic-net#2593) (9 hours ago) [Prince Sunny] * dc0e29b4 - [202205][teamd]: Clean teamd process if LAG creation fails (sonic-net#2888) (sonic-net#2932) (4 days ago) [Lawrence Lee]
…lly (sonic-net#16642) #### Why I did it src/sonic-swss ``` * 0584d35b - (HEAD -> 202305, origin/202305) Revert "Support type7 encoded CAK key for macsec in config_db (sonic-net#2892)" (3 minutes ago) [stormliang] * 7097cf2b - Revert "[teamd]: Clean teamd process if LAG creation fails (sonic-net#2888)" (3 days ago) [stormliang] * a0eb0d07 - Support type7 encoded CAK key for macsec in config_db (sonic-net#2892) (4 days ago) [judyjoseph] * c7e5f10e - [teamd]: Clean teamd process if LAG creation fails (sonic-net#2888) (4 days ago) [Lawrence Lee] * f30b6107 - [CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#2845) (4 days ago) [Nazarii Hnydyn] ``` #### How I did it #### How to verify it #### Description for the changelog
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
This option will skip generating the minigraph from the templates and load a generated minigraph. This is done so that we can load an existing multi-asic minigraph while multi-asic minigraph generation is not in place.
How did you do it?
./testbed-cli.sh -t vtestbed.csv -m veos_vtb copy-mg vms-kvm-t0 lab password.txt
To copy existing minigraph( minigraph/DUT_NAME.TOPO.xml ) to DUT and load minigraph:
./testbed-cli.sh -t vtestbed.csv -m veos_vtb copy-mg vms-kvm-t0 lab password.txt -e deploy=true -e save=true
To generate a new minigraph locally and load the generated minigraph to DUT:
./testbed-cli.sh -t vtestbed.csv -m veos_vtb geb-mg vms-kvm-t0 lab password.txt -e copy=true
How did you verify/test it?
./testbed-cli.sh -t vtestbed.csv -m veos_vtb -k ceos add-topo vms-kvm-multi-asic-t1-lag password.txt
./testbed-cli.sh -t vtestbed.csv -m veos_vtb copy-mg vms-kvm-multi-asic-t1-lag lab password.txt
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation