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

lrm: explicitly log shutdown_policy on node shutdown

Makes regression test a bit more telling and it helps to be verbose
for an user here too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2018-12-20 08:44:43 +01:00 committed by Wolfgang Bumiller
parent ba15a9b908
commit 7a20d688d8
8 changed files with 11 additions and 0 deletions

View File

@ -56,6 +56,10 @@ sub shutdown_request {
my $dc_ha_cfg = $haenv->get_ha_settings(); my $dc_ha_cfg = $haenv->get_ha_settings();
my $shutdown_policy = $dc_ha_cfg->{shutdown_policy} // 'conditional'; my $shutdown_policy = $dc_ha_cfg->{shutdown_policy} // 'conditional';
if ($shutdown) { # don't log this on service restart, only on node shutdown
$haenv->log('info', "got shutdown request with shutdown policy '$shutdown_policy'");
}
my $freeze_all = $reboot; my $freeze_all = $reboot;
if ($shutdown_policy eq 'conditional') { if ($shutdown_policy eq 'conditional') {
$freeze_all = $reboot; $freeze_all = $reboot;

View File

@ -21,6 +21,7 @@ info 25 node3/lrm: status change wait_for_agent_lock => active
info 25 node3/lrm: starting service vm:103 info 25 node3/lrm: starting service vm:103
info 25 node3/lrm: service status vm:103 started info 25 node3/lrm: service status vm:103 started
info 120 cmdlist: execute reboot node3 info 120 cmdlist: execute reboot node3
info 120 node3/lrm: got shutdown request with shutdown policy 'conditional'
info 120 node3/lrm: reboot LRM, stop and freeze all services info 120 node3/lrm: reboot LRM, stop and freeze all services
info 120 node1/crm: service 'vm:103': state changed from 'started' to 'freeze' info 120 node1/crm: service 'vm:103': state changed from 'started' to 'freeze'
info 125 node3/lrm: stopping service vm:103 info 125 node3/lrm: stopping service vm:103

View File

@ -21,6 +21,7 @@ info 25 node3/lrm: status change wait_for_agent_lock => active
info 25 node3/lrm: starting service vm:103 info 25 node3/lrm: starting service vm:103
info 25 node3/lrm: service status vm:103 started info 25 node3/lrm: service status vm:103 started
info 120 cmdlist: execute reboot node3 info 120 cmdlist: execute reboot node3
info 120 node3/lrm: got shutdown request with shutdown policy 'failover'
info 120 node3/lrm: shutdown LRM, stop all services info 120 node3/lrm: shutdown LRM, stop all services
info 125 node3/lrm: stopping service vm:103 info 125 node3/lrm: stopping service vm:103
info 125 node3/lrm: service status vm:103 stopped info 125 node3/lrm: service status vm:103 stopped

View File

@ -21,6 +21,7 @@ info 25 node3/lrm: status change wait_for_agent_lock => active
info 25 node3/lrm: starting service vm:103 info 25 node3/lrm: starting service vm:103
info 25 node3/lrm: service status vm:103 started info 25 node3/lrm: service status vm:103 started
info 120 cmdlist: execute shutdown node3 info 120 cmdlist: execute shutdown node3
info 120 node3/lrm: got shutdown request with shutdown policy 'freeze'
info 120 node3/lrm: shutdown LRM, stop and freeze all services info 120 node3/lrm: shutdown LRM, stop and freeze all services
info 120 node1/crm: service 'vm:103': state changed from 'started' to 'freeze' info 120 node1/crm: service 'vm:103': state changed from 'started' to 'freeze'
info 125 node3/lrm: stopping service vm:103 info 125 node3/lrm: stopping service vm:103

View File

@ -21,6 +21,7 @@ info 25 node3/lrm: status change wait_for_agent_lock => active
info 25 node3/lrm: starting service vm:103 info 25 node3/lrm: starting service vm:103
info 25 node3/lrm: service status vm:103 started info 25 node3/lrm: service status vm:103 started
info 120 cmdlist: execute shutdown node3 info 120 cmdlist: execute shutdown node3
info 120 node3/lrm: got shutdown request with shutdown policy 'conditional'
info 120 node3/lrm: shutdown LRM, stop all services info 120 node3/lrm: shutdown LRM, stop all services
info 125 node3/lrm: stopping service vm:103 info 125 node3/lrm: stopping service vm:103
info 125 node3/lrm: service status vm:103 stopped info 125 node3/lrm: service status vm:103 stopped

View File

@ -21,6 +21,7 @@ info 25 node3/lrm: status change wait_for_agent_lock => active
info 25 node3/lrm: starting service vm:103 info 25 node3/lrm: starting service vm:103
info 25 node3/lrm: service status vm:103 started info 25 node3/lrm: service status vm:103 started
info 120 cmdlist: execute shutdown node3 info 120 cmdlist: execute shutdown node3
info 120 node3/lrm: got shutdown request with shutdown policy 'conditional'
info 120 node3/lrm: shutdown LRM, stop all services info 120 node3/lrm: shutdown LRM, stop all services
info 125 node3/lrm: stopping service vm:103 info 125 node3/lrm: stopping service vm:103
info 125 node3/lrm: service status vm:103 stopped info 125 node3/lrm: service status vm:103 stopped

View File

@ -21,6 +21,7 @@ info 25 node3/lrm: status change wait_for_agent_lock => active
info 25 node3/lrm: starting service ct:103 info 25 node3/lrm: starting service ct:103
info 25 node3/lrm: service status ct:103 started info 25 node3/lrm: service status ct:103 started
info 120 cmdlist: execute shutdown node3 info 120 cmdlist: execute shutdown node3
info 120 node3/lrm: got shutdown request with shutdown policy 'conditional'
info 120 node3/lrm: shutdown LRM, stop all services info 120 node3/lrm: shutdown LRM, stop all services
info 125 node3/lrm: stopping service ct:103 info 125 node3/lrm: stopping service ct:103
info 125 node3/lrm: service status ct:103 stopped info 125 node3/lrm: service status ct:103 stopped

View File

@ -21,6 +21,7 @@ info 21 node1/lrm: service status vm:100 started
info 22 node2/crm: status change wait_for_quorum => slave info 22 node2/crm: status change wait_for_quorum => slave
info 24 node3/crm: status change wait_for_quorum => slave info 24 node3/crm: status change wait_for_quorum => slave
info 120 cmdlist: execute shutdown node1 info 120 cmdlist: execute shutdown node1
info 120 node1/lrm: got shutdown request with shutdown policy 'conditional'
info 120 node1/lrm: shutdown LRM, stop all services info 120 node1/lrm: shutdown LRM, stop all services
info 121 node1/lrm: stopping service vm:100 info 121 node1/lrm: stopping service vm:100
info 121 node1/lrm: service status vm:100 stopped info 121 node1/lrm: service status vm:100 stopped