[Enterprise SONiC] Warm Reboot & Fast Reboot Follow
Example:
- Warm Reboot
- Fast Reboot
Tested model & firmware version:
- Switch model name:
AS7326-56X
- Edgecore SONiC version:
202012.1
202012.2
202111.3
202111.8
Example 1: Warm Reboot
Note: Warm reboot is to be able in-service restart and upgrade SONiC software without impacting the data plane.
https://github.com/Azure/SONiC/blob/master/doc/warm-reboot/SONiC_Warmboot.md#cold-restart-fallback
Note: /etc/sonic/config_db.json won't be reloaded.
Procedure :
Step 1. Upgrade SONiC software. (Refer to this article)
admin@sonic:~$ sudo sonic-installer list
Current: SONiC-OS-Edgecore-SONiC_20231006_073817_ec202111_575
Next: SONiC-OS-Edgecore-SONiC_20231006_073817_ec202111_575
Available:
SONiC-OS-Edgecore-SONiC_20231006_073817_ec202111_575
admin@sonic:~$ sudo sonic-installer install http://188.188.99.1/ecsonic/Edgecore-SONiC_20231127_051854_ec202111_657.bin -y
admin@sonic:~$ sudo sonic-installer list
Current: SONiC-OS-Edgecore-SONiC_20231006_073817_ec202111_575
Next: SONiC-OS-Edgecore-SONiC_20231127_051854_ec202111_657
Available:
SONiC-OS-Edgecore-SONiC_20231127_051854_ec202111_657
SONiC-OS-Edgecore-SONiC_20231006_073817_ec202111_575
Step 2. Warm-reboot to apply the new software version without impacting the data plane.
admin@sonic:~$ sudo warm-reboot
Warning: The unit file, source configuration file or drop-ins of mux.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Failed to stop xstp.service: Unit xstp.service not loaded.
Warning: Stopping docker.service, but it can still be activated by:
docker.socket
Failed to mangle name: Invalid argument
Failed to expand names: Invalid argument
[ 5.580037] rc.local[572]: + cat /etc/sonic/sonic_version.yml
[ 5.589689] rc.local[575]: + sed -e s/build_version: //g;s/'//g
[ 5.597246] rc.local[573]: + grep build_version
[ 5.613563] rc.local[568]: + SONIC_VERSION=Edgecore-SONiC_20231127_051854_ec202111_657
[ 5.632946] rc.local[568]: + FIRST_BOOT_FILE=/host/image-Edgecore-SONiC_20231127_051854_ec202111_657/platform/firsttime
[ 5.676639] rc.local[568]: + SONIC_CONFIG_DIR=/host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config
[ 5.688856] rc.local[568]: + SONIC_ENV_FILE=/host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config/sonic-environment
[ 5.702711] rc.local[568]: + [ -d /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config -a -f /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config/sonic-environment ]
[ 5.732980] rc.local[568]: + echo moving file /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config/sonic-environment to /etc/sonic
[ 5.760249] rc.local[568]: moving file /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config/sonic-environment to /etc/sonic
[ 5.785054] rc.local[568]: + mv /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/sonic-config/sonic-environment /etc/sonic
[ 5.814353] rc.local[568]: + logger SONiC version Edgecore-SONiC_20231127_051854_ec202111_657 starting up...
[ 5.836813] rc.local[568]: + grub_installation_needed=
[ 5.852794] rc.local[568]: + [ ! -e /host/machine.conf ]
[ 5.872825] rc.local[568]: + migrate_nos_configuration
[ 5.892840] rc.local[568]: + rm -rf /host/migration
[ 5.912825] rc.local[568]: + mkdir -p /host/migration
[ 5.930077] rc.local[617]: + cat /proc/cmdline
[ 5.946395] kdump-tools[552]: Starting kdump-tools:
[ 5.961594] rc.local[568]: + set -- BOOT_IMAGE=/image-Edgecore-SONiC_20231127_051854_ec202111_657/boot/vmlinuz-5.10.0-8-2-amd64 root=UUID=38c656ca-8622-486e-85e2-d8002620b00d rw console=tty0 console=ttyS0,115200n8 quiet intel_idle.max_cstate=0 net.ifnames=0 biosdevname=0 loop=image-Edgecore-SONiC_20231127_051854_ec202111_657/fs.squashfs loopfstype=squashfs systemd.unified_cgroup_hierarchy=0 apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1 pcie_aspm=off SONIC_BOOT_TYPE=warm SONIC_REBOOT_TIME="Tue 20 Jun 2023 04:26:35 PM UTC"
[ 6.024857] rc.local[568]: + [ -n ]
[ 6.036803] rc.local[568]: + . /host/machine.conf
[ 6.052822] rc.local[568]: + onie_arch=x86_64
[ 6.068848] rc.local[568]: + onie_bin=
[ 6.080802] rc.local[568]: + onie_boot_reason=install
[ 6.096814] rc.local[568]: + onie_build_date=2018-02-08T21:53+0800
[ 6.112804] rc.local[568]: + onie_build_machine=accton_as7726_32x
[ 6.128829] rc.local[568]: + onie_build_platform=x86_64-accton_as7726_32x-r0
[ 6.144831] rc.local[568]: + onie_cli_static_parms=
[ 6.160840] rc.local[568]: + onie_cli_static_url=http://188.188.99.1/ecsonic/Edgecore-SONiC_20231006_073817_ec202111_575bin
[ 6.180824] rc.local[568]: + onie_config_version=1
[ 6.196801] rc.local[568]: + onie_dev=/dev/sda2
[ 6.212790] rc.local[568]: + onie_exec_url=http://188.188.99.1/ecsonic/Edgecore-SONiC_20231006_073817_ec202111_575bin
[ 6.236824] rc.local[568]: + onie_firmware=auto
[ 6.256804] rc.local[568]: + onie_grub_image_name=grubx64.efi
[ 6.272783] rc.local[568]: + onie_initrd_tmp=/
[ 6.288792] rc.local[568]: + onie_installer=/var/tmp/installer
[ 6.304790] rc.local[568]: + onie_kernel_version=4.9.57
[ 6.320789] rc.local[568]: + onie_machine=accton_as7726_32x
[ 6.336785] rc.local[568]: + onie_machine_rev=0
[ 6.352785] rc.local[568]: + onie_partition_type=gpt
[ 6.368793] rc.local[568]: + onie_platform=x86_64-accton_as7726_32x-r0
[ 6.384841] rc.local[568]: + onie_root_dir=/mnt/onie-boot/onie
[ 6.400820] rc.local[568]: + onie_skip_ethmgmt_macs=no
[ 6.416814] rc.local[568]: + onie_switch_asic=bcm
[ 6.432801] rc.local[568]: + onie_vendor_id=259
[ 6.448783] rc.local[568]: + onie_version=2017.11.00.05
[ 6.464778] rc.local[568]: + program_console_speed
[ 6.481043] kdump-tools[598]: no crashkernel= parameter in the kernel cmdline ...
[ 6.504859] kdump-tools[641]: failed!
[ 6.517506] rc.local[621]: + grep -Eo console=ttyS[0-9]+,[0-9]+
[ 6.533589] rc.local[620]: + cat /proc/cmdline
[ 6.553688] rc.local[623]: + cut -d , -f2
[ 6.569470] rc.local[568]: + speed=115200
[ 6.584776] rc.local[568]: + [ -z 115200 ]
[ 6.600814] rc.local[568]: + CONSOLE_SPEED=115200
[ 6.617878] rc.local[627]: + grep keep-baud
[ 6.633606] rc.local[626]: + grep agetty /lib/systemd/system/serial-getty@.service
[ 6.653063] rc.local[627]: ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I $TERM
[ 6.673426] rc.local[568]: + [ 0 = 0 ]
[ 6.684812] rc.local[568]: + sed -i s|\-\-keep\-baud .* %I| 115200 %I|g /lib/systemd/system/serial-getty@.service
[ 6.704802] rc.local[568]: + systemctl daemon-reload
[ 6.720773] rc.local[568]: + [ -f /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/platform/firsttime ]
[ 6.740784] rc.local[568]: + echo First boot detected. Performing first boot tasks...
[ 6.756795] rc.local[568]: First boot detected. Performing first boot tasks...
[ 6.772770] rc.local[568]: + [ -n ]
[ 6.784777] rc.local[568]: + [ -n x86_64-accton_as7726_32x-r0 ]
[ 6.800817] rc.local[568]: + platform=x86_64-accton_as7726_32x-r0
[ 6.808689] rc.local[568]: + [ -d /host/old_config ]
[ 6.824801] rc.local[568]: + mv -f /host/old_config /etc/sonic/
[ 6.840874] rc.local[568]: + rm -rf /etc/sonic/old_config/old_config
[ 6.860821] rc.local[568]: + touch /tmp/pending_config_migration
[ 6.876813] rc.local[568]: + touch /tmp/notify_firstboot_to_platform
[ 6.892965] rc.local[568]: + [ ! -d /host/reboot-cause/platform ]
[ 6.908835] rc.local[568]: + [ -d /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/platform/x86_64-accton_as7726_32x-r0 ]
[ 6.932815] rc.local[568]: + dpkg -i /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/platform/x86_64-accton_as7726_32x-r0/sonic-platform-accton-as7726-32x_1.1_amd64.deb
[ 6.961508] rc.local[674]: Selecting previously unselected package sonic-platform-accton-as7726-32x.
[ 6.980850] rc.local[674]: (Reading database ... 35055 files and directories currently installed.)
[ 7.000840] rc.local[674]: Preparing to unpack .../sonic-platform-accton-as7726-32x_1.1_amd64.deb ...
[ 7.020807] rc.local[674]: Unpacking sonic-platform-accton-as7726-32x (1.1) ...
[ 7.040857] rc.local[674]: Setting up sonic-platform-accton-as7726-32x (1.1) ...
[ 7.062030] rc.local[710]: Created symlink /etc/systemd/system/saibcm-modules.service.wants/as7726-32x-platform-handle_mac.service → /lib/systemd/system/as7726-32x-platform-handle_mac.service.
[ 7.221145] rc.local[735]: Created symlink /etc/systemd/system/multi-user.target.wants/as7726-32x-platform-init.service → /lib/systemd/system/as7726-32x-platform-init.service.
[ 7.553082] rc.local[753]: Created symlink /etc/systemd/system/multi-user.target.wants/as7726-32x-platform-monitor-fan.service → /lib/systemd/system/as7726-32x-platform-monitor-fan.service.
[ 7.897535] rc.local[771]: Created symlink /etc/systemd/system/multi-user.target.wants/as7726-32x-platform-monitor-psu.service → /lib/systemd/system/as7726-32x-platform-monitor-psu.service.
[ 8.244020] rc.local[789]: Created symlink /etc/systemd/system/multi-user.target.wants/as7726-32x-platform-monitor.service → /lib/systemd/system/as7726-32x-platform-monitor.service.
[ 27.853971] rc.local[568]: + sync
[ 27.948698] rc.local[568]: + migrate_linux_configuration
[ 27.964975] rc.local[1196]: + echo /host/image-Edgecore-SONiC_20231006_073817_ec202111_575 /host/image-Edgecore-SONiC_20231127_051854_ec202111_657
[ 27.989131] rc.local[1197]: + sed -e s/\/host\///g -e s/image-Edgecore-SONiC_20231127_051854_ec202111_657//g
[ 28.009169] rc.local[1198]: + tr -d
[ 28.020955] rc.local[568]: + another_image=image-Edgecore-SONiC_20231006_073817_ec202111_575
[ 28.040808] rc.local[568]: + resolve_conf_path=/etc/resolv.conf
[ 28.056788] rc.local[568]: + [ -f /host/image-Edgecore-SONiC_20231006_073817_ec202111_575/rw/etc/resolv.conf ]
[ 28.076804] rc.local[568]: + cp /host/image-Edgecore-SONiC_20231006_073817_ec202111_575/rw/etc/resolv.conf /etc/resolv.conf
[ 28.096787] rc.local[568]: + [ -n x86_64-accton_as7726_32x-r0 ]
[ 28.112812] rc.local[568]: + [ -n ]
[ 28.124843] rc.local[568]: + mkdir -p /var/platform
[ 28.144882] rc.local[568]: + sed -i -e s/__PLATFORM__/x86_64-accton_as7726_32x-r0/g /etc/default/kdump-tools
[ 28.164865] rc.local[568]: + firsttime_exit
[ 28.176795] rc.local[568]: + rm -rf /host/image-Edgecore-SONiC_20231127_051854_ec202111_657/platform/firsttime
[ 28.196830] rc.local[568]: + exit 0
Debian GNU/Linux 11 sonic ttyS0
sonic login: admin
Password:
Linux sonic 5.10.0-8-2-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64
You are on
____ ___ _ _ _ ____
/ ___| / _ \| \ | (_)/ ___|
\___ \| | | | \| | | |
___) | |_| | |\ | | |___
|____/ \___/|_| \_|_|\____|
-- Software for Open Networking in the Cloud --
Unauthorized access and/or use are prohibited.
All access and/or use are subject to monitoring.
Help: http://azure.github.io/SONiC/
Last login: Tue Jun 20 16:22:40 UTC 2023 on ttyS0
admin@sonic:~$ sudo sonic-installer list
Current: SONiC-OS-Edgecore-SONiC_20231127_051854_ec202111_657
Next: SONiC-OS-Edgecore-SONiC_20231127_051854_ec202111_657
Available:
SONiC-OS-Edgecore-SONiC_20231127_051854_ec202111_657
SONiC-OS-Edgecore-SONiC_20231006_073817_ec202111_575
Example 2: Fast Reboot
Note: Fast-reboot is for updating the control plane, it could let the switch reboot up quickly (<= 25 seconds), so it impacts the data plane with minimum disruption.
https://github.com/Azure/SONiC/wiki/Fast-Reboot
Restriction:
Since the fast-reboot may take 25 seconds to boot the system, there are some restrictions.
- Fast-Reboot should use stale FIB (forwarding information base) information while control plane reboots
- Fast-Reboot must support at least 2000 hosts connected to SONiC VLAN interfaces
- Fast-Reboot must support at least 6000 ipv4 BGP routes and 3000 ipv6 /64 BGP routes
- LACP mode must be in SLOW mode for all LAG interfaces on a SONiC device
Procedure :
admin@sonic:~$ sudo fast-reboot
Job for database.service canceled.
[ 296.948112] kexec_core: Starting new kernel
[ 6.423929] rc.local[547]: + cat /etc/sonic/sonic_version.yml
[ 6.431287] rc.local[547]: + grep build_version
[ 6.437660] rc.local[547]: + sed -e s/build_version: //g;s/'//g
[ 6.453903] rc.local[547]: + SONIC_VERSION=Edgecore-SONiC_20211125_074752_ec202012_227
[ 6.473314] rc.local[547]: + FIRST_BOOT_FILE=/host/image-Edgecore-SONiC_20211125_074752_ec202012_227/platform/firsttime
[ 6.493438] rc.local[547]: + SONIC_CONFIG_DIR=/host/image-Edgecore-SONiC_20211125_074752_ec202012_227/sonic-config
[ 6.513298] rc.local[547]: + SONIC_ENV_FILE=/host/image-Edgecore-SONiC_20211125_074752_ec202012_227/sonic-config/sonic-environment
[ 6.537356] rc.local[547]: + [ -d /host/image-Edgecore-SONiC_20211125_074752_ec202012_227/sonic-config -a -f /host/image-Edgecore-SONiC_20211125_074752_ec202012_227/sonic-config/sonic-environment ]
[ 6.562712] rc.local[547]: + logger SONiC version Edgecore-SONiC_20211125_074752_ec202012_227 starting up...
[ 6.577633] kdump-tools[530]: /etc/init.d/kdump-tools: 117: /etc/default/kdump-tools: KDUMP_CMDLINE_APPEND+= panic=10 debug hpet=disable pcie_port=compat pci=nommconf sonic_platform=x86_64-accton_as7326_56x-r0: not found
[ 6.611514] rc.local[547]: + grub_installation_needed=
[ 6.625347] rc.local[547]: + [ ! -e /host/machine.conf ]
[ 6.633306] rc.local[547]: + migrate_nos_configuration
[ 6.649303] rc.local[547]: + rm -rf /host/migration
[ 6.665382] rc.local[547]: + mkdir -p /host/migration
[ 6.672334] rc.local[547]: + cat /proc/cmdline
[ 6.685673] rc.local[547]: + set -- BOOT_IMAGE=/image-Edgecore-SONiC_20211125_074752_ec202012_227/boot/vmlinuz-4.19.0-12-2-amd64 root=UUID=ff252179-4724-4612-8428-a91e76f553af rw console=tty0 console=ttyS0,115200n8 quiet net.ifnames=0 biosdevname=0 loop=image-Edgecore-SONiC_20211125_074752_ec202012_227/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1 pcie_aspm=off tg3.short_preamble=1 tg3.bcm5718s_reset=1 SONIC_BOOT_TYPE=fast-reboot SONIC_REBOOT_TIME="Tue 15 Feb 2022 11:01:12 AM UTC"
[ 6.749325] rc.local[547]: + sonic_fast_reboot=true
[ 6.765344] rc.local[547]: + [ -n ]
[ 6.777285] rc.local[547]: + . /host/machine.conf
[ 6.793306] rc.local[547]: + onie_arch=x86_64
[ 6.809298] rc.local[547]: + onie_bin=
[ 6.821316] rc.local[547]: + onie_boot_reason=install
[ 6.837307] rc.local[547]: + onie_build_date=2020-03-25T09:57+0800
[ 6.853360] rc.local[547]: + onie_build_machine=accton_as7326_56x
[ 6.869313] rc.local[547]: + onie_build_platform=x86_64-accton_as7326_56x-r0
[ 6.885341] rc.local[547]: + onie_config_version=1
[ 6.904988] rc.local[547]: + onie_dev=/dev/sda2
[ 6.921328] rc.local[547]: + onie_exec_url=file://dev/sdb1/onie-installer.bin
[ 6.937309] rc.local[547]: + onie_firmware=auto
[ 6.957301] rc.local[547]: + onie_grub_image_name=grubx64.efi
[ 6.973247] rc.local[547]: + onie_initrd_tmp=/
[ 6.989395] rc.local[547]: + onie_installer=/var/tmp/installer
[ 7.005326] rc.local[547]: + onie_kernel_version=4.9.95
[ 7.021315] rc.local[547]: + onie_local_parts=
[ 7.037267] rc.local[547]: + onie_machine=accton_as7326_56x
[ 7.053367] rc.local[547]: + onie_machine_rev=0
[ 7.069375] rc.local[547]: + onie_neighs=188.188.1.1,188.188.188.190,[fe80::7151:81d7:3e27:d939-eth0],[fe80::210:74ff:fe48:124c-eth0],[fe80::b848:69ff:fe6c:e385-eth0],[fe80::260:f3ff:fe20:1-eth0],[fe80::200:ff:fe00:0-eth0],[fe80::7acd:8eff:feaf:268e-eth0],[fe80::7272:cfff:fe12:345a-eth0],[fe80::3e2c:99ff:fe04:66cb-eth0],[fe80::3e2c:99ff:feec:596b-eth0],[fe80::302c:99ff:fee3:29e9-eth0],[fe80::1089:9d1d:e518:85a-eth0],[fe80::52e5:49ff:fea2:82e2-eth0],[fe80::103b:5a45:f179:3e76-eth0],[fe80::1eea:bff:fe9a:71f5-eth0],[fe80::7cbe:9dff:fe08:650a-eth0],[fe80::4070:63f3:87c5:8970-eth0],[fe80::21a:c5ff:fe01:3158-eth0],[fe80::5c53:15ff:fe21:790-eth0],[fe80::302c:99ff:fee3:29e8-eth0],[fe80::6f8:f8ff:fe7a:a40f-eth0],[fe80::6867:adff:fe06:d1df-eth0],[fe80::183d:aeff:fe2d:356f-eth0],[fe80::6a21:5fff:fe28:f112-eth0],
[ 7.157328] rc.local[547]: + onie_partition_type=gpt
[ 7.177321] rc.local[547]: + onie_platform=x86_64-accton_as7326_56x-r0
[ 7.193276] rc.local[547]: + onie_root_dir=/mnt/onie-boot/onie
[ 7.209395] rc.local[547]: + onie_skip_ethmgmt_macs=no
[ 7.225299] rc.local[547]: + onie_switch_asic=bcm
[ 7.245327] rc.local[547]: + onie_uefi_arch=x64
[ 7.264429] rc.local[547]: + onie_uefi_boot_loader=grubx64.efi
[ 7.285343] rc.local[547]: + onie_vendor_id=259
[ 7.301303] rc.local[547]: + onie_version=2020.02.00.01
[ 7.321300] rc.local[547]: + program_console_speed
[ 7.333013] rc.local[547]: + grep -Eo console=ttyS[0-9]+,[0-9]+
[ 7.353177] rc.local[547]: + cat /proc/cmdline
[ 7.372527] rc.local[547]: + cut -d , -f2
[ 7.390739] rc.local[547]: + speed=115200
[ 7.405296] rc.local[547]: + [ -z 115200 ]
[ 7.417337] rc.local[547]: + CONSOLE_SPEED=115200
[ 7.433765] rc.local[547]: + sed -i s|\-\-keep\-baud .* %I| 115200 %I|g /lib/systemd/system/serial-getty@.service
[ 7.453379] rc.local[547]: + systemctl daemon-reload
[ 7.469300] rc.local[547]: + [ -f /host/image-Edgecore-SONiC_20211125_074752_ec202012_227/platform/firsttime ]
[ 7.489351] rc.local[547]: + [ -f /var/log/fsck.log.gz ]
[ 7.506484] rc.local[547]: + gunzip -d -c /var/log/fsck.log.gz
[ 7.521729] rc.local[547]: + logger -t FSCK
[ 7.534221] rc.local[547]: + rm -f /var/log/fsck.log.gz
[ 7.549327] rc.local[547]: + exit 0
Debian GNU/Linux 10 sonic ttyS0
sonic login:
Comments
0 comments
Please sign in to leave a comment.