]> git.proxmox.com Git - pve-cluster.git/blobdiff - data/PVE/API2/ClusterConfig.pm
fix #3596: handle delnode of offline node
[pve-cluster.git] / data / PVE / API2 / ClusterConfig.pm
index 8f4a5bbe88e18d668bba64dcf8263a823d6aeaa9..5a6a1accd8b3c487f572daed8fdd319f60b00a2b 100644 (file)
@@ -485,9 +485,13 @@ __PACKAGE__->register_method ({
 
            delete $nodelist->{$node};
 
-           PVE::Corosync::update_nodelist($conf, $nodelist);
+           # allowed to fail when node is already shut down!
+           eval {
+               PVE::Tools::run_command(['corosync-cfgtool','-k', $nodeid])
+                   if defined($nodeid);
+           };
 
-           PVE::Tools::run_command(['corosync-cfgtool','-k', $nodeid]) if defined($nodeid);
+           PVE::Corosync::update_nodelist($conf, $nodelist);
        };
 
        $config_change_lock->($code);