5
0
mirror of git://git.proxmox.com/git/pve-ha-manager.git synced 2025-01-07 21:18:00 +03:00

do not mark maintenaned nodes as unkown

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-11-30 19:31:50 +01:00
parent edd2cee9d6
commit 1388fcc1d3
4 changed files with 7 additions and 5 deletions

View File

@ -607,7 +607,7 @@ sub next_state_stopped {
return;
}
if ($ns->node_is_offline_delayed($sd->{node})) {
if ($ns->node_is_offline_delayed($sd->{node}) && !$ns->get_node_state($sd->{node}) ne 'maintenance') {
&$change_service_state($self, $sid, 'fence');
return;
}

View File

@ -139,7 +139,6 @@ sub update {
if ($state eq 'online') {
if ($lrm_mode eq 'maintenance') {
#$haenv->log('info', "update node state maintance");
$set_node_state->($self, $node, 'maintenance');
}
# &$set_node_state($self, $node, 'online');
@ -164,8 +163,13 @@ sub update {
# node is not inside quorate partition, possibly not active
if ($state eq 'online' || $state eq 'maintenance') {
if ($state eq 'online') {
&$set_node_state($self, $node, 'unknown');
} elsif ($state eq 'maintenance') {
my $lrm_mode = $lrm_modes->{$node} // 'unkown';
if ($lrm_mode ne 'maintenance') {
$set_node_state->($self, $node, 'unknown');
}
} elsif ($state eq 'unknown') {
# node isn't in the member list anymore, deleted from the cluster?

View File

@ -51,5 +51,4 @@ info 146 shutdown: execute crm node3 stop
info 145 node3/crm: server received shutdown request
info 165 node3/crm: exit (loop end)
info 165 shutdown: execute power node3 off
info 180 node1/crm: node 'node3': state changed from 'maintenance' => 'unknown'
info 720 hardware: exit simulation - done

View File

@ -54,5 +54,4 @@ info 161 node1/crm: exit (loop end)
info 161 shutdown: execute power node1 off
info 161 node2/crm: got lock 'ha_manager_lock'
info 161 node2/crm: status change slave => master
info 161 node2/crm: node 'node1': state changed from 'maintenance' => 'unknown'
info 720 hardware: exit simulation - done