Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory
checked in at 2019-02-24 18:02:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents"
Sun Feb 24 18:02:44 2019 rev:91 rq:677146 version:4.2.0+git63.0f7987fb
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes
2018-12-11 15:42:45.874540565 +0100
+++
/work/SRC/openSUSE:Factory/.resource-agents.new.28833/resource-agents.changes
2019-02-24 18:02:46.399787411 +0100
@@ -1,0 +2,20 @@
+Mon Feb 18 13:06:33 UTC 2019 - [email protected]
+
+- Update to version 4.2.0+git63.0f7987fb:
+ * clvm: support exclusive mode
+ * Revert " Added support for multiple slaves to pgsql."
+ * azure-lb: remove reference to status from usage
+ * configure: add Python library detection
+ * Added support for multiple slaves to pgsql.
+ * LVM-activate: make vgname not uniqe
+ * LVM-activate: fix dmsetup check
+ * LVM-activate: fix bashism [[
+ * Route: make family parameter optional
+ * LVM-activate: dont fail initial probe
+ * docker: Fix issues with stop operation
+ * rabbitmq-cluster: always use quiet flag for eval calls
+ * aws-vpc-move-ip: multiple VPC routing tables in routing_tables parameter -
included comment in metadata section (bsc#1125138)
+ * aws-vpc-move-ip: multiple VPC routing tables in routing_tables parameter -
adjusting sleep time (bsc#1125138)
+ * aws-vpc-move-ip: new feature: include support for multiple routing tables
(bsc#1125138)
+
+-------------------------------------------------------------------
Old:
----
resource-agents-4.2.0+git33.69a622fd.tar.xz
New:
----
resource-agents-4.2.0+git63.0f7987fb.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.nhwN3q/_old 2019-02-24 18:02:46.779787281 +0100
+++ /var/tmp/diff_new_pack.nhwN3q/_new 2019-02-24 18:02:46.779787281 +0100
@@ -1,7 +1,7 @@
#
# spec file for package resource-agents
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: resource-agents
-Version: 4.2.0+git33.69a622fd
+Version: 4.2.0+git63.0f7987fb
Release: 0
Summary: HA Reusable Cluster Resource Scripts
License: GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.nhwN3q/_old 2019-02-24 18:02:46.811787270 +0100
+++ /var/tmp/diff_new_pack.nhwN3q/_new 2019-02-24 18:02:46.815787269 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">8ed87936e9ad06318cc49ea767885a405dfde11e</param>
+<param name="changesrevision">0f7987fb8a25b23d8d8eda2d5a040bd8aa09bca3</param>
</service>
</servicedata>
\ No newline at end of file
++++++ resource-agents-4.2.0+git33.69a622fd.tar.xz ->
resource-agents-4.2.0+git63.0f7987fb.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/resource-agents-4.2.0+git33.69a622fd/configure.ac
new/resource-agents-4.2.0+git63.0f7987fb/configure.ac
--- old/resource-agents-4.2.0+git33.69a622fd/configure.ac 2018-12-06
08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/configure.ac 2019-02-08
10:56:46.000000000 +0100
@@ -30,6 +30,8 @@
PKG_FEATURES=""
AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_MACRO_DIR([m4])
+
AC_CANONICAL_HOST
dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below)
@@ -501,12 +503,46 @@
AC_SUBST(RM)
AC_SUBST(TEST)
+dnl Ensure PYTHON is an absolute path
+AC_PATH_PROG([PYTHON], [$PYTHON])
+
AM_PATH_PYTHON
if test -z "$PYTHON"; then
echo "*** Essential program python not found" 1>&2
- exit 1
fi
+AC_PYTHON_MODULE(googleapiclient)
+AC_PYTHON_MODULE(pyroute2)
+
+BUILD_AZURE_EVENTS=1
+if test -z "$PYTHON"; then
+ BUILD_AZURE_EVENTS=0
+ AC_MSG_WARN("Not building azure-events")
+fi
+AM_CONDITIONAL(BUILD_AZURE_EVENTS, test $BUILD_AZURE_EVENTS -eq 1)
+
+BUILD_GCP_PD_MOVE=1
+if test -z "$PYTHON" || test "x${HAVE_PYMOD_GOOGLEAPICLIENT}" != xyes; then
+ BUILD_GCP_PD_MOVE=0
+ AC_MSG_WARN("Not building gcp-pd-move")
+fi
+AM_CONDITIONAL(BUILD_GCP_PD_MOVE, test $BUILD_GCP_PD_MOVE -eq 1)
+
+BUILD_GCP_VPC_MOVE_ROUTE=1
+if test -z "$PYTHON" || test "x${HAVE_PYMOD_GOOGLEAPICLIENT}" != xyes || \
+ test "x${HAVE_PYMOD_PYROUTE2}" != xyes; then
+ BUILD_GCP_VPC_MOVE_ROUTE=0
+ AC_MSG_WARN("Not building gcp-vpc-move-route")
+fi
+AM_CONDITIONAL(BUILD_GCP_VPC_MOVE_ROUTE, test $BUILD_GCP_VPC_MOVE_ROUTE -eq 1)
+
+BUILD_GCP_VPC_MOVE_VIP=1
+if test -z "$PYTHON" || test "x${HAVE_PYMOD_GOOGLEAPICLIENT}" != xyes; then
+ BUILD_GCP_VPC_MOVE_VIP=0
+ AC_MSG_WARN("Not building gcp-vpc-move-vip")
+fi
+AM_CONDITIONAL(BUILD_GCP_VPC_MOVE_VIP, test $BUILD_GCP_VPC_MOVE_VIP -eq 1)
+
AC_PATH_PROGS(ROUTE, route)
AC_DEFINE_UNQUOTED(ROUTE, "$ROUTE", path to route command)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/doc/man/Makefile.am
new/resource-agents-4.2.0+git63.0f7987fb/doc/man/Makefile.am
--- old/resource-agents-4.2.0+git33.69a622fd/doc/man/Makefile.am
2018-12-06 08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/doc/man/Makefile.am
2019-02-08 10:56:46.000000000 +0100
@@ -55,8 +55,7 @@
# 12126 on savannah.gnu.org. But, maybe it gets fixed soon, it was
# first reported in 1995 and added to Savannah in in 2005...
if BUILD_DOC
-man_MANS = ocf_heartbeat_azure-events.7 \
- ocf_heartbeat_AoEtarget.7 \
+man_MANS = ocf_heartbeat_AoEtarget.7 \
ocf_heartbeat_AudibleAlarm.7 \
ocf_heartbeat_ClusterMon.7 \
ocf_heartbeat_CTDB.7 \
@@ -116,10 +115,7 @@
ocf_heartbeat_fio.7 \
ocf_heartbeat_galera.7 \
ocf_heartbeat_garbd.7 \
- ocf_heartbeat_gcp-pd-move.7 \
ocf_heartbeat_gcp-vpc-move-ip.7 \
- ocf_heartbeat_gcp-vpc-move-vip.7 \
- ocf_heartbeat_gcp-vpc-move-route.7 \
ocf_heartbeat_iSCSILogicalUnit.7 \
ocf_heartbeat_iSCSITarget.7 \
ocf_heartbeat_iface-bridge.7 \
@@ -168,11 +164,12 @@
ocf_heartbeat_slapd.7 \
ocf_heartbeat_sybaseASE.7 \
ocf_heartbeat_sg_persist.7 \
- ocf_heartbeat_mpathpersist.7 \
+ ocf_heartbeat_mpathpersist.7 \
ocf_heartbeat_symlink.7 \
ocf_heartbeat_syslog-ng.7 \
ocf_heartbeat_tomcat.7 \
ocf_heartbeat_varnish.7 \
+ ocf_heartbeat_vdo-vol.7 \
ocf_heartbeat_vmware.7 \
ocf_heartbeat_vsftpd.7 \
ocf_heartbeat_zabbixserver.7
@@ -181,6 +178,22 @@
man_MANS += ocf_heartbeat_IPv6addr.7
endif
+if BUILD_AZURE_EVENTS
+man_MANS += ocf_heartbeat_azure-events.7
+endif
+
+if BUILD_GCP_PD_MOVE
+man_MANS += ocf_heartbeat_gcp-pd-move.7
+endif
+
+if BUILD_GCP_VPC_MOVE_ROUTE
+man_MANS += ocf_heartbeat_gcp-vpc-move-route.7
+endif
+
+if BUILD_GCP_VPC_MOVE_VIP
+man_MANS += ocf_heartbeat_gcp-vpc-move-vip.7
+endif
+
xmlfiles = $(man_MANS:.7=.xml)
%.1 %.5 %.7 %.8: %.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/LVM-activate
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/LVM-activate
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/LVM-activate
2018-12-06 08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/LVM-activate
2019-02-08 10:56:46.000000000 +0100
@@ -102,7 +102,7 @@
<shortdesc lang="en">This agent activates/deactivates logical
volumes.</shortdesc>
<parameters>
-<parameter name="vgname" unique="1" required="1">
+<parameter name="vgname" unique="0" required="1">
<longdesc lang="en">
The volume group name.
</longdesc>
@@ -323,6 +323,10 @@
# Good: lvmlockd is running, and clvmd is not running
if ! pgrep lvmlockd >/dev/null 2>&1 ; then
+ if ocf_is_probe; then
+ exit $OCF_NOT_RUNNING
+ fi
+
ocf_exit_reason "lvmlockd daemon is not running!"
exit $OCF_ERR_CONFIGURED
fi
@@ -634,7 +638,7 @@
fi
OUT=$(lvs --noheadings -S lv_active=active ${VG} 2>/dev/null)
- [[ -n "$OUT" ]] && return $OCF_SUCCESS
+ [ -n "$OUT" ] && return $OCF_SUCCESS
# Close the lockspace of this VG if there is no active LV
ocf_run vgchange --lockstop ${VG}
@@ -715,9 +719,9 @@
if [ -n "${LV}" ]; then
# dmsetup ls? It cannot accept device name. It's
# too heavy to list all DM devices.
- dm_count=$(dmsetup info --noheadings --noflush -c -S
"vgname=${VG} && lvname=${LV}" | wc -l )
+ dm_count=$(dmsetup info --noheadings --noflush -c -S
"vgname=${VG} && lvname=${LV}" | grep -c -v '^No devices found')
else
- dm_count=$(dmsetup info --noheadings --noflush -c -S
"vgname=${VG}" 2>/dev/null | wc -l )
+ dm_count=$(dmsetup info --noheadings --noflush -c -S
"vgname=${VG}" | grep -c -v '^No devices found')
fi
if [ $dm_count -eq 0 ]; then
@@ -772,7 +776,7 @@
lvm_stop() {
local vol
- [[ -z ${LV} ]] && vol=${VG} || vol=${VG}/${LV}
+ [ -z ${LV} ] && vol=${VG} || vol=${VG}/${LV}
if ! lvm_status ; then
ocf_log info "${vol}: has already been deactivated."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/Makefile.am
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/Makefile.am
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/Makefile.am
2018-12-06 08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/Makefile.am
2019-02-08 10:56:46.000000000 +0100
@@ -50,8 +50,7 @@
IPv6addr_LDADD = -lplumb $(LIBNETLIBS)
send_ua_LDADD = $(LIBNETLIBS)
-ocf_SCRIPTS = azure-events \
- AoEtarget \
+ocf_SCRIPTS = AoEtarget \
AudibleAlarm \
ClusterMon \
CTDB \
@@ -112,10 +111,7 @@
fio \
galera \
garbd \
- gcp-pd-move \
gcp-vpc-move-ip \
- gcp-vpc-move-vip \
- gcp-vpc-move-route \
iSCSILogicalUnit \
iSCSITarget \
ids \
@@ -168,10 +164,27 @@
syslog-ng \
tomcat \
varnish \
+ vdo-vol \
vmware \
vsftpd \
zabbixserver
+if BUILD_AZURE_EVENTS
+ocf_SCRIPTS += azure-events
+endif
+
+if BUILD_GCP_PD_MOVE
+ocf_SCRIPTS += gcp-pd-move
+endif
+
+if BUILD_GCP_VPC_MOVE_ROUTE
+ocf_SCRIPTS += gcp-vpc-move-route
+endif
+
+if BUILD_GCP_VPC_MOVE_VIP
+ocf_SCRIPTS += gcp-vpc-move-vip
+endif
+
ocfcommondir = $(OCF_LIB_DIR_PREFIX)/heartbeat
ocfcommon_DATA = ocf-shellfuncs \
ocf-binaries \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/resource-agents-4.2.0+git33.69a622fd/heartbeat/Route
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/Route
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/Route 2018-12-06
08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/Route 2019-02-08
10:56:46.000000000 +0100
@@ -124,7 +124,7 @@
<content type="string" default="" />
</parameter>
-<parameter name="family" unique="0" required="1">
+<parameter name="family" unique="0">
<longdesc lang="en">
The address family to be used for the route
ip4 IP version 4
@@ -132,7 +132,7 @@
detect Detect from 'destination' address.
</longdesc>
<shortdesc lang="en">Address Family</shortdesc>
-<content type="string" default="${OCF_RESKEY_family}" />
+<content type="string" default="${OCF_RESKEY_family_default}" />
</parameter>
</parameters>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/aws-vpc-move-ip
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/aws-vpc-move-ip
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/aws-vpc-move-ip
2018-12-06 08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/aws-vpc-move-ip
2019-02-08 10:56:46.000000000 +0100
@@ -103,9 +103,9 @@
<parameter name="routing_table" required="1">
<longdesc lang="en">
-Name of the routing table, where the route for the IP address should be
changed, i.e. rtb-...
+Name of the routing table(s), where the route for the IP address should be
changed. If declaring multiple routing tables they should be separated by
comma. Example: rtb-XXXXXXXX,rtb-YYYYYYYYY
</longdesc>
-<shortdesc lang="en">routing table name</shortdesc>
+<shortdesc lang="en">routing table name(s)</shortdesc>
<content type="string" default="" />
</parameter>
@@ -165,20 +165,29 @@
}
ec2ip_monitor() {
+ MON_RES=""
if ocf_is_true ${OCF_RESKEY_monapi} || [ "$__OCF_ACTION" = "start" ] ||
ocf_is_probe; then
- ocf_log info "monitor: check routing table (API call)"
- cmd="$OCF_RESKEY_awscli --profile $OCF_RESKEY_profile --output
text ec2 describe-route-tables --route-table-ids $OCF_RESKEY_routing_table
--query
RouteTables[*].Routes[?DestinationCidrBlock=='$OCF_RESKEY_ip/32'].InstanceId"
- ocf_log debug "executing command: $cmd"
- ROUTE_TO_INSTANCE=$($cmd)
- ocf_log debug "Overlay IP is currently routed to
${ROUTE_TO_INSTANCE}"
- if [ -z "$ROUTE_TO_INSTANCE" ]; then
- ROUTE_TO_INSTANCE="<unknown>"
- fi
+ for rtb in $(echo $OCF_RESKEY_routing_table | sed -e 's/,/
/g'); do
+ ocf_log info "monitor: check routing table (API call) -
$rtb"
+ cmd="$OCF_RESKEY_awscli --profile $OCF_RESKEY_profile
--output text ec2 describe-route-tables --route-table-ids $rtb --query
RouteTables[*].Routes[?DestinationCidrBlock=='$OCF_RESKEY_ip/32'].InstanceId"
+ ocf_log debug "executing command: $cmd"
+ ROUTE_TO_INSTANCE="$($cmd)"
+ ocf_log debug "Overlay IP is currently routed to
${ROUTE_TO_INSTANCE}"
+ if [ -z "$ROUTE_TO_INSTANCE" ]; then
+ ROUTE_TO_INSTANCE="<unknown>"
+ fi
+
+ if [ "$EC2_INSTANCE_ID" != "$ROUTE_TO_INSTANCE" ]; then
+ ocf_log warn "not routed to this instance
($EC2_INSTANCE_ID) but to instance $ROUTE_TO_INSTANCE on $rtb"
+ MON_RES="$MON_RES $rtb"
+ fi
+ sleep 1
+ done
- if [ "$EC2_INSTANCE_ID" != "$ROUTE_TO_INSTANCE" ];then
- ocf_log warn "not routed to this instance
($EC2_INSTANCE_ID) but to instance $ROUTE_TO_INSTANCE"
+ if [ ! -z "$MON_RES" ]; then
return $OCF_NOT_RUNNING
fi
+
else
ocf_log debug "monitor: Enhanced Monitoring disabled - omitting
API call"
fi
@@ -210,19 +219,23 @@
}
ec2ip_get_and_configure() {
- # Adjusting the routing table
- cmd="$OCF_RESKEY_awscli --profile $OCF_RESKEY_profile --output text ec2
replace-route --route-table-id $OCF_RESKEY_routing_table
--destination-cidr-block ${OCF_RESKEY_ip}/32 --instance-id $EC2_INSTANCE_ID"
- ocf_log debug "executing command: $cmd"
- $cmd
- rc=$?
- if [ "$rc" != 0 ]; then
- ocf_log warn "command failed, rc: $rc"
- return $OCF_ERR_GENERIC
- fi
+ for rtb in $(echo $OCF_RESKEY_routing_table | sed -e 's/,/ /g'); do
+ cmd="$OCF_RESKEY_awscli --profile $OCF_RESKEY_profile --output
text ec2 replace-route --route-table-id $rtb --destination-cidr-block
${OCF_RESKEY_ip}/32 --instance-id $EC2_INSTANCE_ID"
+ ocf_log debug "executing command: $cmd"
+ $cmd
+ rc=$?
+ if [ "$rc" != 0 ]; then
+ ocf_log warn "command failed, rc: $rc"
+ return $OCF_ERR_GENERIC
+ fi
+ sleep 1
+ done
# Reconfigure the local ip address
ec2ip_drop
- ip addr add "${OCF_RESKEY_ip}/32" dev $OCF_RESKEY_interface
+ cmd="ip addr add ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface"
+ ocf_log debug "executing command: $cmd"
+ $cmd
rc=$?
if [ $rc != 0 ]; then
ocf_log warn "command failed, rc: $rc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/azure-lb
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/azure-lb
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/azure-lb 2018-12-06
08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/azure-lb 2019-02-08
10:56:46.000000000 +0100
@@ -33,7 +33,6 @@
$0 manages service that answers Azure Load Balancer health probe requests
as a OCF HA resource.
The 'start' operation starts the instance.
The 'stop' operation stops the instance.
- The 'status' operation reports whether the instance is running
The 'monitor' operation reports whether the instance seems to be working
The 'validate-all' operation reports whether the parameters are valid
END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/clvm.in
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/clvm.in
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/clvm.in 2018-12-06
08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/clvm.in 2019-02-08
10:56:46.000000000 +0100
@@ -72,6 +72,15 @@
<content type="boolean" default="true"/>
</parameter>
+<parameter name="exclusive" unique="0" required="0">
+<longdesc lang="en">
+If set, only exclusive volume groups will be monitored.
+</longdesc>
+<shortdesc lang="en">Only monitor exclusive volume groups</shortdesc>
+<content type="boolean" default="false" />
+</parameter>
+
+
</parameters>
<actions>
@@ -215,7 +224,13 @@
# NOTE: replace this with vgs, once display filter per attr is implemented.
clustered_vgs() {
- ${LVM_VGDISPLAY} 2>/dev/null | awk 'BEGIN {RS="VG Name"} {if
(/Clustered/) print $1;}'
+ if ! ocf_is_true "$OCF_RESKEY_exclusive"; then
+ ${LVM_VGDISPLAY} 2>/dev/null | awk 'BEGIN {RS="VG Name"} {if
(/Clustered/) print $1;}'
+ else
+ for vg in $(vgs --select "clustered=yes" -o name --noheadings);
do
+ lvs --select lv_active=~'local.*exclusive' -o vg_name
--noheadings $vg 2> /dev/null | awk '!seen[$1]++ {print $1}'
+ done
+ fi
}
wait_for_process()
@@ -374,7 +389,7 @@
return $?;
fi
- # autoset locking type to clusted when lvmconf tool is available
+ # autoset locking type to clustered when lvmconf tool is available
if [ -x "$LVMCONF" ]; then
$LVMCONF --enable-cluster > /dev/null 2>&1
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/docker
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/docker
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/docker 2018-12-06
08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/docker 2019-02-08
10:56:46.000000000 +0100
@@ -215,7 +215,7 @@
out=$(docker exec ${CONTAINER} $OCF_RESKEY_monitor_cmd 2>&1)
rc=$?
else
- out=$(echo "$OCF_RESKEY_monitor_cmd" | nsenter --target
$(docker inspect --format {{.State.Pid}} ${CONTAINER}) --mount --uts --ipc
--net --pid 2>&1)
+ out=$(echo "$OCF_RESKEY_monitor_cmd" | nsenter --target
$(docker inspect --type=container --format {{.State.Pid}} ${CONTAINER}) --mount
--uts --ipc --net --pid 2>&1)
rc=$?
fi
@@ -236,7 +236,25 @@
container_exists()
{
- docker inspect --format {{.State.Running}} $CONTAINER | egrep
'(true|false)' >/dev/null 2>&1
+ local err
+
+ err=$(docker inspect --type=container $CONTAINER 2>&1 >/dev/null)
+
+ if [ $? -ne $OCF_SUCCESS ]; then
+ case $err in
+ *"No such container"*)
+ # Return failure instead of exiting if
container does not exist
+ return 1
+ ;;
+ *)
+ # Exit if error running command
+ ocf_exit_reason "$err"
+ exit $OCF_ERR_GENERIC
+ ;;
+ esac
+ fi
+
+ return $OCF_SUCCESS
}
remove_container()
@@ -265,7 +283,7 @@
fi
# retrieve the 'Running' attribute for the container
- val=$(docker inspect --format {{.State.Running}} $CONTAINER 2>/dev/null)
+ val=$(docker inspect --type=container --format {{.State.Running}}
$CONTAINER 2>/dev/null)
if [ $? -ne 0 ]; then
#not running as a result of container not being found
return $OCF_NOT_RUNNING
@@ -295,7 +313,7 @@
# if starting takes longer than monitor timeout then upstream
will make this fail.
while
- val=$(docker inspect --format {{.State.Health.Status}}
$CONTAINER 2>/dev/null)
+ val=$(docker inspect --type=container --format
{{.State.Health.Status}} $CONTAINER 2>/dev/null)
if [ $? -ne 0 ]; then
#not healthy as a result of container not
being found
return $OCF_NOT_RUNNING
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/rabbitmq-cluster
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/rabbitmq-cluster
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/rabbitmq-cluster
2018-12-06 08:44:07.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/rabbitmq-cluster
2019-02-08 10:56:46.000000000 +0100
@@ -39,6 +39,7 @@
RMQ_SERVER=/usr/sbin/rabbitmq-server
RMQ_CTL=/usr/sbin/rabbitmqctl
+RMQ_EVAL="${RMQ_CTL} eval -q"
RMQ_DATA_DIR="/var/lib/rabbitmq/mnesia"
RMQ_PID_DIR="/var/run/rabbitmq"
RMQ_PID_FILE="/var/run/rabbitmq/rmq.pid"
@@ -179,7 +180,7 @@
}
rmq_app_running() {
- if $RMQ_CTL eval 'application:which_applications().' | grep -q
'{rabbit,'; then
+ if $RMQ_EVAL 'application:which_applications().' | grep -q '{rabbit,';
then
ocf_log debug "RabbitMQ application is running"
return $OCF_SUCCESS
else
@@ -190,7 +191,7 @@
}
rmq_node_alive() {
- if $RMQ_CTL eval 'ok.'; then
+ if $RMQ_EVAL 'ok.'; then
ocf_log debug "RabbitMQ node is alive"
return $OCF_SUCCESS
else
@@ -203,11 +204,11 @@
rmq_monitor() {
local rc
- status=$($RMQ_CTL eval 'rabbit_mnesia:cluster_status_from_mnesia().'
2>&1)
+ status=$($RMQ_EVAL 'rabbit_mnesia:cluster_status_from_mnesia().' 2>&1)
if echo "${status}" | grep -q '^{ok'; then
pcs_running=$(rmq_join_list | wc -w)
ocf_log debug "Pacemaker thinks ${pcs_running} RabbitMQ nodes
are running"
- rmq_running=$($RMQ_CTL eval
'length(mnesia:system_info(running_db_nodes)).')
+ rmq_running=$($RMQ_EVAL
'length(mnesia:system_info(running_db_nodes)).')
ocf_log debug "RabbitMQ thinks ${rmq_running} RabbitMQ nodes
are running"
if [ $(( $rmq_running * 2 )) -lt $pcs_running ]; then
@@ -294,7 +295,7 @@
rmq_is_clustered()
{
- $RMQ_CTL eval 'rabbit_mnesia:is_clustered().' | grep -q true
+ $RMQ_EVAL 'rabbit_mnesia:is_clustered().' | grep -q true
}
rmq_join_existing()
@@ -432,7 +433,7 @@
# Restore users, user permissions, and policies (if any)
BaseDataDir=`dirname $RMQ_DATA_DIR`
- $RMQ_CTL eval "
+ $RMQ_EVAL "
%% Run only if Mnesia is ready.
lists:any(fun({mnesia,_,_}) -> true; ({_,_,_}) -> false end,
application:which_applications()) andalso
begin
@@ -497,7 +498,7 @@
rmq_stop() {
# Backup users, user permissions, and policies
BaseDataDir=`dirname $RMQ_DATA_DIR`
- $RMQ_CTL eval "
+ $RMQ_EVAL "
%% Run only if Mnesia is still available.
lists:any(fun({mnesia,_,_}) -> true; ({_,_,_}) -> false end,
application:which_applications()) andalso
begin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/heartbeat/vdo-vol
new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/vdo-vol
--- old/resource-agents-4.2.0+git33.69a622fd/heartbeat/vdo-vol 1970-01-01
01:00:00.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/heartbeat/vdo-vol 2019-02-08
10:56:46.000000000 +0100
@@ -0,0 +1,234 @@
+#!/bin/sh
+#
+# License: GNU General Public License (GPL)
+# (c) 2018 O. Albrigtsen
+# and Linux-HA contributors
+#
+# -----------------------------------------------------------------------------
+# O C F R E S O U R C E S C R I P T S P E C I F I C A T I O N
+# -----------------------------------------------------------------------------
+#
+# NAME
+# vdo-vol : OCF resource agent script for VDO (Virtual Data Optimizer)
+#
+
+# Initialization:
+: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
+. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
+
+# Defaults
+OCF_RESKEY_volume_default=""
+
+: ${OCF_RESKEY_volume=${OCF_RESKEY_volume_default}}
+
+
+vdo_usage() {
+ cat <<END
+ usage: $0 (start|stop|validate-all|meta-data|help|usage|monitor)
+ $0 manages VDO (Virtual Data Optimizer) volume(s) as an OCF HA resource.
+ The 'start' operation starts the instance.
+ The 'stop' operation stops the instance.
+ The 'status' operation reports whether the instance is running
+ The 'monitor' operation reports whether the instance seems to be working
+ The 'validate-all' operation reports whether the parameters are valid
+END
+}
+
+vdo_meta_data() {
+ cat <<END
+<?xml version="1.0"?>
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
+<resource-agent name="vdo-vol">
+<version>0.75</version>
+
+<longdesc lang="en">
+OCF Resource script for VDO (Virtual Data Optimizer) volume(s). It manages VDO
volume(s) as a HA resource.
+
+The configuration file needs to be synced to all nodes, and the systemd vdo
service must be disabled when
+using this agent.
+</longdesc>
+<shortdesc lang="en">VDO resource agent</shortdesc>
+
+<parameters>
+
+<parameter name="config">
+ <longdesc lang="en">Configuration file</longdesc>
+ <shortdesc lang="en">Config file</shortdesc>
+ <content type="string" default="${OCF_RESKEY_config_default}" />
+</parameter>
+
+<parameter name="volume">
+ <longdesc lang="en">VDO Volume (leave empty for all)</longdesc>
+ <shortdesc lang="en">Volume (empty for all)</shortdesc>
+ <content type="string" default="${OCF_RESKEY_volume_default}" />
+</parameter>
+
+</parameters>
+
+<actions>
+<action name="start" timeout="60s" />
+<action name="stop" timeout="20s" />
+<action name="status" timeout="20s" />
+<action name="monitor" depth="0" timeout="20s" interval="10s"
start-delay="10s" />
+<action name="validate-all" timeout="20s" />
+<action name="meta-data" timeout="20s" />
+</actions>
+</resource-agent>
+END
+}
+
+
+rebuild() {
+ ocf_log warn "${OCF_RESKEY_volume} is in $MODE mode, starting
in rebuild mode"
+
+ vdo stop $OPTIONS
+
+ while vdo_monitor skiprocheck; do
+ sleep 1
+ done
+
+ vdo start $OPTIONS --forceRebuild
+
+ while ! vdo_monitor; do
+ sleep 1
+ done
+
+ return $?
+}
+
+vdo_start() {
+ # if resource is already running,no need to continue code after this.
+ if vdo_monitor; then
+ ocf_log info "VDO volume(s): ${OCF_RESKEY_volume} is already
active"
+ return $OCF_SUCCESS
+ fi
+
+ vdo activate $OPTIONS
+ vdo start $OPTIONS
+
+ while ! vdo_monitor skiprocheck; do
+ sleep 1
+ done
+
+ MODE=$(vdostats --verbose ${OCF_RESKEY_volume} | grep "operating mode"
| awk '{print $NF}')
+ if [ $(echo "$MODE" | grep -v "normal" | wc -l) -gt 0 ]; then
+ rebuild
+ fi
+
+ if [ $? -eq $OCF_SUCCESS ]; then
+ ocf_log info "VDO volume(s): ${OCF_RESKEY_volume} activated"
+ return ${OCF_SUCCESS}
+ fi
+
+ return $?
+}
+
+vdo_stop() {
+ vdo_monitor skiprocheck
+ if [ $? -ne $OCF_SUCCESS ]; then
+ # Currently not running. Nothing to do.
+ ocf_log info "VDO volume(s): ${OCF_RESKEY_volume} already
deactivated"
+
+ return $OCF_SUCCESS
+ fi
+
+ vdo stop $OPTIONS
+ vdo deactivate $OPTIONS
+
+ # Wait for process to stop
+ while vdo_monitor skiprocheck; do
+ sleep 1
+ done
+
+ return $OCF_SUCCESS
+}
+
+vdo_monitor(){
+ status=$(vdo status $OPTIONS 2>&1)
+ MODE=$(vdostats --verbose ${OCF_RESKEY_volume} | grep "operating mode"
| awk '{print $NF}')
+
+ case "$status" in
+ *"Device mapper status: not available"*)
+ return $OCF_NOT_RUNNING
+ ;;
+ *"Device mapper status: "*online*)
+ if [ "$MODE" = "read-only" ] && [ "$1" != "skiprocheck"
]; then
+ ocf_log err "VDO volume(s):
${OCF_RESKEY_volume} is in $MODE mode."
+ return $OCF_ERR_GENERIC
+ else
+ return $OCF_SUCCESS
+ fi
+ ;;
+ *)
+ ocf_log err "VDO volume(s): ${OCF_RESKEY_volume}
failed\n$status"
+ return $OCF_ERR_GENERIC;;
+ esac
+}
+
+vdo_validate_all(){
+ check_binary "vdo"
+
+ if systemctl is-enabled vdo > /dev/null 2>&1; then
+ ocf_exit_reason "systemd service vdo needs to be disabled"
+ exit $OCF_ERR_CONFIGURED
+ fi
+
+ if [ -n "${OCF_RESKEY_config}" ] && [ ! -f "${OCF_RESKEY_config}" ];
then
+ ocf_exit_reason "Configuration file: ${OCF_RESKEY_config} not
found"
+ exit $OCF_ERR_CONFIGURED
+ fi
+
+ return $OCF_SUCCESS
+}
+
+
+# **************************** MAIN SCRIPT ************************************
+
+# Make sure meta-data and usage always succeed
+case $__OCF_ACTION in
+ meta-data)
+ vdo_meta_data
+ exit $OCF_SUCCESS
+ ;;
+ usage|help)
+ vdo_usage
+ exit $OCF_SUCCESS
+ ;;
+esac
+
+# This OCF agent script need to be run as root user.
+if ! ocf_is_root; then
+ echo "$0 agent script need to be run as root user."
+ ocf_log debug "$0 agent script need to be run as root user."
+ exit $OCF_ERR_GENERIC
+fi
+
+if [ -z "${OCF_RESKEY_volume}" ]; then
+ OPTIONS="-a"
+else
+ OPTIONS="-n ${OCF_RESKEY_volume}"
+fi
+
+if [ -n "${OCF_RESKEY_config}" ]; then
+ OPTIONS="$OPTIONS -f ${OCF_RESKEY_config}"
+fi
+
+# Translate each action into the appropriate function call
+case $__OCF_ACTION in
+ start)
+ vdo_validate_all
+ vdo_start;;
+ stop)
+ vdo_stop;;
+ status|monitor)
+ vdo_monitor;;
+ validate-all)
+ ;;
+ *)
+ vdo_usage
+ exit $OCF_ERR_UNIMPLEMENTED;;
+esac
+
+exit $?
+
+# End of this script
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.2.0+git33.69a622fd/m4/ac_python_module.m4
new/resource-agents-4.2.0+git63.0f7987fb/m4/ac_python_module.m4
--- old/resource-agents-4.2.0+git33.69a622fd/m4/ac_python_module.m4
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-4.2.0+git63.0f7987fb/m4/ac_python_module.m4
2019-02-08 10:56:46.000000000 +0100
@@ -0,0 +1,30 @@
+dnl @synopsis AC_PYTHON_MODULE(modname[, fatal])
+dnl
+dnl Checks for Python module.
+dnl
+dnl If fatal is non-empty then absence of a module will trigger an
+dnl error.
+dnl
+dnl @category InstalledPackages
+dnl @author Andrew Collier <[email protected]>.
+dnl @version 2004-07-14
+dnl @license AllPermissive
+
+AC_DEFUN([AC_PYTHON_MODULE],[
+ AC_MSG_CHECKING(python module: $1)
+ $PYTHON -c "import $1" 2>/dev/null
+ if test $? -eq 0;
+ then
+ AC_MSG_RESULT(yes)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
+ else
+ AC_MSG_RESULT(no)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=no
+ #
+ if test -n "$2"
+ then
+ AC_MSG_ERROR(failed to find required module $1)
+ exit 1
+ fi
+ fi
+])