public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 stable-7 manager] pve7to8: Add check for dkms modules
@ 2023-08-01  8:42 Christian Ebner
  2023-09-27 17:30 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2023-08-01  8:42 UTC (permalink / raw)
  To: pve-devel

... and warn if at least one is present.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---

changes since v1:
* do not use which to check for dkms, use exit code directly

 PVE/CLI/pve7to8.pm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
index 5ba73837..b4b62255 100644
--- a/PVE/CLI/pve7to8.pm
+++ b/PVE/CLI/pve7to8.pm
@@ -1322,6 +1322,27 @@ sub check_bootloader {
     }
 }
 
+sub check_dkms_modules {
+    log_info("Check for dkms modules...");
+
+    my $count;
+    my $set_count = sub {
+	$count = scalar @_;
+    };
+
+    my $exit_code = eval {
+	run_command(['dkms', 'status', '-k', '`uname -r`'], outfunc => $set_count, noerr => 1)
+    };
+
+    if ($exit_code != 0) {
+	log_skip("could not get dkms status");
+    } elsif (!$count) {
+	log_pass("no dkms modules found");
+    } else {
+	log_warn("dkms modules found, this might cause issues during upgrade.");
+    }
+}
+
 sub check_misc {
     print_header("MISCELLANEOUS CHECKS");
     my $ssh_config = eval { PVE::Tools::file_get_contents('/root/.ssh/config') };
@@ -1423,6 +1444,7 @@ sub check_misc {
     check_apt_repos();
     check_nvidia_vgpu_service();
     check_bootloader();
+    check_dkms_modules();
 }
 
 my sub colored_if {
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH v2 stable-7 manager] pve7to8: Add check for dkms modules
  2023-08-01  8:42 [pve-devel] [PATCH v2 stable-7 manager] pve7to8: Add check for dkms modules Christian Ebner
@ 2023-09-27 17:30 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-09-27 17:30 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christian Ebner

Am 01/08/2023 um 10:42 schrieb Christian Ebner:
> ... and warn if at least one is present.
> 
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> 
> changes since v1:
> * do not use which to check for dkms, use exit code directly
> 
>  PVE/CLI/pve7to8.pm | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-27 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01  8:42 [pve-devel] [PATCH v2 stable-7 manager] pve7to8: Add check for dkms modules Christian Ebner
2023-09-27 17:30 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal