/usr/sbin/whmapi1 system_needs_reboot shows wrong running kernel
Very weird. The box (SolosVM, QEMU) seems okay, but one of my daily checks keeps showing the box needs to be rebooted because of a needed kernel update. I"ve rebooted through the VNC console and the shown running kernel doesn"t seem to even be on the box? "MCpanel::Kernel::Status" shows the correct running kernel.
What is used to resync whatever "system_needs_reboot" pulls it"s data from?
Is there something else I should be looking at?
Outputs below.
Thanks,
Michael
cat /etc/redhat-release
AlmaLinux
uname a
Linux srv10.srv10-inet-design.com 4.18.0-372.9.1.el8.x86_64 #1 SMP Tue May 10 08:57:35 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
root@srv10 [~]# /usr/sbin/whmapi1 system_needs_reboot
---
data:
details:
kernel:
boot_version: 4.18.0-372.9.1.el8.x86_64
running_version: 3.10.0-1160.el7.x86_64
needs_reboot: 1
metadata:
command: system_needs_reboot
reason: OK
result: 1
version: 1
root@srv10 [~]# /usr/local/cpanel/3rdparty/bin/perl -MData::Dumper -MCpanel::Kernel::Status -le 'print Dumper( Cpanel::Kernel::Status::kernel_status(updates => 1));'
$VAR1 = {
'reboot_required' => '',
'running_version' => '4.18.0-372.9.1.el8.x86_64',
'update_available' => undef,
'running_latest' => 1,
'has_kernelcare' => 0,
'boot_version' => '4.18.0-372.9.1.el8.x86_64'
};
Ref:
-
Hey there! This is actually expected behavior when the system is running inside a Linux container of some sort. At Return whether system needs reboot we have this documentation: "This function cannot detect whether your system needs a reboot if you use cPanel & WHM inside of a 0 -
"MCpanel::Kernel::Status" is a local perl module, and tries to determine the same information as the API call. The only API docs I have available are the ones at Return whether system needs reboot. Is there a specific call you were looking for? 0 -
"MCpanel::Kernel::Status" is a local perl module, and tries to determine the same information as the API call.
Ah, okay, not that I know it very well, but perl works.The only API docs I have available are the ones at Thanks Rex, Michael
0 -
I did see that feature request come in just now and got it approved! 0
Please sign in to leave a comment.
Comments
5 comments