Skip to content

Conversation

@Ghulam-Bahoo
Copy link
Contributor

What I did
Added remote kdump functionality using SSH in SONiC.

How I did it
I added two new commands and two options to configure the kdump remote ssh feature.

How to verify it
Upon kernel crash, kdump will transfer the crash report files to the ssh server.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@muhammadalihussnain
Copy link
Contributor

@qiluo-msft this PR has been approved by reviewers and can you please help to merge? Thanks.

@qiluo-msft qiluo-msft merged commit 944175b into sonic-net:master Mar 24, 2025
7 checks passed
@prabhataravind
Copy link
Contributor

hi @Ghulam-Bahoo, we are seeing some issues with this change. Several buildimage pipeline runs are failing because of errors like the following:

E 2025 Apr 1 04:56:08.321576 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--disable'] - failed: return code - 1, output:#012None
E 2025 Apr 1 04:56:09.638838 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M'] - failed: return code - 1, output:#012None
E 2025 Apr 1 04:56:11.199498 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--num_dumps', '3'] - failed: return code - 1, output:#012None
E 2025 Apr 1 04:56:13.969595 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--remote', 'false'] - failed: return code - 2, output:#012None
E 2025 Apr 1 04:56:16.373762 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--ssh_string', 'user@localhost'] - failed: return code - 1, output:#012None
E 2025 Apr 1 04:56:17.579657 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--ssh_path', '/a/b/c'] - failed: return code - 1, output:#012None

@arista-nwolfe did some debugging on this and found out that you are using options.remote without adding that option.

parser.add_argument('--ssh_string', nargs='?', type=str, action='store', default=False,
        help='ssh_string for remote kdump')

parser.add_argument('--ssh_path', nargs='?', type=str, action='store',default=False,
        help='ssh_path for remote kdump')

Could you please help fix this asap?

@judyjoseph for viz.

changed = cmd_kdump_disable(options.verbose)
elif options.memory != False:
cmd_kdump_memory(options.verbose, options.memory)
elif options.remote:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remote option doesn't seem to be added via parser.add_argument

prabhataravind added a commit to prabhataravind/sonic-utilities that referenced this pull request Apr 4, 2025
 * sonic-net#3400 started using remote
   option without adding the option leading to errors seen like the following:

E               2025 Apr  1 04:56:08.321576 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--disable'] - failed: return code - 1, output:#012None
E               2025 Apr  1 04:56:09.638838 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M'] - failed: return code - 1, output:#012None
E               2025 Apr  1 04:56:11.199498 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--num_dumps', '3'] - failed: return code - 1, output:#012None
E               2025 Apr  1 04:56:13.969595 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--remote', 'false'] - failed: return code - 2, output:#012None
E               2025 Apr  1 04:56:16.373762 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--ssh_string', 'user@localhost'] - failed: return code - 1, output:#012None
E               2025 Apr  1 04:56:17.579657 vlab-02 ERR hostcfgd: ['sonic-kdump-config', '--ssh_path', '/a/b/c'] - failed: return code - 1, output:#012None

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
nmoray pushed a commit to nmoray/sonic-utilities that referenced this pull request Jun 25, 2025
What I did
Added remote kdump functionality using SSH in SONiC.

How I did it
I added two new commands and two options to configure the kdump remote ssh feature.

How to verify it
Upon kernel crash, kdump will transfer the crash report files to the ssh server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.