2013-08-06 12:29:21 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2010-2013 Frank Liepold / 1&1 Internet AG
|
|
|
|
#
|
|
|
|
# Email: frank.liepold@1und1.de
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
## maxtime to wait for sync to stop
|
|
|
|
switch2primary_maxtime_sync=300
|
|
|
|
|
|
|
|
## time for which the amount of data to sync must be constant
|
|
|
|
## to declare the sync process as inactive
|
|
|
|
switch2primary_time_constant_sync=10
|
|
|
|
|
2013-12-10 14:32:40 +00:00
|
|
|
## maxtime to wait for fetch to stop (after pause-fetch)
|
|
|
|
switch2primary_maxtime_fetch=300
|
|
|
|
|
|
|
|
## time for which the amount of data to fetch must be constant to declare
|
|
|
|
## the fetch process as having stopped
|
|
|
|
switch2primary_time_constant_fetch=10
|
|
|
|
|
2013-08-06 12:29:21 +00:00
|
|
|
## maxtime to wait for (new) primary to become disk state = Uptodate and
|
|
|
|
## repl state = Replicating
|
|
|
|
switch2primary_maxtime_state_constant=60
|
|
|
|
|
2014-01-07 09:52:44 +00:00
|
|
|
## flag whether switch should use --force
|
2013-12-10 14:32:40 +00:00
|
|
|
switch2primary_force=0
|
|
|
|
|
2013-08-06 12:29:21 +00:00
|
|
|
## switch to primary may need some tries ..
|
|
|
|
switch2primary_max_tries=10
|
|
|
|
|
2014-01-07 09:52:44 +00:00
|
|
|
## flag whether - in case of split brain - the orig primary should become the
|
|
|
|
## new one or we switch to the orig secondary
|
|
|
|
switch2primary_orig_prim_equal_new_prim=0
|
2013-08-06 12:29:21 +00:00
|
|
|
|
2014-01-07 09:52:44 +00:00
|
|
|
## flag whether the secondary should become primary while the connection to
|
|
|
|
## the former primary is alive (this causes a split brain)
|
|
|
|
switch2primary_orig_primary_alive=0
|
2013-08-06 12:29:21 +00:00
|
|
|
|
2014-01-07 09:52:44 +00:00
|
|
|
## in case of split brain it's necessary to reactivate the secondary after the
|
|
|
|
## primary has been determined. This flag defines whether the reactivation
|
|
|
|
## should be done as documented or by the "hardcore" method leave-resource
|
|
|
|
## join-resource
|
|
|
|
switch2primary_activate_secondary_hardcore=0
|
2013-08-06 12:29:21 +00:00
|
|
|
|
2014-01-07 09:52:44 +00:00
|
|
|
## marsadm primary tries to switch other primaries to secondaries. This fails
|
|
|
|
## if the data device of another primary is in use (i.e. opened by another
|
|
|
|
## process). Though we must distinguish two cases
|
|
|
|
switch2primary_data_dev_in_use=1
|
2013-08-06 12:29:21 +00:00
|
|
|
|
2014-01-07 09:52:44 +00:00
|
|
|
## flag whether marsadm log-rotate and log-delete should be called before
|
|
|
|
## marsadm --force primary
|
|
|
|
switch2primary_logrotate_orig_primary=0
|
|
|
|
|
|
|
|
## flags whether marsadm log-rotate and log-delete should be called before
|
|
|
|
## in split brain situation (= after marsadm --force primary) on original
|
|
|
|
## primary resp. secondary
|
|
|
|
switch2primary_logrotate_split_brain_orig_primary=0
|
|
|
|
switch2primary_logrotate_split_brain_orig_secondary=0
|
|
|
|
|
|
|
|
## flags whether marsadm log-rotate and log-delete should be called during
|
|
|
|
## the test of the new primary
|
|
|
|
## primary resp. secondary
|
|
|
|
switch2primary_logrotate_new_primary=0
|
2014-01-07 15:24:33 +00:00
|
|
|
|
|
|
|
## prefix of the name of the script, which writes some data on
|
|
|
|
## the data devices of the both primaries
|
|
|
|
switch2primary_write_script_prefix="/tmp/$main_prefix_scripts-split_brain"
|
|
|
|
|
|
|
|
## time for which the amount of data to sync must be constant
|
|
|
|
## to declare the sync process as inactive
|
|
|
|
switch2primary_time_constant_initial_sync=3
|
|
|
|
|