Gedeeltelijke configuratie van Dell Networking SONiC-update verloren na opnieuw opstarten
Summary: In dit artikel wordt uitgelegd hoe Dell SONiC configuratieverlies tijdens het upgradeproces is en een tijdelijke oplossing.
Symptoms
| Als we wijzigingen in de configuratie in afwachting hebben die in de startup-config moeten worden opgeslagen, moeten we op letten bij het opslaan van de configuratie, omdat deze twee enigszins vergelijkbare acties verschillende resultaten hebben. |
Deze volgorde geeft alle wijzigingen correct weer na het opnieuw opstarten.Sonic# copy running-configuration startup-configurationSonic# image install http://SONiC_EntStd_4.1.1.bin Sonic# reboot |
Deze volgorde zorgt ervoor dat eventuele niet-opgeslagen configuratiewijzigingen in de opstartconfiguratie verloren gaan na het opnieuw opstarten.Sonic# image installeren http://SONiC_EntStd_4.1.1.binSonic# copy running-configuration startup-configuration Sonic# reboot We bespreken waarom dit gebeurt in de volgende sectie. |
Cause
Wanneer we de image installeren http://< DELL-SONIC-INSTALL-FILE.bin> om het volgende proces te upgraden, gebeurt dit.
- De startup_config /etc/sonic/config_db.json wordt gemigreerd naar /host/old_config/config_db.json waarbij de vereiste schemawijziging in de configuratie voor de nieuwe versie wordt toegepast.
- Tijdens de switch start u deze configuratie die is opgeslagen in /host/old_config/config_db.json over naar /etc/sonic/config_db.json nadat wijzigingen met betrekking tot de nieuwe versie zijn toegepast.
Daarom worden alle wijzigingen die in behandeling zijn opgeslagen na het installeren van de image http://< DELL-SONIC-INSTALL-FILE.bin> niet weergegeven in /host/old_config/config_db.json. Hierdoor gaat deze configuratiewijziging verloren tijdens het opnieuw opstarten.
Resolution
Er kunnen een paar tijdelijke oplossingen zijn zodra u in deze situatie terechtkomt, twee van de makkelijkste zijn:
Optie 1
Start de switch op naar de oude SONiC-versie, verwijder de nieuwe versie en installeer de nieuwe versie opnieuw:
Sonic# show image list Sonic# image set-default <Old-SONIC version> Sonic# reboot
Wanneer de switch terugkomt met de oude versie:
Sonic# show image list Sonic# image remove <new-SONiC-version> Sonic# image install <http://new-SONIC version> Sonic# reboot
OPMERKING: Er wordt van uitgegaan dat de configuratie is opgeslagen na de installatieopdracht van de image, met succes uitgevoerd en voordat de computer opnieuw werd opgestart.
Uitvoervoorbeeld
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,
Wanneer de switch terugkomt:
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
Optie 2
Pas de ontbrekende configuratie toe in het nieuwe SONiC-besturingssysteem.
OPMERKING: Als we proberen de config_db.json van de oude partitie naar de nieuwe partitie te kopiëren, kunnen we andere problemen ondervinden omdat het schema van het configuratiebestand mogelijk is gewijzigd tussen de versies.