|
| 1 | +# Add cluster with Generic Config Updater (GCU) Test Plan |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This test plan covers the dynamic addition of new T1 devices to a running T2 cluster. The feature allows updating the configuration at runtime using generic config update mechanisms, enabling the integration of new neighbors into the system without service disruption. |
| 6 | + |
| 7 | +### Objective |
| 8 | +Verify that: |
| 9 | +- New T1 devices can be added to a live T2 cluster via runtime configuration updates. |
| 10 | +- The devices are correctly registered in the system database. |
| 11 | +- Neighbor connections are established successfully. |
| 12 | +- The newly added devices are operational and can forward data traffic. |
| 13 | + |
| 14 | +### Affected Configuration Tables |
| 15 | +The following configuration/state tables are updated dynamically as part of this test: |
| 16 | +<pre> |
| 17 | +/BGP_NEIGHBOR |
| 18 | +/BUFFER_PG |
| 19 | +/CABLE_LENGTH |
| 20 | +/DEVICE_NEIGHBOR |
| 21 | +/DEVICE_NEIGHBOR_METADATA |
| 22 | +/INTERFACE |
| 23 | +/PORT |
| 24 | +/PORTCHANNEL_MEMBER |
| 25 | +/PORTCHANNEL_INTERFACE |
| 26 | +/PORT_QOS_MAP |
| 27 | +</pre> |
| 28 | + |
| 29 | + |
| 30 | +## Generic Config Updater (GCU) Test Coverage for Multi-ASIC Support |
| 31 | +The existing community test coverage for the Generic Config Updater (GCU) has been enhanced to support running in multi-ASIC platforms and t2 topology. |
| 32 | + |
| 33 | +### Key Changes |
| 34 | +1. Multi-ASIC Adaptation: |
| 35 | +Test cases have been adapted to use a fixture that returns a random ASIC namespace for verification. |
| 36 | + |
| 37 | +2. Namespace Customization: |
| 38 | +For multi-ASIC DUT hosts, JSON patch paths are customized to include the namespace prefix. For changes in global paths, the /localhost prefix was added to the path. |
| 39 | + |
| 40 | +3. Single-ASIC Compatibility: |
| 41 | +For single-ASIC DUT hosts, no changes were made to the paths, ensuring compatibility with the existing test setup. |
| 42 | + |
| 43 | +### Test Case Updates |
| 44 | + |
| 45 | +- test_ipv6.py --> test_ip_bgp.py |
| 46 | +Previously, this test case verified paths only for IPv6 BGP neighbors. It has been expanded to run repeatedly for both IPv4 and IPv6 BGP neighbor types. As a result, the test suite file has been renamed to test_ip_bgp.py to reflect its broader scope. |
| 47 | + |
| 48 | +### Test PRs |
| 49 | + |
| 50 | +Above changes were added via Test PRs: |
| 51 | +- [Generalizing GCU test suite to verify both ip types (IPV4, IPV6) for BGP Neighbors](https://github.com/sonic-net/sonic-mgmt/pull/13650) |
| 52 | +- [[GCU] [MA] Adding support in existing tests - Common changes](https://github.com/sonic-net/sonic-mgmt/pull/15182) |
| 53 | +Separate test PRs handled the addition of T2/multi-ASIC GCU support. They can be tracked from PR #15182, as all related PRs are referenced there. |
| 54 | + |
| 55 | +## Testbed |
| 56 | + |
| 57 | +The test will run on T2 testbeds. |
| 58 | + |
| 59 | +## Testing Plan |
| 60 | + |
| 61 | +### Test Suite # 1 - Basic Add Cluster With Data Traffic |
| 62 | + |
| 63 | +#### Test Objective |
| 64 | + |
| 65 | +To verify updates in config paths: |
| 66 | +<pre> |
| 67 | +/BGP_NEIGHBOR |
| 68 | +/DEVICE_NEIGHBOR |
| 69 | +/DEVICE_NEIGHBOR_METADATA |
| 70 | +/PORTCHANNEL_MEMBER |
| 71 | +/PORTCHANNEL_INTERFACE |
| 72 | +/INTERFACE |
| 73 | +/PORT |
| 74 | +</pre> |
| 75 | + |
| 76 | +#### Test Requirements: |
| 77 | + |
| 78 | +At least two frontend DUT hosts are required to perform traffic. Modifications via apply-patch are applied on the downstream frontend DUT host. The scenario verifies data traffic from upstream to downstream and downstream to downstream. |
| 79 | + |
| 80 | +#### Testing Parameters |
| 81 | + |
| 82 | +- With/without acl config. |
| 83 | +- Apply-patch standalone/aggregrated changes. |
| 84 | + |
| 85 | +#### Setup Configuration |
| 86 | + |
| 87 | +- Select a random ASIC from the downstream host. |
| 88 | +- Select a random BGP neighbor from that namespace and announce a static route for a DST_IP that is advertised only via this neighbor. |
| 89 | +- Verify the route table in the downstream DUT host to ensure that the static route is visible. |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +Remove Peers from Downstream Namespace: |
| 94 | +- Remove all BGP neighbors for the selected ASIC namespace via apply-patch. |
| 95 | +- Verify the route table. All routes for BGP neighbors should be gone. Additionally, all kernel and directly connected routes toward the neighbor IPs should be removed. |
| 96 | +- Shutdown local interfaces for the selected ASIC namespace via apply-patch. |
| 97 | +- Verify that the admin status of local interfaces in the selected ASIC namespace is down/down. |
| 98 | +- Perform data traffic tests toward a randomly selected neighbor. Traffic should fail. |
| 99 | +- Perform data traffic tests toward the static route from the randomly selected neighbor. Traffic should fail. |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +Re-add Peers and Re-enable Interfaces: |
| 104 | +- Change cable lengths. |
| 105 | +- Re-add peers in the downstream namespace. - |
| 106 | +- Re-enable interfaces. |
| 107 | +- Verify that the peers are re-added, BGP sessions are established, and the route table is updated. |
| 108 | +- Verify the buffer profile exists in CONFIG_DB, APPL_DB, and ASIC_DB. |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +#### Testing Steps |
| 113 | + |
| 114 | +Data traffic verifications: |
| 115 | +- Perform data traffic tests toward a randomly selected neighbor/the static route from the randomly selected neighbor. Traffic should pass. Verify there are no packet drops via checking pkt counters. |
| 116 | +- Perform data traffic from upsteram to downstream linecard (interlinecard). Perform data traffic from the other asic of the same downsteram linecard (innerlinecard). |
| 117 | +- Variation with acl config (DATAACL, CTRLPLANE) verifies traffic passes/drops based on acl rules and src/dst port criterion. |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | +[to be enhanced] |
| 124 | +As a test variation, instead of applying changes per ASIC namespace, the same scenario shall be adapted to apply changes to a randomly selected interface that is a member of a portchannel from a randomly selected namespace. |
| 125 | + |
| 126 | +### Test Case # 2 - Update CABLE Length |
| 127 | + |
| 128 | +#### Test Objective |
| 129 | + |
| 130 | +To verify updates in config path |
| 131 | +</pre> |
| 132 | +/CABLE_LENGTH |
| 133 | +</pre> |
| 134 | + |
| 135 | +#### Testing Steps |
| 136 | + |
| 137 | +- Select a random ASIC namespace and shut down the interfaces. |
| 138 | +- Update cable length via apply-patch. Identify the current cable length and add the previous or next supported length value for this frontend card. |
| 139 | +- Bring the interfaces back up via apply-patch. |
| 140 | +- Verify that the interfaces are up. |
| 141 | +- Verify in CONFIG_DB and APPL_DB that the new cable length is applied. |
| 142 | +- Verify that updated pg lossless profile was created in CONFIG_DB and APPL_DB and that it was assigned to active interfaces. |
| 143 | + |
| 144 | + |
| 145 | +### Test Case # 3 - Load QoS |
| 146 | + |
| 147 | +#### Test Objective |
| 148 | +To verify qos updates in multi-asic t2 platform. |
| 149 | +To verify updates in tables |
| 150 | +<pre> |
| 151 | +/BUFFER_PG |
| 152 | +/PORT_QOS_MAP |
| 153 | +</pre> |
| 154 | + |
| 155 | +#### Testing Steps |
| 156 | + |
| 157 | +- Select a random ASIC namespace and shut down the interfaces. (to be modified per interface) |
| 158 | +- Remove QoS config via apply-patch remove operation for tables "BUFFER_PG", "PORT_QOS_MAP". |
| 159 | +- Verify that configuration is cleared in CONFIG_DB, APPL_DB. |
| 160 | +- Add back QoS config via apply-patch add operation in tables "BUFFER_PG", "PORT_QOS_MAP". |
| 161 | +- Verify that configuration is populated to CONFIG_DB, APPL_DB. |
| 162 | +- Bring the interfaces back up via apply-patch. |
| 163 | +- Verify that the interfaces are up. |
| 164 | + |
| 165 | +### Test PRs |
| 166 | + |
| 167 | +Above changes were added via Test PR: |
| 168 | +- [Adding new Tests for Chassis/Multi-ASIC GCU](https://github.com/sonic-net/sonic-mgmt/pull/14887) |
0 commit comments