]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
recompute_online_node_usage: show state on internal error
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 2 Jul 2021 17:18:22 +0000 (19:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 2 Jul 2021 18:08:12 +0000 (20:08 +0200)
makes debugging easier, also throw in some code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/HA/LRM.pm
src/PVE/HA/Manager.pm

index 8dcabcaf0681ae21c1d8079c087aadc917cbf3c4..afbd236ae47cc544868a3ebd0fa6c5408d25cb1a 100644 (file)
@@ -828,7 +828,6 @@ sub exec_resource_agent {
 
     # process error state early
     if ($cmd eq 'error') {
-
        $haenv->log('err', "service $sid is in an error state and needs manual " .
                    "intervention. Look up 'ERROR RECOVERY' in the documentation.");
 
index d1bd4775d5587355128f6879850329c4529482dd..1d646b20ae1e269c09f6ba2ca8bc63d2416449af 100644 (file)
@@ -200,7 +200,7 @@ sub recompute_online_node_usage {
            } elsif ($state eq 'stopped') {
                # do nothing
            } else {
-               die "should not be reached";
+               die "should not be reached (sid = '$sid', state = '$state')";
            }
        }
     }
@@ -297,7 +297,6 @@ sub read_lrm_status {
        }
     }
 
-
     return ($results, $modes);
 }