You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/logging/persistent_logger/persistent_loglevel.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,7 +346,26 @@ When the system startup and the Database container initialize, and the config_db
346
346
- 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.
347
347
- Exposing the "del" function from the swss-common/sonicv2-connector.h to the db migrator.
348
348
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.
350
369
351
370
# 7 Yang model
352
371
@@ -454,7 +473,7 @@ When the system startup and the Database container initialize, and the config_db
454
473
- Reboot.
455
474
- Verify the log level is "Notice".
456
475
- 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.
458
477
- Verify the CONFIG DB contains the Logger tables after a warm upgrade.
0 commit comments