Before scheduling any jobs validate the physical testbed to make sure all links are connected and are operationally UP, also we need a clean configuration file with valid interface settings (breakout, speed, FEC, admin status, etc.), no IP interfaces, no BGP instances, and no QoS. The scripts will use this clean configuration file to restore the DUT to its default configuration as part of the clean-up process.
The cleanup configuration file should be created at /etc/sonic/clean_config.json. The clean configuration file follows the config_db.json format. It must include the port-related settings for lane mapping, speed, and admin status.
For every DUT in the testbed, backup the default config(if needed)
Start with the default configuration after a fresh installation of SONiC
Alternatively, you can also create a clean config by editing the config_db.json
as below
Edit config_db.json
and remove the following configuration blocks and save the file
VLAN
VLAN_MEMBER
PORTCHANNEL
PORTCHANNEL_MEMBER
BGP configuration
Loopback interfaces
Edit "DEVICE_METADATA
" in /etc/sonic/config_db.json
as below
Configure "hostname" for each device (Example: Leaf01, Leaf02, Spine01, Spine02)
Add "docker_routing_config_mode": "split" configuration
Configure the below list through config_db.json:
The management IP address for eth0 and gateway
Port breakout (if any)
Port speed, FEC, Auto-negotiation on links connected to other devices and Ixia
Configure "admin_status": "down"
Save config_db.json
Copy config_db.json to /etc/sonic/clean_config.json
clean_config.json should be built using the text editor or SONiC CLI, but not both.
Load the configuration on the device
Add the following line to /etc/sonic/frr/vtysh.conf
Cleanup the BGP configuration from FRR
Build the Chaos testbed file using "~/testbeds/ftas_chaos_topo.py"
The chaos test suite loads a base configuration to all DUTs and Ixia for its test scripts. So ensure the following variables are set to False in the testbed file.
Please make sure DUTs have a clean or default configuration before the Chaos test run.
Chaos suite generates a statistics report file at ~/reports/report.txt to track its execution status and metric data for all test scripts. So please make sure to remove this file before running the Chaos test to avoid Ixia library errors