Using this process, Script will clear the base config like port--channel related config, IP related config, VXlan related config and more related configuration.
User can opt for other options as per deployment type.
Available options for FMCLI installation:
1) install
- Install FMCLI
2) uninstall
- Uninstall FMCLI
3) installresetconfig
- Install FMCLI and reset the configuration
4) upgrade
- Upgrade FMCLI to the latest version
5) install_withQOS
- Install FMCLI and enable QoS feature
6) installresetconfig_withQOS
- Install FMCLI, reset the configuration, and enable QoS feature
Please enter your choice (1-6) to proceed with the FMCLI installation: 1
Installer will proceed with FMCLI-install ...
e2ef8a51359d: Loading layer [==================================================>] 72.54MB/72.54MB
ae2d55769c5e: Loading layer [==================================================>] 7.401MB/7.401MB
3054512b6f71: Loading layer [==================================================>] 31.35MB/31.35MB
997b8e79e84f: Loading layer [==================================================>] 5.12kB/5.12kB
e6c5004ee77f: Loading layer [==================================================>] 11.7MB/11.7MB
f58d795dfab9: Loading layer [==================================================>] 2.56kB/2.56kB
ed46ea0f4e17: Loading layer [==================================================>] 31.74MB/31.74MB
1c38a701a3d6: Loading layer [==================================================>] 42.7MB/42.7MB
c4456c24c820: Loading layer [==================================================>] 1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer:latest' is loaded.
fd6eb1095255b6a0f2358fb0adaeeed828acc6798867f8f4ae44e545af35ae18
Docker container 'agent_installer' is running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fd6eb1095255 avizdock/agent_installer:latest "python3" 1 second ago Up Less than a second agent_installer
Docker container 'ones-fm' is running.
Update success for 192.168.1.1
/usr/local/lib/python3.8/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
/usr/local/lib/python3.8/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
Ignore below Error if Installing Agent via docker installer
ones-fm container is not running
Operation = install
##### params = {'ip': '192.168.1.1', 'passwd': 'Aviz@123', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
<paramiko.client.SSHClient object at 0x74651dcc93d0>
Connection to switch 192.168.1.1 successfull.....................
/home/ones_fm_agent
Creating work directory on the device 192.168.1.1........
Work Directory ones-fm_1774551835_9809117 created successfully on the device 192.168.1.1 .............
Copying FMCLI_Installer.py to directory ones-fm_1774551835_9809117 on the device 192.168.1.1 .............
Debug command used:: sudo ls ones-fm_1774551835_9809117/FMCLI_Installer.py
The file 'ones-fm_1774551835_9809117/FMCLI_Installer.py' copy success on the device.
Copying FMCLI_Installer.py to directory ones-fm_1774551835_9809117 successful on the device 192.168.1.1 .............
Copying fmcli-app.tgz to directory ones-fm_1774551835_9809117 on the device 192.168.1.1 .............
Debug command used:: sudo ls ones-fm_1774551835_9809117/fmcli-app.tgz
The file 'ones-fm_1774551835_9809117/fmcli-app.tgz' copy success on the device.
Copying fmcli-app.tgz to directory ones-fm_1774551835_9809117 successful on the device 192.168.1.1 .............
File '/usr/lib/frr/frr-reload.py' exists in container 'bgp'
Skip scp as File: /usr/lib/frr/frr-reload.py exits inside bgp container
#################### Installing FMCLI on the device 192.168.1.1 ######################
####### Debug LOGS on the device 192.168.1.1 #######
fmcli-app/
fmcli-app/ip_validate
fmcli-app/fmcli_read_db_schema
fmcli-app/fmclimain.service
fmcli-app/fmcli_composer.py
fmcli-app/fmcli
fmcli-app/device_cleanup
fmcli-app/frr-reload.py
fmcli-app/libcligen.so..
fmcli-app/fmcli.version
fmcli-app/fmcli.cli
fmcli-app/fmcli.sh
fmcli-app/fmcli_composer_mapping.cfg
fmcli-app/libhiredis.so.1.1.0
cli
cli/fmcli-app-amd.tgz
Extracting cli/fmcli-app-amd.tgz...
Installing Aviz-FMCLI ..........
File '/usr/lib/frr/frr-reload.py' already exists in container 'bgp'
Aviz-FMCLI installation successful........
FMCLI version: 4.2.11
Created symlink /etc/systemd/system/multi-user.target.wants/fmclimain.service → /etc/systemd/system/fmclimain.service.
/tmp/fmcliStartup.init
FM-Agent installed successfully on the device 192.168.1.1........
####### Deleting ones-fm_1774551835_9809117 dir on the device 192.168.1.1 #######
Deployment of FM-Agent to switch 192.168.1.1 is Completed
FMCLI install Result
{'192.168.1.1': {'status': 'PASS', 'fmcli_version': '4.2.11'}}
╒═════════╤═════════════╤══════════════════╤═════════════════╕
│ SL.No │ Device │ install Result │ FMCLI Version │
╞═════════╪═════════════╪══════════════════╪═════════════════╡
│ 1 │ 192.168.1.1 │ PASS │ 4.2.11 │
╘═════════╧═════════════╧══════════════════╧═════════════════╛
Deployment logs have been saved to the log file: ones-fm-agent-deploy-1774551834.log
root@Switch:~$ sudo fmcli
fmcli#
Available options for FMCLI installation:
1) install
- Install FMCLI
2) uninstall
- Uninstall FMCLI
3) installresetconfig
- Install FMCLI and reset the configuration
4) upgrade
- Upgrade FMCLI to the latest version
5) install_withQOS
- Install FMCLI and enable QoS feature
6) installresetconfig_withQOS
- Install FMCLI, reset the configuration, and enable QoS feature
Please enter your choice (1-6) to proceed with the FMCLI installation: 2
Installer will proceed with FMCLI-uninstall ...
e2ef8a51359d: Loading layer [==================================================>] 72.54MB/72.54MB
ae2d55769c5e: Loading layer [==================================================>] 7.401MB/7.401MB
3054512b6f71: Loading layer [==================================================>] 31.35MB/31.35MB
997b8e79e84f: Loading layer [==================================================>] 5.12kB/5.12kB
e6c5004ee77f: Loading layer [==================================================>] 11.7MB/11.7MB
f58d795dfab9: Loading layer [==================================================>] 2.56kB/2.56kB
ed46ea0f4e17: Loading layer [==================================================>] 31.74MB/31.74MB
1c38a701a3d6: Loading layer [==================================================>] 42.7MB/42.7MB
c4456c24c820: Loading layer [==================================================>] 1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer:latest' is loaded.
1be400daec50d71ffc227da37bfb8da250b2f71301f74a1fca56531707611795
Docker container 'agent_installer' is running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1be400daec50 avizdock/agent_installer:latest "python3" 1 second ago Up Less than a second agent_installer
Docker container 'ones-fm' is running.
Update success for 192.168.1.1
/usr/local/lib/python3.8/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
/usr/local/lib/python3.8/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
Ignore below Error if Installing Agent via docker installer
ones-fm container is not running
Operation = uninstall
##### params = {'ip': '192.168.1.1', 'passwd': 'Aviz@123', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
<paramiko.client.SSHClient object at 0x749b2bc31370>
Connection to switch 192.168.1.1 successfull.....................
/home/ones_fm_agent
############### Uninstalling FM Agent ###############
FMCLI uninstall Result
{'192.168.1.1': {'status': 'PASS', 'fmcli_version': ''}}
╒═════════╤═════════════╤════════════════════╕
│ SL.No │ Device │ uninstall Result │
╞═════════╪═════════════╪════════════════════╡
│ 1 │ 192.168.1.1 │ PASS │
╘═════════╧═════════════╧════════════════════╛
Deployment logs have been saved to the log file: ones-fm-agent-deploy-1774551754.log
Available options for FMCLI installation:
1) install
- Install FMCLI
2) uninstall
- Uninstall FMCLI
3) installresetconfig
- Install FMCLI and reset the configuration
4) upgrade
- Upgrade FMCLI to the latest version
5) install_withQOS
- Install FMCLI and enable QoS feature
6) installresetconfig_withQOS
- Install FMCLI, reset the configuration, and enable QoS feature
Please enter your choice (1-6) to proceed with the FMCLI installation: 3
Installer will proceed with FMCLI-installresetconfig ...
e2ef8a51359d: Loading layer [==================================================>] 72.54MB/72.54MB
ae2d55769c5e: Loading layer [==================================================>] 7.401MB/7.401MB
3054512b6f71: Loading layer [==================================================>] 31.35MB/31.35MB
997b8e79e84f: Loading layer [==================================================>] 5.12kB/5.12kB
e6c5004ee77f: Loading layer [==================================================>] 11.7MB/11.7MB
f58d795dfab9: Loading layer [==================================================>] 2.56kB/2.56kB
ed46ea0f4e17: Loading layer [==================================================>] 31.74MB/31.74MB
1c38a701a3d6: Loading layer [==================================================>] 42.7MB/42.7MB
c4456c24c820: Loading layer [==================================================>] 1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer:latest' is loaded.
d956cc745c1b2fb4cf545894fbc9185da28e13c6a337c596e3b991b523fb965e
Docker container 'agent_installer' is running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d956cc745c1b avizdock/agent_installer:latest "python3" 1 second ago Up Less than a second agent_installer
Docker container 'ones-fm' is running.
Update success for 192.168.1.1
/usr/local/lib/python3.8/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"cipher": algorithms.TripleDES,
/usr/local/lib/python3.8/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
"class": algorithms.TripleDES,
Ignore below Error if Installing Agent via docker installer
ones-fm container is not running
Operation = installresetconfig
##### params = {'ip': '192.168.1.1', 'passwd': 'Aviz@123', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch###############
<paramiko.client.SSHClient object at 0x73482cd33370>
Connection to switch 192.168.1.1 successfull.....................
/home/ones_fm_agent
Creating work directory on the device 192.168.1.1........
Work Directory ones-fm_1774552019_5766664 created successfully on the device 192.168.1.1 .............
Copying FMCLI_Installer.py to directory ones-fm_1774552019_5766664 on the device 192.168.1.1 .............
Debug command used:: sudo ls ones-fm_1774552019_5766664/FMCLI_Installer.py
The file 'ones-fm_1774552019_5766664/FMCLI_Installer.py' copy success on the device.
Copying FMCLI_Installer.py to directory ones-fm_1774552019_5766664 successful on the device 192.168.1.1 .............
Copying fmcli-app.tgz to directory ones-fm_1774552019_5766664 on the device 192.168.1.1 .............
Debug command used:: sudo ls ones-fm_1774552019_5766664/fmcli-app.tgz
The file 'ones-fm_1774552019_5766664/fmcli-app.tgz' copy success on the device.
Copying fmcli-app.tgz to directory ones-fm_1774552019_5766664 successful on the device 192.168.1.1 .............
File '/usr/lib/frr/frr-reload.py' exists in container 'bgp'
Skip scp as File: /usr/lib/frr/frr-reload.py exits inside bgp container
#################### Installing FMCLI on the device 192.168.1.1 ######################
####### Debug LOGS on the device 192.168.1.1 #######
fmcli-app/
fmcli-app/ip_validate
fmcli-app/fmcli_read_db_schema
fmcli-app/fmclimain.service
fmcli-app/fmcli_composer.py
fmcli-app/fmcli
fmcli-app/device_cleanup
fmcli-app/frr-reload.py
fmcli-app/libcligen.so..
fmcli-app/fmcli.version
fmcli-app/fmcli.cli
fmcli-app/fmcli.sh
fmcli-app/fmcli_composer_mapping.cfg
fmcli-app/libhiredis.so.1.1.0
cli
cli/fmcli-app-amd.tgz
Extracting cli/fmcli-app-amd.tgz...
Installing Aviz-FMCLI ..........
File '/usr/lib/frr/frr-reload.py' already exists in container 'bgp'
Aviz-FMCLI installation successful........
FMCLI version: 4.2.11
Created symlink /etc/systemd/system/multi-user.target.wants/fmclimain.service → /etc/systemd/system/fmclimain.service.
/tmp/fmcliStartup.init
FM-Agent installed successfully on the device 192.168.1.1........
####### Deleting ones-fm_1774552019_5766664 dir on the device 192.168.1.1 #######
Deployment of FM-Agent to switch 192.168.1.1 is Completed
##### params = {'ip': '192.168.1.1', 'passwd': 'Aviz@123', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Connecting to switch - 192.168.1.1 ###############
<paramiko.client.SSHClient object at 0x73482cd33850>
Connection to switch 192.168.1.1 successfull.....................
/home/ones_fm_agent
Creating work directory on the device 192.168.1.1........
Work Directory ones-fm_1774552148_8973343 created successfully on the device 192.168.1.1 .............
Copying config-reset.py to directory ones-fm_1774552148_8973343 on the device 192.168.1.1 .............
Debug command used:: sudo ls ones-fm_1774552148_8973343/config-reset.py
The file 'ones-fm_1774552148_8973343/config-reset.py' copy success on the device.
Copying config-reset.py to directory ones-fm_1774552148_8973343 successful on the device 192.168.1.1 .............
File '/usr/lib/frr/frr-reload.py' exists in container 'bgp'
Skip scp as File: /usr/lib/frr/frr-reload.py exits inside bgp container
#################### Cleaning config on the device 192.168.1.1 ######################
##### Reconnect params = {'ip': '192.168.1.1', 'passwd': 'Aviz@123', 'user': 'admin', 'server_ip': '172.17.0.2', 'fm_port': None} #####
###############Re-Connecting to switch - 192.168.1.1 ###############
<paramiko.client.SSHClient object at 0x73482ccc1cd0>
Re-Connection to switch 192.168.1.1 successfull.....................
####### Debug LOGS on the device 192.168.1.1 #######
Running command: /usr/local/bin/sonic-cfggen -d --print-data > /run/tmpxqf7rch2
Running command: mv -f /run/tmpxqf7rch2 /etc/sonic/config_db.json
Running command: sync;sync;sync
34285 Bytes written
A backup of Initial Configuration is saved at /host/backup_config_db.json
MGMT_PORT configuration already exists. No changes made....
SONiC Version:
docker_routing_config_mode Pre-configured to split-unified
Platform and HWSKU Valid - /usr/share/sonic/device/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G-DPB
Running command: /usr/local/bin/db_migrator.py -o check_version -f /host/updated_config_db.json
Stopping SONiC target ...
Stopping service autobreakoutmgrd.service ...
Stopping service bgp.service ...
Stopping service caclmgrd.service ...
Stopping service dhcp_relay.service ...
Stopping service gbsyncd.service ...
Stopping service hostcfgd.service ...
Stopping service iccpd.service ...
Stopping service l2mcd.service ...
Stopping service lldp.service ...
Stopping service mgmt-framework.service ...
Stopping service mgmt-framework.timer ...
Stopping service nat.service ...
Stopping service pmon.service ...
Stopping service portinitdone.service ...
Stopping service procdockerstatsd.service ...
Stopping service radv.service ...
Stopping service resrcmgrd.service ...
Stopping service rsyslog-config.service ...
Stopping service sflow.service ...
Stopping service sonic-init-updatedb.service ...
Stopping service stp.service ...
Stopping service swss.service ...
Stopping service syncd.service ...
Stopping service tam.service ...
Stopping service teamd.service ...
Stopping service telemetry.timer ...
Stopping service udld.service ...
Stopping service vrrp.service ...
Services are stopped
Running command: queuestat -D
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/copp_config.json --write-to-db
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json --write-to-db
Running command: /usr/local/bin/sonic-cfggen -j /host/updated_config_db.json --write-to-db
upgrade: Migrating Conifg DB from version_4_4_1 to version_4_4_1
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment
Resetting failed status on autobreakoutmgrd.service
Resetting failed status on bgp.service
Resetting failed status on caclmgrd.service
Resetting failed status on dhcp_relay.service
Resetting failed status on gbsyncd.service
Resetting failed status on hostcfgd.service
Resetting failed status on hostname-config.service
Resetting failed status on iccpd.service
Resetting failed status on interfaces-config.service
Resetting failed status on l2mcd.service
Resetting failed status on lacp_helper.service
Resetting failed status on lldp.service
Resetting failed status on mgmt-framework.service
Resetting failed status on mgmt-framework.timer
Resetting failed status on nat.service
Resetting failed status on ntp-config.service
Resetting failed status on pmon.service
Resetting failed status on portinitdone.service
Resetting failed status on procdockerstatsd.service
Resetting failed status on radv.service
Resetting failed status on resrcmgrd.service
Resetting failed status on rsyslog-config.service
Resetting failed status on sflow.service
Resetting failed status on sonic-init-updatedb.service
Resetting failed status on stp.service
Resetting failed status on swss.service
Resetting failed status on syncd.service
Resetting failed status on tam.service
Resetting failed status on teamd.service
Resetting failed status on telemetry.timer
Resetting failed status on udld.service
Resetting failed status on vrrp.service
Restarting SONiC target ...
Starting service autobreakoutmgrd.service ...
Starting service bgp.service ...
Starting service caclmgrd.service ...
Starting service dhcp_relay.service ...
Starting service gbsyncd.service ...
Starting service hostcfgd.service ...
Starting service iccpd.service ...
Starting service l2mcd.service ...
Starting service lldp.service ...
Starting service mgmt-framework.service ...
Starting service mgmt-framework.timer ...
Starting service nat.service ...
Starting service pmon.service ...
Starting service portinitdone.service ...
Starting service procdockerstatsd.service ...
Starting service radv.service ...
Starting service resrcmgrd.service ...
Starting service rsyslog-config.service ...
Starting service sflow.service ...
Starting service sonic-init-updatedb.service ...
Starting service stp.service ...
Starting service swss.service ...
Starting service syncd.service ...
Starting service tam.service ...
Starting service teamd.service ...
Starting service telemetry.timer ...
Starting service udld.service ...
Starting service vrrp.service ...
Services are started
Reloading Monit configuration ...
32a5372c50ea docker-router-advertiser:latest "/usr/bin/docker-ini…" 4 months ago Exited (0) About a minute ago radv
14bbf6993d3b docker-lldp:latest "/usr/bin/docker-lld…" 4 months ago Exited (0) About a minute ago lldp
3e1b49db8e16 docker-l2mcd:latest "/usr/local/bin/supe…" 4 months ago Exited (0) About a minute ago l2mcd
d93525df4f0d docker-sflow:latest "/usr/local/bin/supe…" 4 months ago Exited (137) About a minute ago sflow
b2cff731de17 docker-snmp:latest "/usr/local/bin/supe…" 4 months ago Exited (137) About a minute ago snmp
fd9eff2ea3c6 docker-stp:latest "/usr/local/bin/supe…" 4 months ago Exited (0) About a minute ago stp
a615d256f926 docker-dhcp-relay-ent-base:latest "/usr/bin/docker_ini…" 4 months ago Exited (137) About a minute ago dhcp_relay
78bc9aa34fb4 docker-vrrp:latest "/usr/local/bin/supe…" 4 months ago Exited (137) About a minute ago vrrp
f3e36a994b00 docker-iccpd:latest "/usr/local/bin/supe…" 4 months ago Exited (0) About a minute ago iccpd
a042fb4ffd2e docker-udld:latest "/usr/local/bin/supe…" 4 months ago Exited (0) About a minute ago udld
6bf17b55aeb2 docker-tam:latest "/usr/local/bin/supe…" 4 months ago Exited (0) About a minute ago tam
6d862c244283 docker-sonic-telemetry:latest "/usr/local/bin/supe…" 4 months ago Exited (0) About a minute ago telemetry
c45e072c4c24 docker-nat:latest "/usr/local/bin/supe…" 4 months ago Exited (137) About a minute ago nat
3c9c088bc85e docker-platform-monitor:latest "/usr/bin/docker_ini…" 4 months ago Exited (137) About a minute ago pmon
Reinitializing monit daemon
Reload complete!
Debug1 -
Debug2 - ####
Debug end #######################################
Cleanup successfully on the device 192.168.1.1........
####### Deleting ones-fm_1774552148_8973343 dir on the device 192.168.1.1 #######
Cleanup switch 192.168.1.1 is Completed
FMCLI installresetconfig Result
{'192.168.1.1': {'status': 'PASS', 'fmcli_version': '4.2.11'}}
Config Cleanup Result
{'192.168.1.1': 'PASS'}
#######
╒═════════╤═════════════╤══════════════════╤══════════════════════╤═════════════════╕
│ SL.No │ Device │ Install Result │ ConfigReset Result │ FMCLI Version │
╞═════════╪═════════════╪══════════════════╪══════════════════════╪═════════════════╡
│ 1 │ 192.168.1.1 │ PASS │ PASS │ 4.2.11 │
╘═════════╧═════════════╧══════════════════╧══════════════════════╧═════════════════╛
Deployment logs have been saved to the log file: ones-fm-agent-deploy-1774552018.log