feat: report running_kernel (uname -r) in get_facts

Distinguishes the currently-booted kernel from a newer installed-but-not-yet-
booted one, for kernel CVE relevance.
This commit is contained in:
Christian Manivong
2026-08-23 19:06:10 +07:00
parent c97c282648
commit e3a9f4d8b2
+9
View File
@@ -431,6 +431,14 @@ class ProxmoxDriver(
except Exception as exc: except Exception as exc:
logger.debug("Failed to read DMI info via SSH: %s", exc) logger.debug("Failed to read DMI info via SSH: %s", exc)
# Currently-booted kernel release (uname -r) — distinct from any newer
# kernel that is merely installed and pending a reboot.
running_kernel = ""
try:
running_kernel = self._exec_ssh_command("uname -r").strip()
except Exception as exc:
logger.debug("Failed to read running kernel via SSH: %s", exc)
return { return {
"uptime": uptime, "uptime": uptime,
"vendor": vendor or "Proxmox Server Solutions GmbH", "vendor": vendor or "Proxmox Server Solutions GmbH",
@@ -440,6 +448,7 @@ class ProxmoxDriver(
"os_version": os_version, "os_version": os_version,
"serial_number": serial, "serial_number": serial,
"interface_list": iface_list, "interface_list": iface_list,
"running_kernel": running_kernel,
} }
# ------------------------------------------------------------------ # # ------------------------------------------------------------------ #