-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
Summary
The sonic-kdump-config --remote command is being called before ssh_path and ssh_string are properly configured, causing the remote kdump feature to behave incorrectly.
Problem Description
In the current implementation of the KdumpCfg class in scripts/hostcfgd, the configuration commands are executed in the wrong order:
--remoteis called first - This command comments/uncomments thessh_pathandssh_stringconfiguration based on the boolean value in the CONFIG_DB KDUMP table--ssh_stringand--ssh_pathare called after - These commands set the actual SSH configuration values
Additional Issues
ssh_stringwas never being set - The code checked ifdata.get("ssh_string")exists but never assigned it to thessh_stringvariable before calling the commandssh_pathwas never being set - Same issue asssh_string; the value was checked but never assigned--remoteparameter missing - The command was called with a parameter value, but should be called without parameters (the remote state is determined from CONFIG_DB)
Expected Behavior
The configuration commands should be executed in this order:
- Set
ssh_stringconfiguration - Set
ssh_pathconfiguration - Call
--remoteto enable/disable remote kdump based on CONFIG_DB (which will now correctly comment/uncomment the already-configured SSH settings)
Impact
- Remote kdump feature fails to work correctly when configured via CONFIG_DB
- SSH-based remote crash dump collection may not be enabled even when configured
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status