Skip to content

Commit 0279cad

Browse files
committed
add description of not supporting downgrade
1 parent 22a6fa4 commit 0279cad

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

doc/logging/persistent_logger/persistent_loglevel.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,26 @@ When the system startup and the Database container initialize, and the config_db
346346
- In case of a warm upgrade, move Logger tables from LOGLEVEL DB to CONFIG DB (with a minor change in the key) and delete LOGLEVEL DB.
347347
- Exposing the "del" function from the swss-common/sonicv2-connector.h to the db migrator.
348348

349-
(Downgrade will not be supported).
349+
## 6.2 Support warm downgrade
350+
351+
In the current implementation, after a cold/fast reboot, the CONFIG DB and the LOGLEVEL DB flush, and the config_db.json loads into the CONFIG DB.
352+
In addition, in the current implementation, after a warm reboot, the CONFIG DB and the LOGLEVEL DB are not flush, and the config_db.json does not load into the CONFIG DB.
353+
This current state leads us not fully support the warm-downgrade.
354+
355+
Here are some scenarios to notice:
356+
Scenario 1:
357+
1. We have the image with the feature, and then we perform warm-downgrade.
358+
The CONFIG DB will still contain the Logger tables, but they will not be used. In addition, new Logger tables with default values will be added to the LOGLEVEL DB. After warm-downgrade, the user will be able to change the loglevel.
359+
2. We perform warm-upgrade:
360+
The Logger tables that were created in the LOGLEVEL DB from step 1 will override the unused tables in CONFIG DB.
361+
362+
Scenario 2:
363+
1. We have the image with the feature, and the user changes the loglevel of some components. For example, the user changes the orchagent loglevel to DEBUG.
364+
2. running "config save". The Logger tables are saved to the config_db.json and are persistent.
365+
3. then we perform warm-downgrade.
366+
The CONFIG DB will still contain the Logger tables, but they will not be used. In addition, new Logger tables with default values will be added to the LOGLEVEL DB.
367+
4. We perform cold-upgrade:
368+
The LOGLEVEL DB will be removed. The CONFIG DB will start up with the Logger tables from the config_db.json, which means the verbosity of the orchagent will be DEBUG.
350369

351370
# 7 Yang model
352371

@@ -454,7 +473,7 @@ When the system startup and the Database container initialize, and the config_db
454473
- Reboot.
455474
- Verify the log level is "Notice".
456475
- Verify that we able change the log level for all the components.
457-
- Verify the LOGLEVEL DB does not not contain the Logger tables after a warm upgrade.
476+
- Verify the LOGLEVEL DB does not contain the Logger tables after a warm upgrade.
458477
- Verify the CONFIG DB contains the Logger tables after a warm upgrade.
459478

460479

0 commit comments

Comments
 (0)