Merge lp:~tenbrae/mysql-mmm/fix-645460 into lp:mysql-mmm

Proposed by aeva black
Status: Needs review
Proposed branch: lp:~tenbrae/mysql-mmm/fix-645460
Merge into: lp:mysql-mmm
Diff against target: 43 lines (+5/-0)
1 file modified
lib/Monitor/Monitor.pm (+5/-0)
To merge this branch: bzr merge lp:~tenbrae/mysql-mmm/fix-645460
Reviewer Review Type Date Requested Status
mysql-mmm-core Pending
Review via email: mp+40670@code.launchpad.net

Description of the change

Fixed bug "mmm tries to kill_host when replication delays in PASSIVE mode" # 645460

To post a comment you must log in.

Unmerged revisions

148. By Devananda <deva@Apsara>

fixes bug #645460 -- monitor in PASSIVE mode will call _kill_host unnecessarily

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/Monitor/Monitor.pm'
2--- lib/Monitor/Monitor.pm 2010-05-05 11:41:23 +0000
3+++ lib/Monitor/Monitor.pm 2010-11-11 21:07:04 +0000
4@@ -452,6 +452,7 @@
5 next if ($self->is_manual);
6 $self->roles->clear_roles($host);
7 if (!$self->send_agent_status($host)) {
8+ next if ($self->is_passive || !$main::have_net);
9 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
10 $self->_kill_host($host, $checks->ping($host));
11 }
12@@ -471,6 +472,7 @@
13 next if ($self->is_manual);
14 $self->roles->clear_roles($host);
15 if (!$self->send_agent_status($host)) {
16+ next if ($self->is_passive || !$main::have_net);
17 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
18 $self->_kill_host($host, $checks->ping($host));
19 }
20@@ -484,6 +486,7 @@
21 next if ($self->is_manual);
22 $self->roles->clear_roles($host);
23 if (!$self->send_agent_status($host)) {
24+ next if ($self->is_passive || !$main::have_net);
25 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
26 $self->_kill_host($host, $checks->ping($host));
27 }
28@@ -622,6 +625,7 @@
29 FATAL sprintf("State of host '%s' changed from %s to HARD_OFFLINE (ping: %s, mysql: %s)", $host, $state, ($ping? 'OK' : 'not OK'), ($mysql? 'OK' : 'not OK'));
30 $agent->state('HARD_OFFLINE');
31 if (!$self->send_agent_status($host)) {
32+ next if ($self->is_passive || !$main::have_net);
33 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
34 $self->_kill_host($host, $checks->ping($host));
35 }
36@@ -663,6 +667,7 @@
37 # next if ($host_state eq 'REPLICATION_DELAY');
38 # NOTE host_state should never be ADMIN_OFFLINE at this point
39 if (!$ret) {
40+ next if ($self->is_passive || !$main::have_net);
41 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
42 $self->_kill_host($host, $checks->ping($host));
43 }

Subscribers

People subscribed via source and target branches