重新開機後遺失的 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

 

 如果我們有待儲存至 startup-config 的組態變更,則在儲存組態時必須注意,因為這兩個稍微類似的動作有不同的結果。

此順序會在重新開機後正確反映所有變更。

     Sonic# copy running-configuration startup-configuration
Sonic# image install HTTP://SONiC_EntStd_4.1.1.bin
Sonic# 重新開機
 

此順序順序會導致在重新開機後遺失對 startup-configuration 的任何非儲存組態變更。

     Sonic# 映射安裝 HTTP://SONiC_EntStd_4.1.1.bin
Sonic# 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.