Merge lp:~y-trudeau/mysql-mmm/mysql-mmm-NoKillPassiveOrNoNet into lp:mysql-mmm

Proposed by Yves Trudeau
Status: Needs review
Proposed branch: lp:~y-trudeau/mysql-mmm/mysql-mmm-NoKillPassiveOrNoNet
Merge into: lp:mysql-mmm
Diff against target: 13 lines (+2/-1)
1 file modified
lib/Monitor/Monitor.pm (+2/-1)
To merge this branch: bzr merge lp:~y-trudeau/mysql-mmm/mysql-mmm-NoKillPassiveOrNoNet
Reviewer Review Type Date Requested Status
mysql-mmm-core Pending
Review via email: mp+40481@code.launchpad.net

Description of the change

This simple patch change the return value send_agent_status to avoid triggering a kill host when mode is passive or when network is having issues.

To post a comment you must log in.

Unmerged revisions

148. By Yves Trudeau

Set return value to 1 to avoid killing when passive or with network issue

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-09 21:26:26 +0000
4@@ -796,7 +796,8 @@
5
6 # Never send anything to agents if we are in PASSIVE mode
7 # Never send anything to agents if we have no network connection
8- return if ($self->is_passive || !$main::have_net);
9+ # Returns 1 for "Success" to avoid uneeded kills
10+ return 1 if ($self->is_passive || !$main::have_net);
11
12 # Determine active master if it was not passed
13 $master = $self->roles->get_active_master() unless (defined($master));

Subscribers

People subscribed via source and target branches