osism sonic reload performs a full configuration reload on a SONiC switch. The flow is in
osism/commands/sonic.py:550 (class Reload):
Local preparation
- Fetch device from NetBox (_get_device_from_netbox)
- Read the device's config context from NetBox (_get_config_context) — this is the generated config_db.json
- Save it locally (_save_config_context)
- Resolve SSH details and open the connection (_get_ssh_connection_details, _create_ssh_connection)
On the switch (via SSH/SFTP)
5. Generate a unique backup filename: /home/admin/config_db_.json (_generate_backup_filename)
6. Copy the current /etc/sonic/config_db.json to that backup (backup_current_config)
7. Upload the new config via SFTP to /tmp/config_db_current.json (_upload_config_context)
8. sudo config load -y — apply the config (_load_configuration)
9. sudo config reload -y — restart services (_reload_configuration)
10. On success: sudo config save -y to persist (_save_configuration). If step 9 failed, save is skipped.
11. Remove the temporary /tmp/... file (_cleanup_temp_file)
Difference from osism sonic load: load runs steps 1–8 plus save, without config reload (no service restart). reload
is the more invasive path that restarts services.
osism sonic reload performs a full configuration reload on a SONiC switch. The flow is in
osism/commands/sonic.py:550 (class Reload):
Local preparation
On the switch (via SSH/SFTP)
5. Generate a unique backup filename: /home/admin/config_db_.json (_generate_backup_filename)
6. Copy the current /etc/sonic/config_db.json to that backup (backup_current_config)
7. Upload the new config via SFTP to /tmp/config_db_current.json (_upload_config_context)
8. sudo config load -y — apply the config (_load_configuration)
9. sudo config reload -y — restart services (_reload_configuration)
10. On success: sudo config save -y to persist (_save_configuration). If step 9 failed, save is skipped.
11. Remove the temporary /tmp/... file (_cleanup_temp_file)
Difference from osism sonic load: load runs steps 1–8 plus save, without config reload (no service restart). reload
is the more invasive path that restarts services.