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
=== modified file 'lib/Monitor/Monitor.pm'
--- lib/Monitor/Monitor.pm 2010-05-05 11:41:23 +0000
+++ lib/Monitor/Monitor.pm 2010-11-11 21:07:04 +0000
@@ -452,6 +452,7 @@
452 next if ($self->is_manual);452 next if ($self->is_manual);
453 $self->roles->clear_roles($host);453 $self->roles->clear_roles($host);
454 if (!$self->send_agent_status($host)) {454 if (!$self->send_agent_status($host)) {
455 next if ($self->is_passive || !$main::have_net);
455 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);456 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
456 $self->_kill_host($host, $checks->ping($host));457 $self->_kill_host($host, $checks->ping($host));
457 }458 }
@@ -471,6 +472,7 @@
471 next if ($self->is_manual);472 next if ($self->is_manual);
472 $self->roles->clear_roles($host);473 $self->roles->clear_roles($host);
473 if (!$self->send_agent_status($host)) {474 if (!$self->send_agent_status($host)) {
475 next if ($self->is_passive || !$main::have_net);
474 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);476 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
475 $self->_kill_host($host, $checks->ping($host));477 $self->_kill_host($host, $checks->ping($host));
476 }478 }
@@ -484,6 +486,7 @@
484 next if ($self->is_manual);486 next if ($self->is_manual);
485 $self->roles->clear_roles($host);487 $self->roles->clear_roles($host);
486 if (!$self->send_agent_status($host)) {488 if (!$self->send_agent_status($host)) {
489 next if ($self->is_passive || !$main::have_net);
487 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);490 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
488 $self->_kill_host($host, $checks->ping($host));491 $self->_kill_host($host, $checks->ping($host));
489 }492 }
@@ -622,6 +625,7 @@
622 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'));625 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'));
623 $agent->state('HARD_OFFLINE');626 $agent->state('HARD_OFFLINE');
624 if (!$self->send_agent_status($host)) {627 if (!$self->send_agent_status($host)) {
628 next if ($self->is_passive || !$main::have_net);
625 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);629 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
626 $self->_kill_host($host, $checks->ping($host));630 $self->_kill_host($host, $checks->ping($host));
627 }631 }
@@ -663,6 +667,7 @@
663# next if ($host_state eq 'REPLICATION_DELAY'); 667# next if ($host_state eq 'REPLICATION_DELAY');
664 # NOTE host_state should never be ADMIN_OFFLINE at this point 668 # NOTE host_state should never be ADMIN_OFFLINE at this point
665 if (!$ret) { 669 if (!$ret) {
670 next if ($self->is_passive || !$main::have_net);
666 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host); 671 ERROR sprintf("Can't send offline status notification to '%s' - killing it!", $host);
667 $self->_kill_host($host, $checks->ping($host)); 672 $self->_kill_host($host, $checks->ping($host));
668 } 673 }

Subscribers

People subscribed via source and target branches