kdump
initial config not translated to the USE_KDUMP
kernel flag
#21625
Labels
Triaged
this issue has been triaged
the
config kdump [enable|disable]
command will set theKDUMP|config
in CONFIG_DB.Changes to this config are handled by
KdumpCfg
inhostcfgd
:https://github.com/sonic-net/sonic-host-services/blob/202405/scripts/hostcfgd#L1943
Changing the
enabled
flag inKDUMP|config
will result in thesonic-kdump-config [--enable|--disable]
script to be called:https://github.com/sonic-net/sonic-host-services/blob/202405/scripts/hostcfgd#L1152-L1155
That script will in turn set the
USE_KDUMP=[0|1]
in/etc/default/kdump-tools
depending on whether or not it's enabled:https://github.com/sonic-net/sonic-utilities/blob/202405/scripts/sonic-kdump-config#L320
Changing this config requires a system reboot.
This behavior works as expected in a running system.
However, on boot-up the entry in
KDUMP|config
won't be propagated to theUSE_KDUMP
kernel flag.Problematic scenario:
'enabled': 'false'
USE_KDUMP=1
Steps to Reproduce:
'enabled': 'false'
USE_KDUMP=1
(set but don't save)Result:
KDUMP|config
says it's disabled but theUSE_KDUMP=1
kernel flag says it's enabledFallout: The startup config (config_db.json) requested the KDUMP feature be disabled but it's still enabled and rebooting the switch won't help, you'll need to re-run the
config kdump disable
on a running switch to re-sync the config_db and kernel flagsNote: The same thing can occur with the opposite config (CONFIG_DB: enabled=True, USE_KDUMP=0)
Analysis:
Looking at the
load
functions of the classes inhostcfgd
it looks like it's typically used to call the handler function for the initial CONFIG_DB processing.I'm not sure why in the case of
KdumpCfg
we only setup theKDUMP|config
in CONFIG_DB if it's not already present:https://github.com/sonic-net/sonic-host-services/blob/202405/scripts/hostcfgd#L1130-L1139
The text was updated successfully, but these errors were encountered: