]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
fix some log formatting
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Feb 2016 17:41:02 +0000 (18:41 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Feb 2016 10:42:16 +0000 (11:42 +0100)
First remove trailing whitespace from log messages on state changes
This needs to touch some regression test, but with no change in
semantics.

Second add a missing paranthese on the "fixup service location"
message. This needs no regression test log.expect changes.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 files changed:
src/PVE/HA/Manager.pm
src/test/test-basic1/log.expect
src/test/test-basic5/log.expect
src/test/test-resource-failure1/log.expect
src/test/test-resource-failure2/log.expect
src/test/test-resource-failure4/log.expect
src/test/test-resource-failure5/log.expect
src/test/test-restart-lrm/log.expect
src/test/test-service-command1/log.expect
src/test/test-shutdown1/log.expect
src/test/test-shutdown2/log.expect
src/test/test-shutdown3/log.expect
src/test/test-shutdown4/log.expect

index cab2b0a00c551a6e35c676cc7b68c9c65e34c9bc..a482ef23b6eca257f200733ddac7d44965ba32e0 100644 (file)
@@ -207,10 +207,10 @@ my $change_service_state = sub {
     $self->recompute_online_node_usage();
 
     $sd->{uid} = compute_new_uuid($new_state);
-    
 
-    $text_state = " ($text_state)" if $text_state;
-    $haenv->log('info', "service '$sid': state changed from '${old_state}' to '${new_state}' $text_state");
+    $text_state = "  ($text_state)" if $text_state;
+    $haenv->log('info', "service '$sid': state changed from '${old_state}'" .
+               " to '${new_state}'$text_state");
 };
 
 # after a node was fenced this recovers the service to a new node
@@ -495,7 +495,7 @@ sub next_state_stopped {
     if ($sd->{node} ne $cd->{node}) {
        # this can happen if we fence a node with active migrations
        # hack: modify $sd (normally this should be considered read-only)
-       $haenv->log('info', "fixup service '$sid' location ($sd->{node} => $cd->{node}");
+       $haenv->log('info', "fixup service '$sid' location ($sd->{node} => $cd->{node})");
        $sd->{node} = $cd->{node}; 
     }
 
index 5cd30f0fcc66bfaf0593f4a4d320bc649d880b6f..68df71b21592f36fc58d21e4dda9dc002166c802 100644 (file)
@@ -16,7 +16,7 @@ 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     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
@@ -29,12 +29,12 @@ info     25    node3/lrm: got lock 'ha_agent_node3_lock'
 info     25    node3/lrm: status change wait_for_agent_lock => active
 info     25    node3/lrm: starting service vm:103
 info     25    node3/lrm: service status vm:103 started
-info     40    node1/crm: service 'vm:102': state changed from 'request_stop' to 'stopped' 
+info     40    node1/crm: service 'vm:102': state changed from 'request_stop' to 'stopped'
 info    120      cmdlist: execute network node3 off
 info    120    node1/crm: node 'node3': state changed from 'online' => 'unknown'
 info    124    node3/crm: status change slave => wait_for_quorum
 info    125    node3/lrm: status change active => lost_agent_lock
-info    160    node1/crm: service 'vm:103': state changed from 'started' to 'fence' 
+info    160    node1/crm: service 'vm:103': state changed from 'started' to 'fence'
 info    160    node1/crm: node 'node3': state changed from 'unknown' => 'fence'
 info    166     watchdog: execute power node3 off
 info    165    node3/crm: killed by poweroff
index e640e1331d712fb662fff6e7bea15eafce05f072..54b579cbc475a2ce6f0c394d0c4c09b03d1cc2e7 100644 (file)
@@ -41,7 +41,7 @@ info    162     hardware: server 'node1' stopped by poweroff (watchdog)
 info    222    node3/crm: got lock 'ha_manager_lock'
 info    222    node3/crm: status change slave => master
 info    222    node3/crm: node 'node1': state changed from 'online' => 'unknown'
-info    282    node3/crm: service 'vm:101': state changed from 'started' to 'fence' 
+info    282    node3/crm: service 'vm:101': state changed from 'started' to 'fence'
 info    282    node3/crm: node 'node1': state changed from 'unknown' => 'fence'
 info    282    node3/crm: got lock 'ha_agent_node1_lock'
 info    282    node3/crm: fencing: acknowleged - got agent lock for node 'node1'
index 97d9fdb31780c92131d5b339cffa5f71201ee6ad..c3170fc7834abf23179e9ec4e83438f33afee16d 100644 (file)
@@ -14,12 +14,12 @@ 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     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
 info     24    node3/crm: status change wait_for_quorum => slave
-info     40    node1/crm: service 'fa:110': state changed from 'request_stop' to 'stopped' 
+info     40    node1/crm: service 'fa:110': state changed from 'request_stop' to 'stopped'
 info    120      cmdlist: execute service fa:110 enabled
 info    120    node1/crm: service 'fa:110': state changed from 'stopped' to 'started'  (node = node2)
 info    123    node2/lrm: starting service fa:110
index 3c827f8fe2a526534cc087d8d2126fa23aa906e3..604ad9560b1bad601203a6b308e54afb43890c5e 100644 (file)
@@ -14,12 +14,12 @@ 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     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
 info     24    node3/crm: status change wait_for_quorum => slave
-info     40    node1/crm: service 'fa:130': state changed from 'request_stop' to 'stopped' 
+info     40    node1/crm: service 'fa:130': state changed from 'request_stop' to 'stopped'
 info    120      cmdlist: execute service fa:130 enabled
 info    120    node1/crm: service 'fa:130': state changed from 'stopped' to 'started'  (node = node2)
 info    123    node2/lrm: starting service fa:130
index 3e8eef90aec11769ecadb91c0be48142a24bdcc5..77c23677a8c700d76563f9044dd6f19be7d8ed61 100644 (file)
@@ -21,12 +21,12 @@ info     25    node3/lrm: status change wait_for_agent_lock => active
 info     25    node3/lrm: starting service fa:1001
 info     25    node3/lrm: service status fa:1001 started
 info    120      cmdlist: execute service fa:1001 disabled
-info    120    node1/crm: service 'fa:1001': state changed from 'started' to 'request_stop' 
+info    120    node1/crm: service 'fa:1001': state changed from 'started' to 'request_stop'
 info    125    node3/lrm: stopping service fa:1001
 info    125    node3/lrm: unable to stop stop service fa:1001 (still running)
 err     140    node1/crm: service 'fa:1001' stop failed (exit code 1)
-info    140    node1/crm: service 'fa:1001': state changed from 'request_stop' to 'error' 
-info    140    node1/crm: service 'fa:1001': state changed from 'error' to 'stopped' 
+info    140    node1/crm: service 'fa:1001': state changed from 'request_stop' to 'error'
+info    140    node1/crm: service 'fa:1001': state changed from 'error' to 'stopped'
 info    145    node3/lrm: stopping service fa:1001
 info    145    node3/lrm: unable to stop stop service fa:1001 (still running)
 info    165    node3/lrm: stopping service fa:1001
index f17421ac6d2bcccb3c77d7908022cca9baf43cba..b6e7807d7f148aeae81fa33fd480647d4232d5c8 100644 (file)
@@ -14,12 +14,12 @@ 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     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
 info     24    node3/crm: status change wait_for_quorum => slave
-info     40    node1/crm: service 'fa:130': state changed from 'request_stop' to 'stopped' 
+info     40    node1/crm: service 'fa:130': state changed from 'request_stop' to 'stopped'
 info    120      cmdlist: execute service fa:130 enabled
 info    120    node1/crm: service 'fa:130': state changed from 'stopped' to 'started'  (node = node2)
 info    123    node2/lrm: starting service fa:130
@@ -29,10 +29,10 @@ info    143    node2/lrm: starting service fa:130
 warn    143    node2/lrm: unable to start service fa:130
 err     143    node2/lrm: unable to start service fa:130 on local node after 1 retries
 err     160    node1/crm: recovery policy for service fa:130 failed, entering error state!
-info    160    node1/crm: service 'fa:130': state changed from 'started' to 'error' 
+info    160    node1/crm: service 'fa:130': state changed from 'started' to 'error'
 warn    163    node2/lrm: service fa:130 is not running and in an error state
 warn    183    node2/lrm: service fa:130 is not running and in an error state
 warn    203    node2/lrm: service fa:130 is not running and in an error state
 info    220      cmdlist: execute service fa:130 disabled
-info    220    node1/crm: service 'fa:130': state changed from 'error' to 'stopped' 
+info    220    node1/crm: service 'fa:130': state changed from 'error' to 'stopped'
 info    820     hardware: exit simulation - done
index 7e0a71e9374f668d4d93fb7ce13dd6a6e0c3e6ff..198aef9b79913a13c335212824f15776dd2e88d1 100644 (file)
@@ -22,10 +22,10 @@ info     25    node3/lrm: starting service vm:103
 info     25    node3/lrm: service status vm:103 started
 info    120      cmdlist: execute restart-lrm node3
 info    120    node3/lrm: restart LRM, 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    126    node3/lrm: exit (loop end)
 info    126    node3/lrm: status change startup => wait_for_agent_lock
-info    160    node1/crm: service 'vm:103': state changed from 'freeze' to 'started' 
+info    160    node1/crm: service 'vm:103': state changed from 'freeze' to 'started'
 info    165    node3/lrm: got lock 'ha_agent_node3_lock'
 info    165    node3/lrm: status change wait_for_agent_lock => active
 info    720     hardware: exit simulation - done
index 8e2d1f165ac030e049abe8bd1b80bd3e00c6f17e..7e74e8adc1533c7e36a9e1a71f718ba6166629ed 100644 (file)
@@ -21,10 +21,10 @@ info     25    node3/lrm: status change wait_for_agent_lock => active
 info     25    node3/lrm: starting service vm:103
 info     25    node3/lrm: service status vm:103 started
 info    120      cmdlist: execute service vm:103 disabled
-info    120    node1/crm: service 'vm:103': state changed from 'started' to 'request_stop' 
+info    120    node1/crm: service 'vm:103': state changed from 'started' to 'request_stop'
 info    125    node3/lrm: stopping service vm:103
 info    125    node3/lrm: service status vm:103 stopped
-info    140    node1/crm: service 'vm:103': state changed from 'request_stop' to 'stopped' 
+info    140    node1/crm: service 'vm:103': state changed from 'request_stop' to 'stopped'
 info    220      cmdlist: execute service vm:103 enabled
 info    220    node1/crm: service 'vm:103': state changed from 'stopped' to 'started'  (node = node3)
 info    225    node3/lrm: starting service vm:103
index 95937cbcc0e946f9d60466e93011b7fb215d57ec..9dbdb84a77580499b79baf8b741fbd5deb56869f 100644 (file)
@@ -29,7 +29,7 @@ info    126     shutdown: execute crm node3 stop
 info    145    node3/crm: exit (loop end)
 info    145     shutdown: execute power node3 off
 info    160    node1/crm: node 'node3': state changed from 'online' => 'unknown'
-info    200    node1/crm: service 'vm:103': state changed from 'started' to 'fence' 
+info    200    node1/crm: service 'vm:103': state changed from 'started' to 'fence'
 info    200    node1/crm: node 'node3': state changed from 'unknown' => 'fence'
 info    200    node1/crm: got lock 'ha_agent_node3_lock'
 info    200    node1/crm: fencing: acknowleged - got agent lock for node 'node3'
index fb959f9f5a4aacb62068a5971245b46a5448a551..c3fbb07cf70d9db3dbdb6e01cb6669d3551693ad 100644 (file)
@@ -29,7 +29,7 @@ info    126     shutdown: execute crm node3 stop
 info    145    node3/crm: exit (loop end)
 info    145     shutdown: execute power node3 off
 info    160    node1/crm: node 'node3': state changed from 'online' => 'unknown'
-info    200    node1/crm: service 'vm:103': state changed from 'started' to 'fence' 
+info    200    node1/crm: service 'vm:103': state changed from 'started' to 'fence'
 info    200    node1/crm: node 'node3': state changed from 'unknown' => 'fence'
 info    200    node1/crm: got lock 'ha_agent_node3_lock'
 info    200    node1/crm: fencing: acknowleged - got agent lock for node 'node3'
index 4efa3e73c0c3537b891b9dad3532afb410f5940b..16d8c4e67213b9032e3fb1e623057fc17d087d31 100644 (file)
@@ -29,7 +29,7 @@ info    126     shutdown: execute crm node3 stop
 info    145    node3/crm: exit (loop end)
 info    145     shutdown: execute power node3 off
 info    160    node1/crm: node 'node3': state changed from 'online' => 'unknown'
-info    200    node1/crm: service 'ct:103': state changed from 'started' to 'fence' 
+info    200    node1/crm: service 'ct:103': state changed from 'started' to 'fence'
 info    200    node1/crm: node 'node3': state changed from 'unknown' => 'fence'
 info    200    node1/crm: got lock 'ha_agent_node3_lock'
 info    200    node1/crm: fencing: acknowleged - got agent lock for node 'node3'
index aa8cfccf120514c3f96fe84990c0ecdce9b6691a..843104b404e4d89875a9b8ba89144fa683295f04 100644 (file)
@@ -32,7 +32,7 @@ info    141     shutdown: execute power node1 off
 info    141    node2/crm: got lock 'ha_manager_lock'
 info    141    node2/crm: status change slave => master
 info    141    node2/crm: node 'node1': state changed from 'online' => 'unknown'
-info    220    node2/crm: service 'vm:100': state changed from 'started' to 'fence' 
+info    220    node2/crm: service 'vm:100': state changed from 'started' to 'fence'
 info    220    node2/crm: node 'node1': state changed from 'unknown' => 'fence'
 info    220    node2/crm: got lock 'ha_agent_node1_lock'
 info    220    node2/crm: fencing: acknowleged - got agent lock for node 'node1'