Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2014-12-08 16:56:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2014-10-17 08:50:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2014-12-08 16:56:01.000000000 +0100
@@ -1,0 +2,16 @@
+Fri Nov 21 11:30:30 UTC 2014 - kgronlund@suse.com
+
+- Update to upstream cs v3.9.5-631-g992ca06
+ - High: Introduces the docker agent to manage docker containers in an HA environment
+ - High: mysql: report error when validation fails during monitor yet pid is still active
+ - High: mysql-common: avoid use of check_binary in common validation function.
+ - Medium: ocf-shellfuncs: set HA_LOGD depending on HA_use_logd
+ - Low: VirtualDomain: downgrade error msg during probe
+ - Modified replication_user description: RELOAD privilege is required for RESET SLAVE or RESET SLAVE ALL command.
+ - lvm_by_vg.sh: Only strip tag on stop if we are owner
+ - Low: pgsql: PostgreSQL 9.3 compatibility for unix_socket_directories
+ - Medium: Xen: Use xl list $domain return code in status check (boo#901453)
+ - Medium: VirtualDomain: For Xen, prefer xl to xen-list (boo#901453)
+ - Low: mysql: document use of notify metadata attr for master/slave
+
+-------------------------------------------------------------------
Old:
----
resource-agents-3.9.5+git589.tar.xz
New:
----
resource-agents-3.9.5+git631.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.aZ2aun/_old 2014-12-08 16:56:02.000000000 +0100
+++ /var/tmp/diff_new_pack.aZ2aun/_new 2014-12-08 16:56:02.000000000 +0100
@@ -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.5+git589
+Version: 3.9.5+git631
Release: 0
Url: http://linux-ha.org/
Source: resource-agents-%{version}.tar.xz
++++++ resource-agents-3.9.5+git589.tar.xz -> resource-agents-3.9.5+git631.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/configure.ac new/resource-agents-3.9.5+git631/configure.ac
--- old/resource-agents-3.9.5+git589/configure.ac 2014-09-27 13:49:54.000000000 +0200
+++ new/resource-agents-3.9.5+git631/configure.ac 2014-11-18 16:34:51.000000000 +0100
@@ -911,7 +911,7 @@
AC_MSG_RESULT([])
AC_MSG_RESULT([$PACKAGE configuration:])
AC_MSG_RESULT([ Version = ${VERSION}])
-AC_MSG_RESULT([ Build Version = b644395182179ad500424dfbd648e2abd2c4ad69])
+AC_MSG_RESULT([ Build Version = 992ca067ffbe7a5fb3b882b6bb1e56f66251d732])
AC_MSG_RESULT([ Features =${PKG_FEATURES}])
AC_MSG_RESULT([])
AC_MSG_RESULT([ Prefix = ${prefix}])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/doc/man/Makefile.am new/resource-agents-3.9.5+git631/doc/man/Makefile.am
--- old/resource-agents-3.9.5+git589/doc/man/Makefile.am 2014-09-27 13:49:54.000000000 +0200
+++ new/resource-agents-3.9.5+git631/doc/man/Makefile.am 2014-11-18 16:34:51.000000000 +0100
@@ -98,6 +98,7 @@
ocf_heartbeat_conntrackd.7 \
ocf_heartbeat_db2.7 \
ocf_heartbeat_dhcpd.7 \
+ ocf_heartbeat_docker.7 \
ocf_heartbeat_eDir88.7 \
ocf_heartbeat_ethmonitor.7 \
ocf_heartbeat_exportfs.7 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/heartbeat/Makefile.am new/resource-agents-3.9.5+git631/heartbeat/Makefile.am
--- old/resource-agents-3.9.5+git589/heartbeat/Makefile.am 2014-09-27 13:49:54.000000000 +0200
+++ new/resource-agents-3.9.5+git631/heartbeat/Makefile.am 2014-11-18 16:34:51.000000000 +0100
@@ -67,6 +67,7 @@
dhcpd \
Delay \
dnsupdate \
+ docker \
eDir88 \
EvmsSCC \
Evmsd \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/heartbeat/VirtualDomain new/resource-agents-3.9.5+git631/heartbeat/VirtualDomain
--- old/resource-agents-3.9.5+git589/heartbeat/VirtualDomain 2014-09-27 13:49:54.000000000 +0200
+++ new/resource-agents-3.9.5+git631/heartbeat/VirtualDomain 2014-11-18 16:34:51.000000000 +0100
@@ -226,6 +226,12 @@
get_emulator()
{
local emulator=""
+ # An emulator is not required, so only report message in debug mode
+ local loglevel="debug"
+
+ if ocf_is_probe; then
+ loglevel="notice"
+ fi
emulator=$(virsh $VIRSH_OPTIONS dumpxml $DOMAIN_NAME 2>/dev/null | sed -n -e 's/^.*<emulator>\(.*\)<\/emulator>.*$/\1/p')
if [ -z "$emulator" ] && [ -a "$EMULATOR_STATE" ]; then
@@ -238,7 +244,7 @@
if [ -n "$emulator" ]; then
basename $emulator
else
- ocf_log error "Unable to determine emulator for $DOMAIN_NAME"
+ ocf_log $loglevel "Unable to determine emulator for $DOMAIN_NAME"
fi
}
@@ -276,11 +282,17 @@
# This can be expanded to check for additional emulators
*)
# We may be running xen with PV domains, they don't
- # have an emulator set. try xenstore-ls in this case
- if have_binary xenstore-ls; then
- xenstore-ls -f /vm | grep -E "/vm.*name = \"$DOMAIN_NAME\"" > /dev/null 2>&1
+ # have an emulator set. try xl list or xen-lists
+ if have_binary xl; then
+ xl list $DOMAIN_NAME >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ return $OCF_SUCCESS
+ fi
+ fi
+ if have_binary xen-list; then
+ xen-list $DOMAIN_NAME 2>/dev/null | grep -qs "State.*[-r][-b][-p]--" 2>/dev/null
if [ $? -eq 0 ]; then
- rc=$OCF_SUCCESS
+ return $OCF_SUCCESS
fi
fi
;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/heartbeat/Xen new/resource-agents-3.9.5+git631/heartbeat/Xen
--- old/resource-agents-3.9.5+git589/heartbeat/Xen 2014-09-27 13:49:54.000000000 +0200
+++ new/resource-agents-3.9.5+git631/heartbeat/Xen 2014-11-18 16:34:51.000000000 +0100
@@ -33,9 +33,9 @@
#######################################################################
usage() {
- cat <<-END
+ cat <<-END
usage: $0 {start|stop|status|monitor|meta-data|validate-all}
- END
+END
}
@@ -57,7 +57,7 @@
<longdesc lang="en">
Resource Agent for the Xen Hypervisor.
Manages Xen virtual machine instances by mapping cluster resource
-start and stop, to Xen create and shutdown, respectively.
+start and stop, to Xen create and shutdown, respectively.
A note on names
@@ -181,42 +181,41 @@
}
Xen_Status() {
- if have_binary xen-list; then
- xen-list $1 2>/dev/null | grep -qs "State.*[-r][-b][-p]--" 2>/dev/null
- if [ $? -ne 0 ]; then
- return $OCF_NOT_RUNNING
- else
- return $OCF_SUCCESS
- fi
- fi
- if have_binary xenstore-ls; then
- xenstore-ls -f /vm | grep -E "/vm.*name = \"$1\"" > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- return $OCF_NOT_RUNNING
- else
- return $OCF_SUCCESS
- fi
- fi
- STATUS=`$xentool list --long $1 2>/dev/null | grep status 2>/dev/null`
- if [ "X${STATUS}" != "X" ]; then
- # we have Xen 3.0.4 or higher
- STATUS_NOSPACES=`echo "$STATUS" | awk '{ print $1,$2}'`
- if [ "$STATUS_NOSPACES" = "(status 2)" -o "$STATUS_NOSPACES" = "(status 1)" ]; then
- return $OCF_SUCCESS
- else
- return $OCF_NOT_RUNNING
- fi
- else
- # we have Xen 3.0.3 or lower
- STATUS=`$xentool list --long $1 2>/dev/null | grep state 2>/dev/null`
- echo "${STATUS}" | grep -qs "[-r][-b][-p]---"
- if [ $? -ne 0 ]; then
- return $OCF_NOT_RUNNING
- else
- return $OCF_SUCCESS
- fi
-
- fi
+ if expr "x$xentool" : "x.*xl" >/dev/null; then
+ $xentool list $1 >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ return $OCF_NOT_RUNNING
+ else
+ return $OCF_SUCCESS
+ fi
+ fi
+ if have_binary xen-list; then
+ xen-list $1 2>/dev/null | grep -qs "State.*[-r][-b][-p]--" 2>/dev/null
+ if [ $? -ne 0 ]; then
+ return $OCF_NOT_RUNNING
+ else
+ return $OCF_SUCCESS
+ fi
+ fi
+ STATUS=`$xentool list --long $1 2>/dev/null | grep status 2>/dev/null`
+ if [ "X${STATUS}" != "X" ]; then
+ # we have Xen 3.0.4 or higher
+ STATUS_NOSPACES=`echo "$STATUS" | awk '{ print $1,$2}'`
+ if [ "$STATUS_NOSPACES" = "(status 2)" -o "$STATUS_NOSPACES" = "(status 1)" ]; then
+ return $OCF_SUCCESS
+ else
+ return $OCF_NOT_RUNNING
+ fi
+ else
+ # we have Xen 3.0.3 or lower
+ STATUS=`$xentool list --long $1 2>/dev/null | grep state 2>/dev/null`
+ echo "${STATUS}" | grep -qs "[-r][-b][-p]---"
+ if [ $? -ne 0 ]; then
+ return $OCF_NOT_RUNNING
+ else
+ return $OCF_SUCCESS
+ fi
+ fi
}
# If the guest is rebooting, it may completely disappear from the
@@ -226,47 +225,47 @@
# If a status returns not running, then test status
# again for 5 times (perhaps it'll show up)
Xen_Status_with_Retry() {
- local rc cnt=5
+ local rc cnt=5
- Xen_Status $1
- rc=$?
- while [ $rc -eq $OCF_NOT_RUNNING -a $cnt -gt 0 ]; do
- case "$__OCF_ACTION" in
- stop)
- ocf_log debug "domain $1 reported as not running, waiting $cnt seconds ..."
- ;;
- monitor)
- ocf_log warn "domain $1 reported as not running, but it is expected to be running! Retrying for $cnt seconds ..."
- ;;
- *) : not reachable
- ;;
- esac
- sleep 1
Xen_Status $1
rc=$?
- let cnt=$((cnt-1))
- done
- return $rc
+ while [ $rc -eq $OCF_NOT_RUNNING -a $cnt -gt 0 ]; do
+ case "$__OCF_ACTION" in
+ stop)
+ ocf_log debug "domain $1 reported as not running, waiting $cnt seconds ..."
+ ;;
+ monitor)
+ ocf_log warn "domain $1 reported as not running, but it is expected to be running! Retrying for $cnt seconds ..."
+ ;;
+ *) : not reachable
+ ;;
+ esac
+ sleep 1
+ Xen_Status $1
+ rc=$?
+ let cnt=$((cnt-1))
+ done
+ return $rc
}
Xen_Adjust_Memory() {
- if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
- CNTNEW=$1
- RUNNING=`Xen_List_running`
- RUNCNT=`Xen_Count_running`
- MAXMEM=`Xen_Total_Memory`
- if [ ${RUNCNT} -eq 0 -a ${CNTNEW} -eq 0 ]; then
- RUNCNT=1
- fi
- #NEWMEM=`echo "(${MAXMEM}-${OCF_RESKEY_reserved_Dom0_memory})/(${RUNCNT}+${CNTNEW})"|bc`
- NEWMEM=$(( (${MAXMEM} - ${OCF_RESKEY_reserved_Dom0_memory}) / (${RUNCNT} + ${CNTNEW} ) ))
- # do not rely on ballooning add dom0_mem=512 instead to force memory for dom0
- #$xentool mem-set Domain-0 ${OCF_RESKEY_reserved_Dom0_memory}
- for DOM in ${RUNNING}; do
- $xentool mem-set ${DOM} ${NEWMEM}
- done
- ocf_log info "Adjusted memory to: $NEWMEM, for the following $RUNCNT domains: $RUNNING"
- fi
+ if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
+ CNTNEW=$1
+ RUNNING=`Xen_List_running`
+ RUNCNT=`Xen_Count_running`
+ MAXMEM=`Xen_Total_Memory`
+ if [ ${RUNCNT} -eq 0 -a ${CNTNEW} -eq 0 ]; then
+ RUNCNT=1
+ fi
+ #NEWMEM=`echo "(${MAXMEM}-${OCF_RESKEY_reserved_Dom0_memory})/(${RUNCNT}+${CNTNEW})"|bc`
+ NEWMEM=$(( (${MAXMEM} - ${OCF_RESKEY_reserved_Dom0_memory}) / (${RUNCNT} + ${CNTNEW} ) ))
+ # do not rely on ballooning add dom0_mem=512 instead to force memory for dom0
+ #$xentool mem-set Domain-0 ${OCF_RESKEY_reserved_Dom0_memory}
+ for DOM in ${RUNNING}; do
+ $xentool mem-set ${DOM} ${NEWMEM}
+ done
+ ocf_log info "Adjusted memory to: $NEWMEM, for the following $RUNCNT domains: $RUNNING"
+ fi
}
Xen_List_all() {
@@ -285,26 +284,26 @@
}
Xen_Monitor() {
- if ocf_is_probe; then
- Xen_Status ${DOMAIN_NAME}
- else
- Xen_Status_with_Retry ${DOMAIN_NAME}
- fi
- if [ $? -eq ${OCF_NOT_RUNNING} ]; then
- ocf_is_probe ||
- ocf_log err "Xen domain $DOMAIN_NAME stopped"
- return ${OCF_NOT_RUNNING}
- fi
- if [ "X${OCF_RESKEY_monitor_scripts}" = "X" ]; then
- return ${OCF_SUCCESS}
- fi
- for SCRIPT in ${OCF_RESKEY_monitor_scripts}; do
- $SCRIPT
- if [ $? -ne 0 ]; then
- return ${OCF_ERR_GENERIC}
+ if ocf_is_probe; then
+ Xen_Status ${DOMAIN_NAME}
+ else
+ Xen_Status_with_Retry ${DOMAIN_NAME}
fi
- done
- return ${OCF_SUCCESS}
+ if [ $? -eq ${OCF_NOT_RUNNING} ]; then
+ ocf_is_probe ||
+ ocf_log err "Xen domain $DOMAIN_NAME stopped"
+ return ${OCF_NOT_RUNNING}
+ fi
+ if [ "X${OCF_RESKEY_monitor_scripts}" = "X" ]; then
+ return ${OCF_SUCCESS}
+ fi
+ for SCRIPT in ${OCF_RESKEY_monitor_scripts}; do
+ $SCRIPT
+ if [ $? -ne 0 ]; then
+ return ${OCF_ERR_GENERIC}
+ fi
+ done
+ return ${OCF_SUCCESS}
}
Xen_Total_Memory() {
@@ -312,181 +311,183 @@
}
Xen_Start() {
- if Xen_Status ${DOMAIN_NAME}; then
- ocf_log info "Xen domain $DOMAIN_NAME already running."
- return $OCF_SUCCESS
- fi
-
- if [ ! -f "${OCF_RESKEY_xmfile}" ]; then
- ocf_log err "Config file ${OCF_RESKEY_xmfile} for $DOMAIN_NAME does not exist."
- return $OCF_ERR_INSTALLED
- fi
-
- if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
- Xen_Adjust_Memory 1
- ocf_log info "New memory for virtual domains: ${NEWMEM}"
- sed -i -e "/^memory=/ s/^memory=.*/memory=${NEWMEM}/" ${OCF_RESKEY_xmfile}
- $xentool mem-set ${DOMAIN_NAME} ${NEWMEM}
- fi
-
- $xentool create ${OCF_RESKEY_xmfile} name=\"$DOMAIN_NAME\"
- rc=$?
- if [ $rc -ne 0 ]; then
- return $OCF_ERR_GENERIC
- else
- if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
- $xentool mem-set ${DOMAIN_NAME} ${NEWMEM}
- fi
- fi
- while sleep 1; do
- Xen_Monitor && return $OCF_SUCCESS
- done
+ if Xen_Status ${DOMAIN_NAME}; then
+ ocf_log info "Xen domain $DOMAIN_NAME already running."
+ return $OCF_SUCCESS
+ fi
+
+ if [ ! -f "${OCF_RESKEY_xmfile}" ]; then
+ ocf_log err "Config file ${OCF_RESKEY_xmfile} for $DOMAIN_NAME does not exist."
+ return $OCF_ERR_INSTALLED
+ fi
+
+ if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
+ Xen_Adjust_Memory 1
+ ocf_log info "New memory for virtual domains: ${NEWMEM}"
+ sed -i -e "/^memory=/ s/^memory=.*/memory=${NEWMEM}/" ${OCF_RESKEY_xmfile}
+ $xentool mem-set ${DOMAIN_NAME} ${NEWMEM}
+ fi
+
+ $xentool create ${OCF_RESKEY_xmfile} name=\"$DOMAIN_NAME\"
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ return $OCF_ERR_GENERIC
+ else
+ if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
+ $xentool mem-set ${DOMAIN_NAME} ${NEWMEM}
+ fi
+ fi
+ while sleep 1; do
+ Xen_Monitor && return $OCF_SUCCESS
+ done
}
xen_domain_stop() {
- local dom=$1
- local timeout
+ local dom=$1
+ local timeout
- if [ -n "$OCF_RESKEY_shutdown_timeout" ]; then
- timeout=$OCF_RESKEY_shutdown_timeout
- elif [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then
- # Allow 2/3 of the action timeout for the orderly shutdown
- # (The origin unit is ms, hence the conversion)
- timeout=$((OCF_RESKEY_CRM_meta_timeout/1500))
- else
- timeout=60
- fi
-
- if [ "$timeout" -gt 0 ]; then
- ocf_log info "Xen domain $dom will be stopped (timeout: ${timeout}s)"
- if ocf_is_true "${OCF_RESKEY_shutdown_acpi}"; then
- $xentool trigger $dom power
- else
- $xentool shutdown $dom
- fi
-
- while Xen_Status $dom && [ "$timeout" -gt 0 ]; do
- ocf_log debug "$dom still not stopped. Waiting..."
- timeout=$((timeout-1))
- sleep 1
- done
- fi
-
- if [ "$timeout" -eq 0 ]; then
- while Xen_Status $dom; do
- ocf_log warn "Xen domain $dom will be destroyed!"
- $xenkill $dom
- sleep 1
- done
- # Note: This does not give up. stop isn't allowed to to fail.
- # If $xentool destroy fails, stop will eventually timeout.
- # This is the correct behaviour.
- fi
+ if [ -n "$OCF_RESKEY_shutdown_timeout" ]; then
+ timeout=$OCF_RESKEY_shutdown_timeout
+ elif [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then
+ # Allow 2/3 of the action timeout for the orderly shutdown
+ # (The origin unit is ms, hence the conversion)
+ timeout=$((OCF_RESKEY_CRM_meta_timeout/1500))
+ else
+ timeout=60
+ fi
- ocf_log info "Xen domain $dom stopped."
+ if [ "$timeout" -gt 0 ]; then
+ ocf_log info "Xen domain $dom will be stopped (timeout: ${timeout}s)"
+ if ocf_is_true "${OCF_RESKEY_shutdown_acpi}"; then
+ $xentool trigger $dom power
+ else
+ $xentool shutdown $dom
+ fi
+
+ while Xen_Status $dom && [ "$timeout" -gt 0 ]; do
+ ocf_log debug "$dom still not stopped. Waiting..."
+ timeout=$((timeout-1))
+ sleep 1
+ done
+ fi
+
+ if [ "$timeout" -eq 0 ]; then
+ while Xen_Status $dom; do
+ ocf_log warn "Xen domain $dom will be destroyed!"
+ $xenkill $dom
+ sleep 1
+ done
+ # Note: This does not give up. stop isn't allowed to to fail.
+ # If $xentool destroy fails, stop will eventually timeout.
+ # This is the correct behaviour.
+ fi
+
+ ocf_log info "Xen domain $dom stopped."
}
Xen_Stop() {
- local vm
- if Xen_Status_with_Retry ${DOMAIN_NAME}; then
- vm=${DOMAIN_NAME}
- elif Xen_Status migrating-${DOMAIN_NAME}; then
- ocf_log info "Xen domain $DOMAIN_NAME is migrating"
- vm="migrating-${DOMAIN_NAME}"
- else
- ocf_log info "Xen domain $DOMAIN_NAME already stopped."
- fi
-
- if [ "$vm" ]; then
- xen_domain_stop $vm
- else
- # It is supposed to be gone, but there have been situations where
- # $xentool list / xen-list showed it as stopped but it was still
- # instantiated. Nuke it once more to make sure:
- $xenkill ${DOMAIN_NAME}
- fi
+ local vm
+ if Xen_Status_with_Retry ${DOMAIN_NAME}; then
+ vm=${DOMAIN_NAME}
+ elif Xen_Status migrating-${DOMAIN_NAME}; then
+ ocf_log info "Xen domain $DOMAIN_NAME is migrating"
+ vm="migrating-${DOMAIN_NAME}"
+ else
+ ocf_log info "Xen domain $DOMAIN_NAME already stopped."
+ fi
+
+ if [ "$vm" ]; then
+ xen_domain_stop $vm
+ else
+ # It is supposed to be gone, but there have been situations where
+ # $xentool list / xen-list showed it as stopped but it was still
+ # instantiated. Nuke it once more to make sure:
+ $xenkill ${DOMAIN_NAME}
+ fi
- Xen_Adjust_Memory 0
- return $OCF_SUCCESS
+ Xen_Adjust_Memory 0
+ return $OCF_SUCCESS
}
Xen_Migrate_To() {
- target_node="$OCF_RESKEY_CRM_meta_migrate_target"
- target_attr="$OCF_RESKEY_node_ip_attribute"
- target_addr="$target_node"
-
- if Xen_Status ${DOMAIN_NAME}; then
- ocf_log info "$DOMAIN_NAME: Starting $xentool migrate to $target_node"
-
- if [ -n "$target_attr" ]; then
- nodevalue=`crm_attribute --type nodes --node-uname $target_node --attr-name $target_attr --get-value -q`
- if [ -n "${nodevalue}" -a "${nodevalue}" != "(null)" ]; then
- target_addr="$nodevalue"
- ocf_log info "$DOMAIN_NAME: $target_node is using address $target_addr"
- fi
- fi
-
- if [[ "$xentool" == *xm ]]; then
- $xentool migrate --live $DOMAIN_NAME $target_addr
- else
- $xentool migrate $DOMAIN_NAME $target_addr
- fi
- rc=$?
- if [ $rc -ne 0 ]; then
- ocf_log err "$DOMAIN_NAME: $xentool migrate to $target_node failed: $rc"
- return $OCF_ERR_GENERIC
- else
- Xen_Adjust_Memory 0
- ocf_log info "$DOMAIN_NAME: $xentool migrate to $target_node succeeded."
- return $OCF_SUCCESS
- fi
- else
- ocf_log err "$DOMAIN_NAME: migrate_to: Not active locally!"
- return $OCF_ERR_GENERIC
- fi
+ target_node="$OCF_RESKEY_CRM_meta_migrate_target"
+ target_attr="$OCF_RESKEY_node_ip_attribute"
+ target_addr="$target_node"
+
+ if Xen_Status ${DOMAIN_NAME}; then
+ ocf_log info "$DOMAIN_NAME: Starting $xentool migrate to $target_node"
+
+ if [ -n "$target_attr" ]; then
+ nodevalue=`crm_attribute --type nodes --node-uname $target_node --attr-name $target_attr --get-value -q`
+ if [ -n "${nodevalue}" -a "${nodevalue}" != "(null)" ]; then
+ target_addr="$nodevalue"
+ ocf_log info "$DOMAIN_NAME: $target_node is using address $target_addr"
+ fi
+ fi
+
+ if expr "x$xentool" : "x.*xm" >/dev/null; then
+ $xentool migrate --live $DOMAIN_NAME $target_addr
+ else
+ $xentool migrate $DOMAIN_NAME $target_addr
+ fi
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ ocf_log err "$DOMAIN_NAME: $xentool migrate to $target_node failed: $rc"
+ return $OCF_ERR_GENERIC
+ else
+ Xen_Adjust_Memory 0
+ ocf_log info "$DOMAIN_NAME: $xentool migrate to $target_node succeeded."
+ return $OCF_SUCCESS
+ fi
+ else
+ ocf_log err "$DOMAIN_NAME: migrate_to: Not active locally!"
+ return $OCF_ERR_GENERIC
+ fi
}
Xen_Migrate_From() {
- if [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then
- # Allow 2/3 of the action timeout for status to stabilize
- # (The origin unit is ms, hence the conversion)
- timeout=$((OCF_RESKEY_CRM_meta_timeout/1500))
- else
- timeout=10 # should be plenty
- fi
-
- while ! Xen_Status ${DOMAIN_NAME} && [ $timeout -gt 0 ]; do
- ocf_log debug "$DOMAIN_NAME: Not yet active locally, waiting (timeout: ${timeout}s)"
- timeout=$((timeout-1))
- sleep 1
- done
-
- if Xen_Status ${DOMAIN_NAME}; then
- Xen_Adjust_Memory 0
- ocf_log info "$DOMAIN_NAME: Active locally, migration successful"
- return $OCF_SUCCESS
- else
- ocf_log err "$DOMAIN_NAME: Not active locally, migration failed!"
- return $OCF_ERR_GENERIC
- fi
+ if [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then
+ # Allow 2/3 of the action timeout for status to stabilize
+ # (The origin unit is ms, hence the conversion)
+ timeout=$((OCF_RESKEY_CRM_meta_timeout/1500))
+ else
+ timeout=10 # should be plenty
+ fi
+
+ while ! Xen_Status ${DOMAIN_NAME} && [ $timeout -gt 0 ]; do
+ ocf_log debug "$DOMAIN_NAME: Not yet active locally, waiting (timeout: ${timeout}s)"
+ timeout=$((timeout-1))
+ sleep 1
+ done
+
+ if Xen_Status ${DOMAIN_NAME}; then
+ Xen_Adjust_Memory 0
+ ocf_log info "$DOMAIN_NAME: Active locally, migration successful"
+ return $OCF_SUCCESS
+ else
+ ocf_log err "$DOMAIN_NAME: Not active locally, migration failed!"
+ return $OCF_ERR_GENERIC
+ fi
}
Xen_Validate_All() {
- return $OCF_SUCCESS
+ return $OCF_SUCCESS
}
if [ $# -ne 1 ]; then
- usage
- exit $OCF_ERR_ARGS
+ usage
+ exit $OCF_ERR_ARGS
fi
case $1 in
- meta-data) meta_data
- exit $OCF_SUCCESS
- ;;
- usage) usage
- exit $OCF_SUCCESS
- ;;
+ meta-data)
+ meta_data
+ exit $OCF_SUCCESS
+ ;;
+ usage)
+ usage
+ exit $OCF_SUCCESS
+ ;;
esac
# the name business:
@@ -509,13 +510,13 @@
fi
for binary in sed awk; do
- check_binary $binary
+ check_binary $binary
done
if have_binary xen-destroy ; then
- xenkill="xen-destroy"
+ xenkill="xen-destroy"
else
- xenkill="$xentool destroy"
+ xenkill="$xentool destroy"
fi
if [ -n "$OCF_RESKEY_shutdown_timeout" ]; then
@@ -526,23 +527,31 @@
fi
case $1 in
- start) Xen_Start
- ;;
- stop) Xen_Stop
- ;;
- migrate_to) Xen_Migrate_To
- ;;
- migrate_from) Xen_Migrate_From
- ;;
- monitor) Xen_Monitor
- ;;
- status) Xen_Status ${DOMAIN_NAME}
- ;;
- validate-all) Xen_Validate_All
- ;;
- *) usage
- exit $OCF_ERR_UNIMPLEMENTED
- ;;
+ start)
+ Xen_Start
+ ;;
+ stop)
+ Xen_Stop
+ ;;
+ migrate_to)
+ Xen_Migrate_To
+ ;;
+ migrate_from)
+ Xen_Migrate_From
+ ;;
+ monitor)
+ Xen_Monitor
+ ;;
+ status)
+ Xen_Status ${DOMAIN_NAME}
+ ;;
+ validate-all)
+ Xen_Validate_All
+ ;;
+ *)
+ usage
+ exit $OCF_ERR_UNIMPLEMENTED
+ ;;
esac
exit $?
# vim:sw=2:ts=4:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/heartbeat/dhcpd new/resource-agents-3.9.5+git631/heartbeat/dhcpd
--- old/resource-agents-3.9.5+git589/heartbeat/dhcpd 2014-09-27 13:49:54.000000000 +0200
+++ new/resource-agents-3.9.5+git631/heartbeat/dhcpd 2014-11-18 16:34:51.000000000 +0100
@@ -64,6 +64,7 @@
The 'start' operation starts the dhcpd server.
The 'stop' operation stops the dhcpd server.
+ The 'restart' operation restarts the dhcpd server.
The 'monitor' operation reports whether the dhcpd service is running.
The 'validate-all' operation reports whether the parameters are valid.
EOF
@@ -171,6 +172,7 @@
<actions>
<action name="start" timeout="20" />
<action name="stop" timeout="20" />
+ <action name="restart" timeout="20" />
<action name="monitor" timeout="20" interval="10" depth="0" />
<action name="meta-data" timeout="5" />
<action name="validate-all" timeout="20" />
@@ -538,6 +540,9 @@
case $__OCF_ACTION in
start) dhcpd_start;;
stop) dhcpd_stop;;
+restart) dhcpd_stop
+ dhcpd_start
+ ;;
monitor) dhcpd_monitor;;
*) dhcpd_usage
exit $OCF_ERR_UNIMPLEMENTED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git589/heartbeat/docker new/resource-agents-3.9.5+git631/heartbeat/docker
--- old/resource-agents-3.9.5+git589/heartbeat/docker 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-3.9.5+git631/heartbeat/docker 2014-11-18 16:34:51.000000000 +0100
@@ -0,0 +1,425 @@
+#!/bin/sh
+#
+# The docker HA resource agent creates and launches a docker container
+# based off a supplied docker image. Containers managed by this agent
+# are both created and removed upon the agent's start and stop actions.
+#
+# Copyright (c) 2014 David Vossel