commit resource-agents for openSUSE:Factory
Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2015-04-30 11:49:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents"
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes 2015-04-10 09:47:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2015-04-30 11:49:48.000000000 +0200
@@ -1,0 +2,23 @@
+Tue Apr 21 06:11:26 UTC 2015 - kgronlund@suse.com
+
+- Update to version 3.9.6+git.1429568091.f79322c:
+ + Medium: multiple: make sure that the pidfile directory exist
+ + orainstance.sh: Fix process name grep in exit_idle
+ + Low: pgsql: fix check_wal_receiver to prevent incorrect "ERROR" status display and output WARN log in the master
+ + Low: allow rgmanager lvm agent to handle hostname aliases
+ + Fix rmq_join_list to only return online nodes
+ + Medium: pgsql: Support replication slots
+ + Low: pgsql: add validation check for replication slot.
+ + Low: redis: smarter config argument default
+ + Fix: redis: reliable shutdown.
+ + Low: redis: loosen advertised default monitor timeout seconds
+ + Fix: redis: do not attempt to demote if redis is dead
+ + Low: redis: make sure to always delete master score on stop
+ + Low: redis: reconnect to new master after promotion
+ + High: redis: only connect to active master instances
+ + High: redis: wait_last_known_master option for redis agent.
+ + Low: redis: prevent bash syntax errors and lower priority some log messages
+ + High: galera: retrieve last sequence number without using read-only mode
+ + Fix return code in asterisk_monitor #2
+
+-------------------------------------------------------------------
Old:
----
resource-agents-3.9.6+git.1427133197.6897c9c.tar.xz
New:
----
resource-agents-3.9.6+git.1429568091.f79322c.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.wdnVcs/_old 2015-04-30 11:49:49.000000000 +0200
+++ /var/tmp/diff_new_pack.wdnVcs/_new 2015-04-30 11:49:49.000000000 +0200
@@ -48,7 +48,7 @@
Summary: Open Source HA Reusable Cluster Resource Scripts
License: GPL-2.0 and LGPL-2.1+ and GPL-3.0+
Group: Productivity/Clustering/HA
-Version: 3.9.6+git.1427133197.6897c9c
+Version: 3.9.6+git.1429568091.f79322c
Release: 0
Url: http://linux-ha.org/
Source: resource-agents-%{version}.tar.xz
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.wdnVcs/_old 2015-04-30 11:49:49.000000000 +0200
+++ /var/tmp/diff_new_pack.wdnVcs/_new 2015-04-30 11:49:49.000000000 +0200
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/ClusterLabs/resource-agents.git</param>
- <param name="changesrevision">6897c9c43948a71b865b8f9ca42103f180208f9d</param></service></servicedata>
\ No newline at end of file
+ <param name="changesrevision">f79322cf2ce0094c266515e9242dbdbde3a7db72</param></service></servicedata>
\ No newline at end of file
++++++ resource-agents-3.9.6+git.1427133197.6897c9c.tar.xz -> resource-agents-3.9.6+git.1429568091.f79322c.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/apache new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/apache
--- old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/apache 2015-04-07 15:45:11.000000000 +0200
+++ new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/apache 2015-04-21 08:11:26.000000000 +0200
@@ -593,6 +593,7 @@
ocf_exit_reason "Configuration file $CONFIGFILE not found!"
return $OCF_ERR_INSTALLED
fi
+ ocf_mkstatedir root 755 `dirname $PidFile` || return $OCF_ERR_INSTALLED
return $OCF_SUCCESS
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/asterisk new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/asterisk
--- old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/asterisk 2015-04-07 15:45:11.000000000 +0200
+++ new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/asterisk 2015-04-21 08:11:26.000000000 +0200
@@ -286,8 +286,13 @@
rc=$?
if [ $rc -ne 0 ]; then
- ocf_log err "Failed to connect to the Asterisk PBX"
- return $OCF_ERR_GENERIC
+ if [ "$__OCF_ACTION" = "start" ]; then
+ ocf_log info "Asterisk PBX not running yet"
+ return $OCF_NOT_RUNNING;
+ else
+ ocf_log err "Failed to connect to the Asterisk PBX"
+ return $OCF_ERR_GENERIC;
+ fi
fi
# Optionally check the monitor URI with sipsak
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/galera new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/galera
--- old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/galera 2015-04-07 15:45:11.000000000 +0200
+++ new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/galera 2015-04-21 08:11:26.000000000 +0200
@@ -443,19 +443,18 @@
ocf_exit_reason "Failure, Attempted to promote Master instance of $OCF_RESOURCE_INSTANCE before bootstrap node has been detected."
return $OCF_ERR_GENERIC
fi
-
fi
- # make sure the read only instance is stopped
- mysql_common_stop
- rc=$?
- if [ $rc -ne $OCF_SUCCESS ] && [ $rc -ne $OCF_NOT_RUNNING ]; then
- ocf_exit_reason "Failed to stop read-only galera instance during promotion to Master"
- return $rc
+ galera_monitor
+ if [ $? -eq $OCF_RUNNING_MASTER ]; then
+ if ocf_is_true $bootstrap; then
+ promote_everyone
+ clear_bootstrap_node
+ ocf_log info "boostrap node already up, promoting the rest of the galera instances."
+ fi
+ return $OCF_SUCCESS
fi
- sleep 4
-
mysql_common_prepare_dirs
mysql_common_start "$extra_opts"
rc=$?
@@ -510,14 +509,14 @@
# if this node was previously a bootstrap node, that is no longer the case.
clear_bootstrap_node
+ clear_last_commit
- # start again in slave mode so the new last commit is recorded
+ # record last commit by "starting" galera. start is just detection of the last sequence number
galera_start
}
galera_start()
{
- local extra_opts='--read-only=true'
local last_commit
echo $OCF_RESKEY_wsrep_cluster_address | grep -q $NODENAME
@@ -526,22 +525,39 @@
return $OCF_ERR_CONFIGURED
fi
- mysql_common_prepare_dirs
- mysql_common_start "$extra_opts"
-
- is_readonly
- if [ $? -ne 0 ]; then
- ocf_exit_reason "Slave instance did not start correctly in read-only mode, Make sure local galera.cnf does not have wsrep_cluster_address set."
+ galera_monitor
+ if [ $? -eq $OCF_RUNNING_MASTER ]; then
+ ocf_exit_reason "master galera instance started outside of the cluster's control"
return $OCF_ERR_GENERIC
fi
- ocf_log info "attempting to detect last commit version"
- while [ -z "$last_commit" ]; do
- last_commit=$(get_status_variable "wsrep_last_committed")
- if [ -z "$last_commit" ]; then
- sleep 1
+ mysql_common_prepare_dirs
+
+ ocf_log info "attempting to detect last commit version by reading ${OCF_RESKEY_datadir}/grastate.dat"
+ last_commit="$(cat ${OCF_RESKEY_datadir}/grastate.dat | sed -n 's/^seqno.\s*\(.*\)\s*$/\1/p')"
+ if [ -z "$last_commit" ] || [ "$last_commit" = "-1" ]; then
+ ocf_log info "now attempting to detect last commit version using 'mysqld_safe --wsrep-recover'"
+ local tmp=$(mktemp)
+ ${OCF_RESKEY_binary} --defaults-file=$OCF_RESKEY_config \
+ --pid-file=$OCF_RESKEY_pid \
+ --socket=$OCF_RESKEY_socket \
+ --datadir=$OCF_RESKEY_datadir \
+ --user=$OCF_RESKEY_user \
+ --wsrep-recover > $tmp 2>&1
+
+ last_commit="$(cat $tmp | sed -n 's/.*WSREP\:\s*[R|r]ecovered\s*position.*\:\(.*\)\s*$/\1/p')"
+ rm -f $tmp
+
+ if [ "$last_commit" = "-1" ]; then
+ last_commit="0"
fi
- done
+ fi
+
+ if [ -z "$last_commit" ]; then
+ ocf_exit_reason "Unable to detect last known write sequence number"
+ clear_last_commit
+ return $OCF_ERR_GENERIC
+ fi
ocf_log info "Last commit version found: $last_commit"
set_last_commit $last_commit
@@ -567,28 +583,40 @@
if ocf_is_probe; then
status_loglevel="info"
fi
-
+
mysql_common_status $status_loglevel
rc=$?
- # If status returned an error, return that immediately
- if [ $rc -ne $OCF_SUCCESS ]; then
+ if [ $rc -eq $OCF_NOT_RUNNING ]; then
+ last_commit=$(get_last_commit $node)
+ if [ -n "$last_commit" ]; then
+ # if last commit is set, this instance is considered started in slave mode
+ rc=$OCF_SUCCESS
+ master_exists
+ if [ $? -ne 0 ]; then
+ detect_first_master
+ else
+ # a master instance exists and is healthy, promote this
+ # local read only instance
+ # so it can join the master galera cluster.
+ set_master_score
+ fi
+ fi
+ return $rc
+ elif [ $rc -ne $OCF_SUCCESS ]; then
return $rc
fi
+ # if we make it here, mysql is running. Check cluster status now.
+
echo $OCF_RESKEY_wsrep_cluster_address | grep -q $NODENAME
if [ $? -ne 0 ]; then
ocf_exit_reason "local node <${NODENAME}> is started, but is not a member of the wsrep_cluster_address <${OCF_RESKEY_wsrep_cluster_address}>"
return $OCF_ERR_GENERIC
fi
- is_readonly
- if [ $? -ne 0 ]; then
- is_primary
- if [ $? -ne 0 ]; then
- ocf_exit_reason "local node <${NODENAME}> is neither in primary mode nor in read_only mode. Unknown state."
- return $OCF_ERR_GENERIC
- fi
+ is_primary
+ if [ $? -eq 0 ]; then
if ocf_is_probe; then
# restore master score during probe
@@ -596,18 +624,10 @@
set_master_score
fi
rc=$OCF_RUNNING_MASTER
- else
- master_exists
- if [ $? -ne 0 ]; then
- detect_first_master
- else
- # a master instance exists and is healthy, promote this
- # local read only instance
- # so it can join the master galera cluster.
- set_master_score
- fi
+ else
+ ocf_exit_reason "local node <${NODENAME}> is started, but not in primary mode. Unknown state."
+ rc=$OCF_ERR_GENERIC
fi
- # TODO look at what is done in the wait script
return $rc
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/named new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/named
--- old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/named 2015-04-07 15:45:11.000000000 +0200
+++ new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/named 2015-04-21 08:11:26.000000000 +0200
@@ -229,6 +229,9 @@
return $OCF_ERR_CONFIGURED
fi
+ # make sure that the pidfile directory exists
+ ocf_mkstatedir $OCF_RESKEY_named_user 755 `dirname $OCF_RESKEY_named_pidfile` || return $OCF_ERR_INSTALLED
+
return $OCF_SUCCESS
}
@@ -487,3 +490,5 @@
*)
exit $OCF_ERR_UNIMPLEMENTED;;
esac
+
+# vim:ts=4:sw=4:et:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/ocf-shellfuncs.in new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/ocf-shellfuncs.in
--- old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/ocf-shellfuncs.in 2015-04-07 15:45:11.000000000 +0200
+++ new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/ocf-shellfuncs.in 2015-04-21 08:11:26.000000000 +0200
@@ -748,6 +748,87 @@
}
#
+# create a given status directory
+# if the directory path doesn't start with $HA_VARRUN, then
+# we return with error (most of the calls would be with the user
+# supplied configuration, hence we need to do necessary
+# protection)
+# used mostly for PID files
+#
+# usage: ocf_mkstatedir owner permissions path
+#
+# owner: user.group
+# permissions: permissions
+# path: directory path
+#
+# example:
+# ocf_mkstatedir named 755 `dirname $pidfile`
+#
+ocf_mkstatedir()
+{
+ local owner
+ local perms
+ local path
+
+ owner=$1
+ perms=$2
+ path=$3
+
+ test -d $path && return 0
+ [ $(id -u) = 0 ] || return 1
+
+ case $path in
+ $HA_VARRUN/*) : this path is ok ;;
+ *) ocf_log err "cannot create $path (does not start with $HA_VARRUN)"
+ return 1
+ ;;
+ esac
+
+ mkdir -p $path &&
+ chown $owner $path &&
+ chmod $perms $path
+}
+
+#
+# create a unique status directory in $HA_VARRUN
+# used mostly for PID files
+# the directory is by default set to
+# $HA_VARRUN/$OCF_RESOURCE_INSTANCE
+# the directory name is printed to stdout
+#
+# usage: ocf_unique_rundir owner permissions name
+#
+# owner: user.group (default: "root")
+# permissions: permissions (default: "755")
+# name: some unique string (default: "$OCF_RESOURCE_INSTANCE")
+#
+# to use the default either don't set the parameter or set it to
+# empty string ("")
+# example:
+#
+# STATEDIR=`ocf_unique_rundir named "" myownstatedir`
+#
+ocf_unique_rundir()
+{
+ local path
+ local owner
+ local perms
+ local name
+
+ owner=${1:-"root"}
+ perms=${2:-"755"}
+ name=${3:-"$OCF_RESOURCE_INSTANCE"}
+ path=$HA_VARRUN/$name
+ if [ ! -d $path ]; then
+ [ $(id -u) = 0 ] || return 1
+ mkdir -p $path &&
+ chown $owner $path &&
+ chmod $perms $path || return 1
+ fi
+ echo $path
+}
+
+#
# RA tracing may be turned on by setting OCF_TRACE_RA
# the trace output will be saved to OCF_TRACE_FILE, if set, or
# by default to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/pgsql new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/pgsql
--- old/resource-agents-3.9.6+git.1427133197.6897c9c/heartbeat/pgsql 2015-04-07 15:45:11.000000000 +0200
+++ new/resource-agents-3.9.6+git.1429568091.f79322c/heartbeat/pgsql 2015-04-21 08:11:26.000000000 +0200
@@ -64,6 +64,7 @@
OCF_RESKEY_xlog_check_count_default="3"
OCF_RESKEY_crm_attr_timeout_default="5"
OCF_RESKEY_stop_escalate_in_slave_default=30
+OCF_RESKEY_replication_slot_name_default=""
: ${OCF_RESKEY_pgctl=${OCF_RESKEY_pgctl_default}}
: ${OCF_RESKEY_psql=${OCF_RESKEY_psql_default}}
@@ -96,6 +97,7 @@
: ${OCF_RESKEY_xlog_check_count=${OCF_RESKEY_xlog_check_count_default}}
: ${OCF_RESKEY_crm_attr_timeout=${OCF_RESKEY_crm_attr_timeout_default}}
: ${OCF_RESKEY_stop_escalate_in_slave=${OCF_RESKEY_stop_escalate_in_slave_default}}
+: ${OCF_RESKEY_replication_slot_name=${OCF_RESKEY_replication_slot_name_default}}
usage() {
cat <
participants (1)
-
root@hilbert.suse.de