Skip to content

Kdump SSH Remote Configuration Order Bug #318

@arista-hpandya

Description

@arista-hpandya

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:

  1. --remote is called first - This command comments/uncomments the ssh_path and ssh_string configuration based on the boolean value in the CONFIG_DB KDUMP table
  2. --ssh_string and --ssh_path are called after - These commands set the actual SSH configuration values

Additional Issues

  1. ssh_string was never being set - The code checked if data.get("ssh_string") exists but never assigned it to the ssh_string variable before calling the command
  2. ssh_path was never being set - Same issue as ssh_string; the value was checked but never assigned
  3. --remote parameter 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:

  1. Set ssh_string configuration
  2. Set ssh_path configuration
  3. Call --remote to 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions