Skip to content

Document config refresh on SONiC switches #991

Description

@jklare

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

  1. Fetch device from NetBox (_get_device_from_netbox)
  2. Read the device's config context from NetBox (_get_config_context) — this is the generated config_db.json
  3. Save it locally (_save_config_context)
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions