Dell Networking SONiC 更新在重新启动后部分配置丢失
Summary: 本文介绍在升级过程中 Dell SONiC 配置丢失以及解决方法。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
| 如果我们有待执行的配置更改要保存到启动配置中,则在保存配置时必须注意,因为这两个稍微相似的操作有不同的结果。 |
此序列顺序将正确反映重新启动后的所有更改。Sonic# copy running-configuration startup-configurationSonic# image install http://SONiC_EntStd_4.1.1.bin Sonic# reboot |
此序列顺序将导致重新启动后对启动配置的任何非保存配置更改丢失。Sonic# image install http://SONiC_EntStd_4.1.1.binSonic# copy running-configuration startup-configuration Sonic# reboot 我们将在下一节中讨论发生这种情况的原因。 |
Cause
当我们发出映像安装 http://< DELL-SONIC-INSTALL-FILE.bin> 以升级时,将执行以下过程。
- startup_config /etc/sonic/config_db.json 迁移到 /host/old_config/config_db.json 中,在新版本的配置中应用任何必要的架构更改。
- 在交换机期间,重新启动存储在 /host/old_config/config_db.json 中的此配置会在应用与新版本相关的更改后转移到 /etc/sonic/config_db.json 。
因此,在我们运行映像安装 http://< DELL-SONIC-INSTALL-FILE.bin> 之后保存的任何挂起更改都不会反映到 /host/old_config/config_db.json 中。因此,此配置更改将在重新启动期间丢失。
Resolution
进入这种情况后,可能会有一些解决方法,其中两个最简单的方法是:
选项 1
将交换机引导至旧的 SONiC 版本,删除新版本,然后再次重新安装新版本:
Sonic# show image list Sonic# image set-default <Old-SONIC version> Sonic# reboot
当交换机返回旧版本时:
Sonic# show image list Sonic# image remove <new-SONiC-version> Sonic# image install <http://new-SONIC version> Sonic# reboot
提醒:假设配置是在映像安装命令成功执行后和重新启动之前保存的。
输出示例
admin@sonic:~$ sonic-cli sonic# show image list Current: SONiC-OS-4.0.6-Enterprise_Standard Next: SONiC-OS-4.0.6-Enterprise_Standard Available: SONiC-OS-4.0.3-Enterprise_Base SONiC-OS-4.0.6-Enterprise_Standard sonic# image set-default SONiC-OS-4.0.3-Enterprise_Base sonic# reboot reboot in process ..... Waiting for the reboot operation to complete 11, 32, 15, 00068001, 19, 00068000,
当交换机恢复时:
sonic login: admin Password: Last login: Wed Oct 4 10:10:30 UTC 2023 on ttyS0 Linux sonic 4.19.0-9-2-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) 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/ admin@sonic:~$ sonic-cli sonic# show image list Current: SONiC-OS-4.0.3-Enterprise_Base Next: SONiC-OS-4.0.3-Enterprise_Base Available: SONiC-OS-4.0.3-Enterprise_Base SONiC-OS-4.0.6-Enterprise_Standard sonic# image remove SONiC-OS-4.0.6-Enterprise_Standard Remove image SONiC-OS-4.0.6-Enterprise_Standard? [y/N]:y sonic# show image list Current: SONiC-OS-4.0.3-Enterprise_Base Next: SONiC-OS-4.0.3-Enterprise_Base Available: SONiC-OS-4.0.3-Enterprise_Base sonic# image install http://10.24.30.105/software/Dell%20EMC/Networ king/SONiC_EntStd_4.0.6.bin %Info: Check 'show image status' for image install progress. sonic# show image status ----------------------------------------------------------- Global operation status : GLOBAL_STATE_SUCCESS ----------------------------------------------------------- File operation status : TRANSFER_STATE_SUCCESS File size(bytes) : 1055807512 File transfer bytes : 1055807512 File progress : 100% Transfer start time : 2023-10-04 10:17:40+0000 Transfer end time : 2023-10-04 10:17:49+0000 ----------------------------------------------------------- Install operation status : INSTALL_STATE_SUCCESS Install start time : 2023-10-04 10:17:49+0000 Install end time : 2023-10-04 10:18:26+0000 sonic# show image list Current: SONiC-OS-4.0.3-Enterprise_Base Next: SONiC-OS-4.0.6-Enterprise_Standard Available: SONiC-OS-4.0.3-Enterprise_Base SONiC-OS-4.0.6-Enterprise_Standard sonic# reboot
选项 2
在新 SONiC 操作系统中应用缺少的配置。
提醒:如果我们尝试将config_db.json 从旧分区复制到新分区,我们可能会遇到其他问题,因为配置文件的架构可能在版本之间发生了更改。
Additional Information
此行为在分支中的 4.0.x 升级和同一分支中的 4.1.x 升级中进行验证。预计会保留用于任何升级。
Affected Products
Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON
, PowerSwitch Z9432F-ON
...
Article Properties
Article Number: 000218166
Article Type: Solution
Last Modified: 11 Oct 2023
Version: 2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.