public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] pve8to9: skip check for running guests if already upgraded
@ 2025-08-06  8:28 Fiona Ebner
  2025-08-08  8:10 ` [pve-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-08-06  8:28 UTC (permalink / raw)
  To: pve-devel

If already upgraded, the suggestion to stop or migrate running guests
is wrong.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/CLI/pve8to9.pm | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
index 994189f1..35785891 100644
--- a/PVE/CLI/pve8to9.pm
+++ b/PVE/CLI/pve8to9.pm
@@ -1985,22 +1985,26 @@ sub check_rrd_migration {
 sub check_virtual_guests {
     print_header("VIRTUAL GUEST CHECKS");
 
-    log_info("Checking for running guests..");
-    my $running_guests = 0;
+    if (!$upgraded) {
+        log_info("Checking for running guests..");
+        my $running_guests = 0;
 
-    my $local_vms = eval { PVE::API2::Qemu->vmlist({ node => $nodename }) };
-    log_warn("Failed to retrieve information about this node's VMs - $@") if $@;
-    $running_guests += grep { $_->{status} eq 'running' } @$local_vms if defined($local_vms);
+        my $local_vms = eval { PVE::API2::Qemu->vmlist({ node => $nodename }) };
+        log_warn("Failed to retrieve information about this node's VMs - $@") if $@;
+        $running_guests += grep { $_->{status} eq 'running' } @$local_vms if defined($local_vms);
 
-    my $local_cts = eval { PVE::API2::LXC->vmlist({ node => $nodename }) };
-    log_warn("Failed to retrieve information about this node's CTs - $@") if $@;
-    $running_guests += grep { $_->{status} eq 'running' } @$local_cts if defined($local_cts);
+        my $local_cts = eval { PVE::API2::LXC->vmlist({ node => $nodename }) };
+        log_warn("Failed to retrieve information about this node's CTs - $@") if $@;
+        $running_guests += grep { $_->{status} eq 'running' } @$local_cts if defined($local_cts);
 
-    if ($running_guests > 0) {
-        log_warn(
-            "$running_guests running guest(s) detected - consider migrating or stopping them.");
+        if ($running_guests > 0) {
+            log_warn(
+                "$running_guests running guest(s) detected - consider migrating or stopping them.");
+        } else {
+            log_pass("no running guest detected.");
+        }
     } else {
-        log_pass("no running guest detected.");
+        log_skip("Skipping check for running guests - already upgraded.");
     }
 
     check_lxcfs_fuse_version();
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] applied: [PATCH manager] pve8to9: skip check for running guests if already upgraded
  2025-08-06  8:28 [pve-devel] [PATCH manager] pve8to9: skip check for running guests if already upgraded Fiona Ebner
@ 2025-08-08  8:10 ` Fabian Grünbichler
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-08-08  8:10 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner


On Wed, 06 Aug 2025 10:28:15 +0200, Fiona Ebner wrote:
> If already upgraded, the suggestion to stop or migrate running guests
> is wrong.
> 
> 

Applied, thanks!

[1/1] pve8to9: skip check for running guests if already upgraded
      commit: 1f9abf9f018e8f25886b3fdf3ffaf616abaf1749

Best regards,
-- 
Fabian Grünbichler <f.gruenbichler@proxmox.com>


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

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

end of thread, other threads:[~2025-08-08  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06  8:28 [pve-devel] [PATCH manager] pve8to9: skip check for running guests if already upgraded Fiona Ebner
2025-08-08  8:10 ` [pve-devel] applied: " Fabian Grünbichler

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