-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network_Setup for Kdump Remote Mode. #19464
base: master
Are you sure you want to change the base?
Conversation
@venkatmahalingam pls review this code PR. Thanks |
…n kdump-tools file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@venkatmahalingam Please review the code PR
@venkatmahalingam Hi, We have updated code as per your suggestion. Please help review updated HLD and linked code PRs. Target is 202411. Thanks in advance |
ip link set eth0 up | ||
|
||
# Use DHCP to obtain IP address and default gateway | ||
dhclient eth0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the DHCP server is not present in the network?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@venkatmahalingam
In the kdump-remote feature, network availability is crucial. If there's no DHCP server on the network, we'll provide a static IP address to the port instead. This way, when the DHCP server isn't available, we can rely on a static configuration as a fallback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need this change itself, SSH would work only if the network reachability is there for the remote destination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re correct. But normally the kdump remote feature can be enabled simply by modifying the kdump-tools file. However, in the SONiC community version, when we enable the kdump remote mode, after kernel crash when it tries to send the crash report over ssh server it encounters an error of network unreachability. So we also need to bring up the network interfaces alongside ssh remote configurations. All these adjustments have been made specifically to bring up the "eth0" interface.
@venkatmahalingam , please help review changes, target is 202411, thanks in advance! |
sudo mkdir -p /etc/initramfs-tools/scripts/init-premount | ||
sudo mkdir -p /etc/initramfs-tools/hooks | ||
|
||
# Copy the network setup scriptgit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we need this change, as long as SSH works to the remote destination, it should be enough, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will be impact for DUMP remote mode feature if we dont have this pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally the kdump remote feature can be enabled simply by modifying the kdump-tools file. However, in the SONiC community version, when we enable the kdump remote mode, after kernel crash when it tries to send the crash report over ssh server it encounters an error of network unreachability. So we also need to bring up the network interfaces alongside ssh remote configurations. All these adjustments have been made specifically to bring up the "eth0" interface.
Hi @qiluo-msft, Please review to merge this PR. |
Hi @qiluo-msft / @lguohan PR has been reviewed by the reviewer with all checks passed, please help merge this. |
@qiluo-msft help merge this PR, pending for long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azpw ms_conflict |
/azp run Azure.sonic-buildimage |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Why I did it
When the kdump remote feature is enabled by the user, a kernel crash results in an attempt to send the crash report file to an SSH server. However, the network interfaces are down, leading to a "Network Unreachable" error. To resolve this issue, I have added custom scripts to ensure the network interfaces are up and configured correctly during the kdump process.
How I did it
Added network_setup.sh and network_setup.hook file
How to verify it
After this change, the remote SSH kdump file transfer would be possible because a network not reachable issue arose as the default crash kernel image did not change the state of the interfaces to "UP" upon load.