mirror of
git://git.proxmox.com/git/pve-ha-manager.git
synced 2025-02-02 13:47:16 +03:00
skip transition to 'started' state if we won't stay in it
If we add a resource wth disabled or stopped state we went through the started state before changing directly to the request_stop state. Skip the started state entirely and go direct to the request_stop state. This is a small behavioral change, as we never wrote in the manager_status that we were in the started state but changed directly to request_stop, so the LRM cannot be affected by this change. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
af14d5f3bf
commit
77499288a1
@ -380,9 +380,11 @@ sub manage {
|
||||
# add new service
|
||||
foreach my $sid (sort keys %$sc) {
|
||||
next if $ss->{$sid}; # already there
|
||||
$haenv->log('info', "adding new service '$sid' on node '$sc->{$sid}->{node}'");
|
||||
my $cd = $sc->{$sid};
|
||||
$haenv->log('info', "adding new service '$sid' on node '$cd->{node}'");
|
||||
# assume we are running to avoid relocate running service at add
|
||||
$ss->{$sid} = { state => 'started', node => $sc->{$sid}->{node},
|
||||
my $state = ($cd->{state} eq 'enabled') ? 'started' : 'request_stop';
|
||||
$ss->{$sid} = { state => $state, node => $cd->{node},
|
||||
uid => compute_new_uuid('started') };
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,6 @@ info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'vm:101' on node 'node1'
|
||||
info 20 node1/crm: adding new service 'vm:102' on node 'node2'
|
||||
info 20 node1/crm: adding new service 'vm:103' on node 'node3'
|
||||
info 20 node1/crm: service 'vm:102': state changed from 'started' to 'request_stop'
|
||||
info 21 node1/lrm: got lock 'ha_agent_node1_lock'
|
||||
info 21 node1/lrm: status change wait_for_agent_lock => active
|
||||
info 21 node1/lrm: starting service vm:101
|
||||
|
@ -14,7 +14,6 @@ info 20 node1/crm: node 'node1': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node2': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'fa:130' on node 'node2'
|
||||
info 20 node1/crm: service 'fa:130': state changed from 'started' to 'request_stop'
|
||||
info 22 node2/crm: status change wait_for_quorum => slave
|
||||
info 23 node2/lrm: got lock 'ha_agent_node2_lock'
|
||||
info 23 node2/lrm: status change wait_for_agent_lock => active
|
||||
|
@ -11,7 +11,6 @@ info 20 node3/lrm: status change startup => wait_for_agent_lock
|
||||
info 20 node1/crm: got lock 'ha_manager_lock'
|
||||
info 20 node1/crm: status change wait_for_quorum => master
|
||||
info 20 node1/crm: adding new service 'fa:130' on node 'node3'
|
||||
info 20 node1/crm: service 'fa:130': state changed from 'started' to 'request_stop'
|
||||
info 21 node1/lrm: got lock 'ha_agent_node1_lock'
|
||||
info 21 node1/lrm: status change wait_for_agent_lock => active
|
||||
info 21 node1/lrm: starting service vm:100
|
||||
|
@ -14,7 +14,6 @@ info 20 node1/crm: node 'node1': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node2': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'vm:103' on node 'node3'
|
||||
info 20 node1/crm: service 'vm:103': state changed from 'started' to 'request_stop'
|
||||
info 22 node2/crm: status change wait_for_quorum => slave
|
||||
info 24 node3/crm: status change wait_for_quorum => slave
|
||||
info 25 node3/lrm: got lock 'ha_agent_node3_lock'
|
||||
|
@ -14,7 +14,6 @@ info 20 node1/crm: node 'node1': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node2': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'fa:110' on node 'node2'
|
||||
info 20 node1/crm: service 'fa:110': state changed from 'started' to 'request_stop'
|
||||
info 22 node2/crm: status change wait_for_quorum => slave
|
||||
info 23 node2/lrm: got lock 'ha_agent_node2_lock'
|
||||
info 23 node2/lrm: status change wait_for_agent_lock => active
|
||||
|
@ -14,7 +14,6 @@ info 20 node1/crm: node 'node1': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node2': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'fa:130' on node 'node2'
|
||||
info 20 node1/crm: service 'fa:130': state changed from 'started' to 'request_stop'
|
||||
info 22 node2/crm: status change wait_for_quorum => slave
|
||||
info 23 node2/lrm: got lock 'ha_agent_node2_lock'
|
||||
info 23 node2/lrm: status change wait_for_agent_lock => active
|
||||
|
@ -14,7 +14,6 @@ info 20 node1/crm: node 'node1': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node2': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'fa:130' on node 'node2'
|
||||
info 20 node1/crm: service 'fa:130': state changed from 'started' to 'request_stop'
|
||||
info 22 node2/crm: status change wait_for_quorum => slave
|
||||
info 23 node2/lrm: got lock 'ha_agent_node2_lock'
|
||||
info 23 node2/lrm: status change wait_for_agent_lock => active
|
||||
|
@ -14,7 +14,6 @@ info 20 node1/crm: node 'node1': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node2': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: node 'node3': state changed from 'unknown' => 'online'
|
||||
info 20 node1/crm: adding new service 'fa:130' on node 'node2'
|
||||
info 20 node1/crm: service 'fa:130': state changed from 'started' to 'request_stop'
|
||||
info 22 node2/crm: status change wait_for_quorum => slave
|
||||
info 23 node2/lrm: got lock 'ha_agent_node2_lock'
|
||||
info 23 node2/lrm: status change wait_for_agent_lock => active
|
||||
|
Loading…
x
Reference in New Issue
Block a user