Hello community, here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2016-03-26 15:20:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2016-02-25 21:55:01.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2016-03-26 15:20:31.000000000 +0100 @@ -1,0 +2,15 @@ +Mon Mar 21 09:03:00 UTC 2016 - kgronl...@suse.com + +- Update to version 3.9.7+git.1458512170.48350a9: + + High: SAPDatabase: Add support for Oracle 12c (bsc#967380) + + High: sapdb.sh evaluate parameter DBOSUSER also in start and stop methods (bsc#971914) + + Low: SAPInstance: Update version support statement (bsc#965872) + + Low: apache: ensure readable $TESTCONFFILE + + Added iSER enabled portal support + + quote vgchange options + + Added pgagent RA + + galera: fix monitoring of joining node for long running SST + + galera: don't bootstrap from a node with no grastate.dat when possible + + oralsnr: fix status check fail when username is more than 8 characters long + +------------------------------------------------------------------- Old: ---- resource-agents-3.9.7+git.1454950092.6f56933.tar.xz New: ---- resource-agents-3.9.7+git.1458512170.48350a9.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ resource-agents.spec ++++++ --- /var/tmp/diff_new_pack.obx63P/_old 2016-03-26 15:20:32.000000000 +0100 +++ /var/tmp/diff_new_pack.obx63P/_new 2016-03-26 15:20:32.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.7+git.1454950092.6f56933 +Version: 3.9.7+git.1458512170.48350a9 Release: 0 Url: http://linux-ha.org/ Source: resource-agents-%{version}.tar.xz ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.obx63P/_old 2016-03-26 15:20:32.000000000 +0100 +++ /var/tmp/diff_new_pack.obx63P/_new 2016-03-26 15:20:32.000000000 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/ClusterLabs/resource-agents.git</param> - <param name="changesrevision">6f56933a82f32b19b116ea1c16d0e59f07ae959c</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">48350a981b242dd91e27bb1b49a887e3e6cb0440</param></service></servicedata> \ No newline at end of file ++++++ resource-agents-3.9.7+git.1454950092.6f56933.tar.xz -> resource-agents-3.9.7+git.1458512170.48350a9.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/.travis.yml new/resource-agents-3.9.7+git.1458512170.48350a9/.travis.yml --- old/resource-agents-3.9.7+git.1454950092.6f56933/.travis.yml 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/.travis.yml 2016-03-21 10:02:59.000000000 +0100 @@ -1,8 +1,13 @@ language: bash -install: - - ./ci/install.sh +sudo: false + +addons: + apt: + sources: + - debian-sid + packages: + - shellcheck script: - ./ci/build.sh notifications: email: false -sudo: required diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/ci/build.sh new/resource-agents-3.9.7+git.1458512170.48350a9/ci/build.sh --- old/resource-agents-3.9.7+git.1454950092.6f56933/ci/build.sh 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/ci/build.sh 2016-03-21 10:02:59.000000000 +0100 @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -o pipefail [[ "${DEBUG:-}" ]] && set -x declare -i failed @@ -16,14 +16,17 @@ check() { local script="$1" - shellcheck "$script" || fail "$script" - success "$script" + if shellcheck "$script"; then + success "$script" + else + fail "$script" + fi } find_prunes() { local prunes="! -path './.git/*'" if [ -f .gitmodules ]; then - while read module; do + while read -r module; do prunes="$prunes ! -path './$module/*'" done < <(grep path .gitmodules | awk '{print $3}') fi @@ -31,15 +34,18 @@ } find_cmd() { - echo "find . -type f -and \( -perm +111 -or -name '*.sh' \) $(find_prunes)" + echo "find . -type f -and \( -perm /111 -or -name '*.sh' \) $(find_prunes)" } check_all_executables() { echo "Checking executables and .sh files..." - eval "$(find_cmd)" | while read script; do + while read -r script; do head=$(head -n1 "$script") + [[ "$head" =~ .*ruby.* ]] && continue + [[ "$head" =~ .*zsh.* ]] && continue + [[ "$head" =~ ^#compdef.* ]] && continue check "$script" - done + done < <(eval "$(find_cmd)") exit $failed } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/ci/install.sh new/resource-agents-3.9.7+git.1458512170.48350a9/ci/install.sh --- old/resource-agents-3.9.7+git.1454950092.6f56933/ci/install.sh 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/ci/install.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -#!/bin/bash -set -eo pipefail - -main() { - local filename="shellcheck_0.3.7-1_amd64.deb" - wget "http://ftp.debian.org/debian/pool/main/s/shellcheck/$filename" - sudo dpkg -i "$filename" -} - -main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/LVM new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/LVM --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/LVM 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/LVM 2016-03-21 10:02:59.000000000 +0100 @@ -386,7 +386,7 @@ ## retry_exclusive_start() { - local vgchange_options=$(get_activate_options) + local vgchange_options="$(get_activate_options)" # Deactivate each LV in the group one by one cluster wide set -- $(lvs -o name,attr --noheadings $OCF_RESKEY_volgrpname 2> /dev/null) @@ -412,7 +412,7 @@ # Enable LVM volume # LVM_start() { - local vgchange_options=$(get_activate_options) + local vgchange_options="$(get_activate_options)" local vg=$1 local clvmd=0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/README.galera new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/README.galera --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/README.galera 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/README.galera 2016-03-21 10:02:59.000000000 +0100 @@ -131,7 +131,7 @@ - Deleted: during recurring slave monitor in `check_sync_status()` as soon as the Galera code reports to be SYNC-ed. -### heuristic-recovered +### no-grastate If a galera node was unexpectedly killed in a middle of a replication, InnoDB can retain the equivalent of a XA transaction in prepared state @@ -139,11 +139,10 @@ automatically, and special recovery heuristic has to be used to unblock the node. -This attribute is used to keep track of forced recoveries to prevent -bootstrapping a cluster from a recovered node when possible. +This transient attribute is used to keep track of forced recoveries to +prevent bootstrapping a cluster from a recovered node when possible. - Used : during `detect_first_master()` to elect the bootstrap node - Created: in `detect_last_commit()` if the node has a pending XA transaction to recover in the redo log -- Deleted: when a node is promoted to Master. This attribute is - kept in the CIB if a node in stopped. +- Deleted: when a node is promoted to Master. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/SAPDatabase new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/SAPDatabase --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/SAPDatabase 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/SAPDatabase 2016-03-21 10:02:59.000000000 +0100 @@ -18,6 +18,7 @@ # OCF_RESKEY_DIR_EXECUTABLE (optional, well known directories will be searched by default) # OCF_RESKEY_DBTYPE (mandatory, one of the following values: ORA,ADA,DB6,SYB,HDB) # OCF_RESKEY_DBINSTANCE (optional, Database instance name, if not equal to SID) +# OCF_RESKEY_DBOSUSER (optional, the Linux user that owns the database processes on operating system level) # OCF_RESKEY_STRICT_MONITORING (optional, activate application level monitoring - with Oracle a failover will occur in case of an archiver stuck) # OCF_RESKEY_AUTOMATIC_RECOVER (optional, automatic startup recovery, default is false) # OCF_RESKEY_MONITOR_SERVICES (optional, default is to monitor all database services) @@ -69,7 +70,7 @@ <?xml version="1.0"?> <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> <resource-agent name="SAPDatabase"> -<version>2.06</version> +<version>2.14</version> <shortdesc lang="en">Manages a SAP database instance as an HA resource.</shortdesc> <longdesc lang="en"> @@ -115,6 +116,11 @@ <shortdesc lang="en">Database instance name, if not equal to SID</shortdesc> <content type="string" default="" /> </parameter> + <parameter name="DBOSUSER" unique="1" required="0"> + <longdesc lang="en">The parameter can be set, if the database processes on operating system level are not executed with the default user of the used database type. Defaults: ADA=taken from /etc/opt/sdb, DB6=db2SID, ORA=oraSID and oracle, SYB=sybSID, HDB=SIDadm</longdesc> + <shortdesc lang="en">the Linux user that owns the database processes on operating system level</shortdesc> + <content type="string" default="" /> + </parameter> <parameter name="NETSERVICENAME" unique="0" required="0"> <longdesc lang="en">Deprecated - do not use anymore. This parameter will be deleted in one of the next releases.</longdesc> <shortdesc lang="en">deprecated - do not use anymore</shortdesc> @@ -305,6 +311,10 @@ if saphostctrl_installed; then . ${OCF_FUNCTIONS_DIR}/sapdb.sh else + if [ -n "${OCF_RESKEY_DBOSUSER}" ]; then + ocf_exit_reason "Usage of parameter OCF_RESKEY_DBOSUSER is not possible without having SAP Host-Agent installed" + exit $OCF_ERR_ARGS + fi . ${OCF_FUNCTIONS_DIR}/sapdb-nosha.sh fi sapdatabase_init diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/SAPInstance new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/SAPInstance --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/SAPInstance 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/SAPInstance 2016-03-21 10:02:59.000000000 +0100 @@ -78,10 +78,11 @@ <longdesc lang="en"> Usually a SAP system consists of one database and at least one or more SAP instances (sometimes called application servers). One SAP Instance is defined by having exactly one instance profile. The instance profiles can usually be found in the directory /sapmnt/SID/profile. Each instance must be configured as it's own resource in the cluster configuration. The resource agent supports the following SAP versions: -- SAP WebAS ABAP Release 6.20 - 7.30 -- SAP WebAS Java Release 6.40 - 7.30 -- SAP WebAS ABAP + Java Add-In Release 6.20 - 7.30 (Java is not monitored by the cluster in that case) +- SAP WebAS ABAP Release 6.20 - 7.40 +- SAP WebAS Java Release 6.40 - 7.40 +- SAP WebAS ABAP + Java Add-In Release 6.20 - 7.40 (Java is not monitored by the cluster in that case) When using a SAP Kernel 6.40 please check and implement the actions from the section "Manual postprocessing" from SAP note 995116 (http://sdn.sap.com). +Other versions may also work with this agent, but have not been verified. All operations of the SAPInstance resource agent are done by using the startup framework called SAP Management Console or sapstartsrv that was introduced with SAP kernel release 6.40. Find more information about the SAP Management Console in SAP note 1014480. Using this framework defines a clear interface for the Heartbeat cluster, how it sees the SAP system. The options for monitoring the SAP system are also much better than other methods like just watching the ps command for running processes or doing some pings to the application. sapstartsrv uses SOAP messages to request the status of running SAP processes. Therefore it can actually ask a process itself what it's status is, independent from other problems that might exist at the same time. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/apache new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/apache --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/apache 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/apache 2016-03-21 10:02:59.000000000 +0100 @@ -65,6 +65,7 @@ DEFAULT_IBMCONFIG=/opt/IBMHTTPServer/conf/httpd.conf DEFAULT_SUSECONFIG="/etc/apache2/httpd.conf" DEFAULT_RHELCONFIG="/etc/httpd/conf/httpd.conf" +DEFAULT_DEBIANCONFIG="/etc/apache2/apache2.conf" # # You can also set # HTTPD @@ -144,6 +145,8 @@ validate_default_config() { if [ -e /etc/SuSE-release ]; then validate_default_suse_config + elif [ -e /etc/debian_version ]; then + validate_default_debian_config else return 0 fi @@ -173,6 +176,24 @@ return 0 } +# Debian's Default configuration uses a lock directory /var/lock/apache2 +# which is only generated using the lsb init script issues configtest. To +# ensure these default directories are present it's useful to run a configtest +# prior to the resource startup which will create the needed directories +# +# To support multiple apache instances the debian scripts and configs +# obey apache2/envvars. (copy /etc/apache2 -> /etc/apache2-instance) +# adjust (SUFFIX) envvars and set OCF_RESKEY_envfiles +validate_default_debian_config() { + if find /etc/apache2* -name apache2.conf | grep -q "$CONFIGFILE" + then + export APACHE_CONFDIR=$(dirname $CONFIGFILE) + [ -x "/usr/sbin/a2enmod" ] && ocf_run -q /usr/sbin/a2enmod status + ocf_run -q /usr/sbin/apache2ctl configtest || return 1 + fi + return 0 +} + apache_start() { if silent_status @@ -182,8 +203,6 @@ fi validate_default_config || return $OCF_ERR_CONFIGURED - # https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/603211 - [ -d /var/run/apache2 ] || mkdir /var/run/apache2 if [ -z $PIDFILE_DIRECTIVE ]; then ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE @@ -302,7 +321,7 @@ } apache_monitor_10() { - if [ "$TESTCONFFILE" ]; then + if [ -f "$TESTCONFFILE" ] && [ -r "$TESTCONFFILE" ]; then readtestconf < $TESTCONFFILE else test_url="$TESTURL" @@ -397,6 +416,8 @@ { if [ -f $DEFAULT_SUSECONFIG ]; then echo $DEFAULT_SUSECONFIG + elif [ -f $DEFAULT_DEBIANCONFIG ]; then + echo $DEFAULT_DEBIANCONFIG else echo $DEFAULT_RHELCONFIG fi @@ -593,6 +614,27 @@ ocf_exit_reason "Configuration file $CONFIGFILE not found!" return $OCF_ERR_INSTALLED fi + + # validate testconffile/testurl before apache_monitor_10() + if [ -n "$TESTCONFFILE" ]; then + if [ ! -f "$TESTCONFFILE" ] || [ ! -r "$TESTCONFFILE" ]; then + ocf_exit_reason "Configuration file $TESTCONFFILE not found, or not readable." + return $OCF_ERR_INSTALLED + fi + else + if [ -n "$TESTURL" ]; then + # remove leading or trailing spaces/tabs + local temp=$(printf "$TESTURL" | sed -e 's/^[ \t]*//g' -e 's/[ \t]*$//g') + + if [ -z "$temp" ]; then + ocf_exit_reason "testurl: \"$TESTURL\" seems to be an empty string?" + return $OCF_ERR_CONFIGURED + fi + fi + + # FIXME: validate TESTREGEX10 will be needed if empty regex is not allow. + 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.7+git.1454950092.6f56933/heartbeat/galera new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/galera --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/galera 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/galera 2016-03-21 10:02:59.000000000 +0100 @@ -279,20 +279,20 @@ } -set_heuristic_recovered() +set_no_grastate() { - ${HA_SBIN_DIR}/crm_attribute -N $NODENAME -l reboot --name "${INSTANCE_ATTR_NAME}-heuristic-recovered" -v "true" + ${HA_SBIN_DIR}/crm_attribute -N $NODENAME -l reboot --name "${INSTANCE_ATTR_NAME}-no-grastate" -v "true" } -clear_heuristic_recovered() +clear_no_grastate() { - ${HA_SBIN_DIR}/crm_attribute -N $NODENAME -l reboot --name "${INSTANCE_ATTR_NAME}-heuristic-recovered" -D + ${HA_SBIN_DIR}/crm_attribute -N $NODENAME -l reboot --name "${INSTANCE_ATTR_NAME}-no-grastate" -D } -is_heuristic_recovered() +is_no_grastate() { local node=$1 - ${HA_SBIN_DIR}/crm_attribute -N $node -l reboot --name "${INSTANCE_ATTR_NAME}-heuristic-recovered" -Q 2>/dev/null + ${HA_SBIN_DIR}/crm_attribute -N $node -l reboot --name "${INSTANCE_ATTR_NAME}-no-grastate" -Q 2>/dev/null } clear_last_commit() @@ -343,26 +343,39 @@ ${HA_SBIN_DIR}/crm_attribute -N $NODENAME -l reboot --name "${INSTANCE_ATTR_NAME}-sync-needed" -Q 2>/dev/null } + +# this function is called when attribute sync-needed is set in the CIB check_sync_status() { - local state=$(get_status_variable "wsrep_local_state") - local ready=$(get_status_variable "wsrep_ready") + # if the pidfile is created, mysqld is up and running + # an IST might still be in progress, check wsrep status + if [ -e $OCF_RESKEY_pid ]; then + local cluster_status=$(get_status_variable "wsrep_cluster_status") + local state=$(get_status_variable "wsrep_local_state") + local ready=$(get_status_variable "wsrep_ready") - if [ -z "$state" -o -z "$ready" ]; then - ocf_exit_reason "Unable to retrieve state transfer status, verify check_user '$OCF_RESKEY_check_user' has permissions to view status" - return $OCF_ERR_GENERIC - fi + if [ -z "$cluster_status" -o -z "$state" -o -z "$ready" ]; then + ocf_exit_reason "Unable to retrieve state transfer status, verify check_user '$OCF_RESKEY_check_user' has permissions to view status" + return $OCF_ERR_GENERIC + fi - if [ "$state" = "4" -a "$ready" = "ON" ]; then - ocf_log info "local node synced with the cluster" - # when sync is finished, we are ready to switch to Master - clear_sync_needed - set_master_score - return $OCF_SUCCESS - else - ocf_log info "local node syncing" - return $OCF_SUCCESS + if [ "$cluster_status" != "Primary" ]; then + ocf_exit_reason "local node <${NODENAME}> is started, but not in primary mode. Unknown state." + return $OCF_ERR_GENERIC + fi + + if [ "$state" = "4" -a "$ready" = "ON" ]; then + ocf_log info "local node synced with the cluster" + # when sync is finished, we are ready to switch to Master + clear_sync_needed + set_master_score + return $OCF_SUCCESS + fi fi + + # if we pass here, an IST or SST is still in progress + ocf_log info "local node syncing" + return $OCF_SUCCESS } is_primary() @@ -450,7 +463,7 @@ # avoid selecting a recovered node as bootstrap if possible for node in $(echo "$OCF_RESKEY_wsrep_cluster_address" | sed 's/gcomm:\/\///g' | tr -d ' ' | tr -s ',' ' '); do - if is_heuristic_recovered $node; then + if is_no_grastate $node; then nodes_recovered="$nodes_recovered $node" else nodes="$nodes $node" @@ -488,6 +501,73 @@ set_bootstrap_node $best_node } +detect_galera_pid() +{ + ps auxww | grep -v -e "${OCF_RESKEY_binary}" -e grep | grep -qe "--pid-file=$OCF_RESKEY_pid" +} + +galera_status() +{ + local loglevel=$1 + local rc + local running + + if [ -e $OCF_RESKEY_pid ]; then + mysql_common_status $loglevel + rc=$? + else + # if pidfile is not created, the server may + # still be starting up, e.g. running SST + detect_galera_pid + running=$? + if [ $running -eq 0 ]; then + rc=$OCF_SUCCESS + else + ocf_log $loglevel "MySQL is not running" + rc=$OCF_NOT_RUNNING + fi + fi + + return $rc +} + +galera_start_nowait() +{ + local mysql_extra_params="$1" + local pid + local running + + ${OCF_RESKEY_binary} --defaults-file=$OCF_RESKEY_config \ + --pid-file=$OCF_RESKEY_pid \ + --socket=$OCF_RESKEY_socket \ + --datadir=$OCF_RESKEY_datadir \ + --log-error=$OCF_RESKEY_log \ + --user=$OCF_RESKEY_user $OCF_RESKEY_additional_parameters \ + $mysql_extra_params >/dev/null 2>&1 & + pid=$! + + # Spin waiting for the server to be spawned. + # Let the CRM/LRM time us out if required. + start_wait=1 + while [ $start_wait = 1 ]; do + if ! ps $pid > /dev/null 2>&1; then + wait $pid + ocf_exit_reason "MySQL server failed to start (pid=$pid) (rc=$?), please check your installation" + return $OCF_ERR_GENERIC + fi + detect_galera_pid + running=$? + if [ $running -eq 0 ]; then + start_wait=0 + else + ocf_log info "MySQL is not running" + fi + sleep 2 + done + + return $OCF_SUCCESS +} + galera_start_local_node() { local rc @@ -516,41 +596,55 @@ clear_last_commit mysql_common_prepare_dirs - mysql_common_start "$extra_opts" - rc=$? - if [ $rc != $OCF_SUCCESS ]; then - return $rc - fi - mysql_common_status info - rc=$? + # At start time, if galera requires a SST rather than an IST, the + # mysql server's pidfile won't be available until SST finishes, + # which can be longer than the start timeout. So we only check + # bootstrap node extensively. Joiner nodes are monitored in the + # "monitor" op + if ocf_is_true $bootstrap; then + # start server and wait until it's up and running + mysql_common_start "$extra_opts" + rc=$? + if [ $rc != $OCF_SUCCESS ]; then + return $rc + fi - if [ $rc != $OCF_SUCCESS ]; then - ocf_exit_reason "Failed initial monitor action" - return $rc - fi + mysql_common_status info + rc=$? - is_readonly - if [ $? -eq 0 ]; then - ocf_exit_reason "Failure. Master instance started in read-only mode, check configuration." - return $OCF_ERR_GENERIC - fi + if [ $rc != $OCF_SUCCESS ]; then + ocf_exit_reason "Failed initial monitor action" + return $rc + fi - is_primary - if [ $? -ne 0 ]; then - ocf_exit_reason "Failure. Master instance started, but is not in Primary mode." - return $OCF_ERR_GENERIC - fi + is_readonly + if [ $? -eq 0 ]; then + ocf_exit_reason "Failure. Master instance started in read-only mode, check configuration." + return $OCF_ERR_GENERIC + fi + + is_primary + if [ $? -ne 0 ]; then + ocf_exit_reason "Failure. Master instance started, but is not in Primary mode." + return $OCF_ERR_GENERIC + fi - if ocf_is_true $bootstrap; then clear_bootstrap_node - # clear attribute heuristic-recovered. if last shutdown was + # clear attribute no-grastate. if last shutdown was # not clean, we cannot be extra-cautious by requesting a SST # since this is the bootstrap node - clear_heuristic_recovered + clear_no_grastate else + # only start server, defer full checks to "monitor" op + galera_start_nowait "$extra_opts" + rc=$? + if [ $rc != $OCF_SUCCESS ]; then + return $rc + fi + set_sync_needed - # attribute heuristic-recovered will be cleared once the joiner + # attribute no-grastate will be cleared once the joiner # has finished syncing and is promoted to Master fi @@ -574,6 +668,12 @@ local tmp=$(mktemp) local tmperr=$(mktemp) + # if we pass here because grastate.dat doesn't exist, + # try not to bootstrap from this node if possible + if [ ! -f ${OCF_RESKEY_datadir}/grastate.dat ]; then + set_no_grastate + fi + ocf_log info "now attempting to detect last commit version using 'mysqld_safe --wsrep-recover'" ${OCF_RESKEY_binary} $recover_args --wsrep-recover > $tmp 2> $tmperr @@ -597,8 +697,8 @@ if [ ! -z "$last_commit" ]; then ocf_log warn "State recovered. force SST at next restart for full resynchronization" rm -f ${OCF_RESKEY_datadir}/grastate.dat - # try not to use this node if bootstrap is needed - set_heuristic_recovered + # try not to bootstrap from this node if possible + set_no_grastate fi fi fi @@ -637,8 +737,8 @@ # promoting other masters only performs sanity checks # as the joining nodes were started during the "monitor" op if ! check_sync_needed; then - # sync is done, clear info about last recovery - clear_heuristic_recovered + # sync is done, clear info about last startup + clear_no_grastate return $OCF_SUCCESS else ocf_exit_reason "Attempted to promote local node while sync was still needed." @@ -660,6 +760,7 @@ clear_bootstrap_node clear_last_commit clear_sync_needed + clear_no_grastate # record last commit for next promotion detect_last_commit @@ -677,7 +778,7 @@ return $OCF_ERR_CONFIGURED fi - mysql_common_status info + galera_status info if [ $? -ne $OCF_NOT_RUNNING ]; then ocf_exit_reason "master galera instance started outside of the cluster's control" return $OCF_ERR_GENERIC @@ -712,7 +813,8 @@ status_loglevel="info" fi - mysql_common_status $status_loglevel + # Check whether mysql is running or about to start after sync + galera_status $status_loglevel rc=$? if [ $rc -eq $OCF_NOT_RUNNING ]; then @@ -741,7 +843,8 @@ return $rc fi - # if we make it here, mysql is running. Check cluster status now. + # if we make it here, mysql is running or about to start after sync. + # Check cluster status now. echo $OCF_RESKEY_wsrep_cluster_address | grep -q $NODENAME if [ $? -ne 0 ]; then @@ -749,18 +852,21 @@ return $OCF_ERR_GENERIC fi - is_primary + check_sync_needed if [ $? -eq 0 ]; then - check_sync_needed - if [ $? -eq 0 ]; then - # galera running and sync is needed: slave state - if ocf_is_probe; then - # prevent state change during probe - rc=$OCF_SUCCESS - else - check_sync_status - rc=$? - fi + # galera running and sync is needed: slave state + if ocf_is_probe; then + # prevent state change during probe + rc=$OCF_SUCCESS + else + check_sync_status + rc=$? + fi + else + is_primary + if [ $? -ne 0 ]; then + ocf_exit_reason "local node <${NODENAME}> is started, but not in primary mode. Unknown state." + rc=$OCF_ERR_GENERIC else # galera running, no need to sync: master state and everything's clear rc=$OCF_RUNNING_MASTER @@ -771,9 +877,6 @@ set_master_score fi fi - else - ocf_exit_reason "local node <${NODENAME}> is started, but not in primary mode. Unknown state." - rc=$OCF_ERR_GENERIC fi return $rc @@ -790,6 +893,7 @@ clear_master_score clear_bootstrap_node clear_sync_needed + clear_no_grastate return $rc } @@ -858,7 +962,7 @@ case "$1" in start) galera_start;; stop) galera_stop;; - status) mysql_common_status err;; + status) galera_status err;; monitor) galera_monitor;; promote) galera_promote;; demote) galera_demote;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/iSCSITarget new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/iSCSITarget --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/iSCSITarget 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/iSCSITarget 2016-03-21 10:02:59.000000000 +0100 @@ -105,6 +105,15 @@ <content type="string" default="${OCF_RESKEY_portals_default}"/> </parameter> +<parameter name="iser_portals" required="0" unique="0"> +<longdesc lang="en"> +iSCSI iSER network portal addresses. Not supported by all +implementations. +</longdesc> +<shortdesc lang="en">iSCSI iSER enabled portal addresses</shortdesc> +<content type="string"/> +</parameter> + <parameter name="allowed_initiators" required="0" unique="0"> <longdesc lang="en"> Allowed initiators. A space-separated list of initiators allowed to @@ -347,6 +356,17 @@ ocf_log warn "Unsupported iSCSI target parameter ${name}: will be ignored." fi done + + # allow iSER enabled portal + for iser_portal in ${OCF_RESKEY_iser_portals}; do + configfs_path="/sys/kernel/config/target/iscsi/${OCF_RESKEY_iqn}/tpgt_1/np/${iser_portal}\:*/iser" + if [ -f ${configfs_path} ]; then + echo "1" > ${configfs_path} || exit $OCF_ERR_GENERIC + else + ocf_log warn "Unable to set iSER on: $iser_portal" + fi + done + # lio does per-initiator filtering by default. To disable # this, we need to switch the target to "permissive mode". if [ -n "${OCF_RESKEY_allowed_initiators}" ]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/ocf-shellfuncs.in new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/ocf-shellfuncs.in --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/ocf-shellfuncs.in 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/ocf-shellfuncs.in 2016-03-21 10:02:59.000000000 +0100 @@ -151,6 +151,10 @@ : ${OCF_RESOURCE_TYPE:=$__SCRIPT_NAME} fi + if [ "x$__OCF_ACTION" = "xmeta-data" ]; then + : ${OCF_RESOURCE_INSTANCE:="RESOURCE_ID"} + fi + if [ -z "$OCF_RA_VERSION_MAJOR" ]; then : We are being invoked as an init script. : Fill in some things with reasonable values. @@ -158,10 +162,6 @@ return 0 fi - if [ "x$__OCF_ACTION" = "xmeta-data" ]; then - OCF_RESOURCE_INSTANCE="undef" - fi - if [ -z "$OCF_RESOURCE_INSTANCE" ]; then ha_log "ERROR: Need to tell us our resource instance name." exit $OCF_ERR_ARGS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/oralsnr new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/oralsnr --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/oralsnr 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/oralsnr 2016-03-21 10:02:59.000000000 +0100 @@ -267,8 +267,8 @@ # used in ora-common.sh show_procs() { - ps -e -o pid,user,args | - grep '[t]nslsnr' | grep -i -w "$listener" | grep -w "$ORACLE_OWNER" + ps -U "$ORACLE_OWNER" -o pid,user,args | + grep '[t]nslsnr' | grep -i -w "$listener" } proc_pids() { show_procs | awk '{print $1}'; } PROCS_CLEANUP_TIME="10" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/pgagent new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/pgagent --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/pgagent 1970-01-01 01:00:00.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/pgagent 2016-03-21 10:02:59.000000000 +0100 @@ -0,0 +1,139 @@ +#!/bin/sh +# +# High-Availability pgagent OCF resource agent +# +# Description: Starts/stops pgagent +# Author: Oleg Selin +# License: GNU General Public License (GPL) +# +# OCF parameters: +# OCF_RESKEY_connection_string +# OCF_RESKEY_user +# OCF_RESKEY_options +# +####################################################################### +# Initialization: +: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} +. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs + +OCF_RESKEY_executable_default="`which pgagent`" +OCF_RESKEY_connection_string_default="user=postgres host=/var/run/postgresql" +OCF_RESKEY_user_default="postgres" +OCF_RESKEY_options_default="-r 1 -t 1" + +: ${OCF_RESKEY_executable="${OCF_RESKEY_executable_default}"} +: ${OCF_RESKEY_connection_string="${OCF_RESKEY_connection_string_default}"} +: ${OCF_RESKEY_user="${OCF_RESKEY_user_default}"} +: ${OCF_RESKEY_options="${OCF_RESKEY_options_default}"} + +pgagent_validate_all() { + check_binary pgagent + ocf_log debug "executable: '$OCF_RESKEY_executable'" + ocf_log debug "connection string: '$OCF_RESKEY_connection_string'" + ocf_log debug "user: '$OCF_RESKEY_user'" + ocf_log debug "options: '$OCF_RESKEY_options'" + if [ -z "$OCF_RESKEY_connection_string" ]; then + ocf_log err "Connection string is not configured!" + exit $OCF_ERR_CONFIGURED + fi + if [ -z "$OCF_RESKEY_user" ]; then + ocf_log err "User is not configured!" + exit $OCF_ERR_CONFIGURED + fi + getent passwd $OCF_RESKEY_user >/dev/null 2>&1 + if [ ! $? -eq 0 ]; then + ocf_log err "User $OCF_RESKEY_user doesn't exist"; + return $OCF_ERR_CONFIGURED; + fi + return $OCF_SUCCESS +} + +pgagent_start() { + pgagent_validate_all + nohup su - $OCF_RESKEY_user -c "'$OCF_RESKEY_executable' $OCF_RESKEY_options '$OCF_RESKEY_connection_string'" > /dev/null 2>&1 & + sleep 1 + if [ -n pgagent_monitor ]; then + return $OCF_SUCCESS + fi + return $OCF_ERR_GENERIC +} + +pgagent_stop() { + pgagent_validate_all + pid=`pgrep -f -x -U $OCF_RESKEY_user "$OCF_RESKEY_executable $OCF_RESKEY_options $OCF_RESKEY_connection_string"` + if [ -n "$pid" ]; then + ocf_run kill $pid || return $OCF_ERR_GENERIC + fi + return $OCF_SUCCESS +} + +pgagent_monitor() { + if [ -z "$OCF_RESKEY_executable" ]; then + return $OCF_ERR_INSTALLED + fi + ocf_run pgrep -f -x -U "$OCF_RESKEY_user" "$OCF_RESKEY_executable $OCF_RESKEY_options $OCF_RESKEY_connection_string" || return $OCF_NOT_RUNNING + return $OCF_SUCCESS +} + +meta_data() { + cat <<END +<?xml version="1.0"?> +<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> +<resource-agent name="pgagent" version="1.0"> +<version>1.0</version> +<longdesc lang="en">This is a pgagent Resource Agent.</longdesc> +<shortdesc lang="en">Controls pgagent</shortdesc> +<parameters> +<parameter name="connection_string"> +<longdesc lang="en">Connection string for pgagent.</longdesc> +<shortdesc lang="en">pgagent connection string</shortdesc> +<content type="string" default="$OCF_RESKEY_connection_string_default" /> +</parameter> +<parameter name="user"> +<longdesc lang="en">User to run pgagent as.</longdesc> +<shortdesc lang="en">User to run pgagent</shortdesc> +<content type="string" default="$OCF_RESKEY_user_default" /> +</parameter> +<parameter name="options"> +<longdesc lang="en">Options for pgagent.</longdesc> +<shortdesc lang="en">pgagent run options, see pgagent --help for details</shortdesc> +<content type="string" default="$OCF_RESKEY_options_default" /> +</parameter> +</parameters> +<actions> +<action name="start" timeout="5" /> +<action name="stop" timeout="5" /> +<action name="monitor" timeout="20" interval="10" depth="0" /> +<action name="meta-data" timeout="5" /> +<action name="validate-all" timeout="5" /> +</actions> +</resource-agent> +END +} + +pgagent_usage() { + cat <<END +usage: $0 {start|stop|monitor|meta-data|validate-all} + +Expects to have a fully populated OCF RA-compliant environment set. +END +} + +case $__OCF_ACTION in +start) pgagent_start;; +stop) pgagent_stop;; +monitor) pgagent_monitor;; +validate-all) pgagent_validate_all;; +usage|help) pgagent_usage + exit $OCF_SUCCESS + ;; +meta-data) meta_data + exit $OCF_SUCCESS + ;; +*) pgagent_usage + exit $OCF_ERR_UNIMPLEMENTED + ;; +esac +rc=$? +ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" +exit $rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/sapdb.sh new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/sapdb.sh --- old/resource-agents-3.9.7+git.1454950092.6f56933/heartbeat/sapdb.sh 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/heartbeat/sapdb.sh 2016-03-21 10:02:59.000000000 +0100 @@ -131,7 +131,12 @@ then FORCE="-force" fi - output=`$SAPHOSTCTRL -function StartDatabase -dbname $SID -dbtype $DBTYPE $DBINST $FORCE -service` + DBOSUSER="" + if [ -n "$OCF_RESKEY_DBOSUSER" ] + then + DBOSUSER="-dbuser $OCF_RESKEY_DBOSUSER " + fi + output=`$SAPHOSTCTRL -function StartDatabase -dbname $SID -dbtype $DBTYPE $DBINST $DBOSUSER $FORCE -service` sapdatabase_monitor 1 rc=$? @@ -168,7 +173,12 @@ then DBINST="-dbinstance $OCF_RESKEY_DBINSTANCE " fi - output=`$SAPHOSTCTRL -function StopDatabase -dbname $SID -dbtype $DBTYPE $DBINST -force -service` + DBOSUSER="" + if [ -n "$OCF_RESKEY_DBOSUSER" ] + then + DBOSUSER="-dbuser $OCF_RESKEY_DBOSUSER " + fi + output=`$SAPHOSTCTRL -function StopDatabase -dbname $SID -dbtype $DBTYPE $DBINST $DBOSUSER -force -service` if [ $? -eq 0 ] then @@ -210,7 +220,11 @@ then DBINST="-dbinstance $OCF_RESKEY_DBINSTANCE " fi - output=`$SAPHOSTCTRL -function GetDatabaseStatus -dbname $SID -dbtype $DBTYPE $DBINST` + if [ -n "$OCF_RESKEY_DBOSUSER" ] + then + DBOSUSER="-dbuser $OCF_RESKEY_DBOSUSER " + fi + output=`$SAPHOSTCTRL -function GetDatabaseStatus -dbname $SID -dbtype $DBTYPE $DBINST $DBOSUSER` # we have to parse the output, because the returncode doesn't tell anything about the instance status for SERVICE in `echo "$output" | grep -i 'Component[ ]*Name *[:=] [A-Za-z][A-Za-z0-9_]* (' | sed 's/^.*Component[ ]*Name *[:=] *\([A-Za-z][A-Za-z0-9_]*\).*$/\1/i'` @@ -255,30 +269,43 @@ # sapdatabase_status: Are there any database processes on this host ? # sapdatabase_status() { + sid=`echo $SID | tr '[:upper:]' '[:lower:]'` + + SUSER=${OCF_RESKEY_DBOSUSER:-""} + case $DBTYPE in ADA) SEARCH="$SID/db/pgm/kernel" - SUSER=`grep "^SdbOwner" /etc/opt/sdb | awk -F'=' '{print $2}'` + [ -z "$SUSER" ] && SUSER=`grep "^SdbOwner" /etc/opt/sdb | awk -F'=' '{print $2}'` SNUM=2 ;; - ORA) SEARCH="ora_[a-z][a-z][a-z][a-z]_" - SUSER="ora`echo $SID | tr '[:upper:]' '[:lower:]'`" - SNUM=4 + ORA) DBINST=${OCF_RESKEY_DBINSTANCE} + DBINST=${OCF_RESKEY_DBINSTANCE:-${SID}} + SEARCH="ora_[a-z][a-z][a-z][a-z]_$DBINST" + + if [ -z "$SUSER" ]; then + id "oracle" > /dev/null 2> /dev/null && SUSER="oracle" + id "ora${sid}" > /dev/null 2> /dev/null && SUSER="${SUSER:+${SUSER},}ora${sid}" + fi + + SNUM=4 ;; DB6) SEARCH="db2[a-z][a-z][a-z]" - SUSER="db2`echo $SID | tr '[:upper:]' '[:lower:]'`" + [ -z "$SUSER" ] && SUSER="db2${sid}" SNUM=2 ;; SYB) SEARCH="dataserver" - SUSER="syb`echo $SID | tr '[:upper:]' '[:lower:]'`" + [ -z "$SUSER" ] && SUSER="syb${sid}" SNUM=1 ;; HDB) SEARCH="hdb[a-z]*server" - SUSER="`echo $SID | tr '[:upper:]' '[:lower:]'`adm" + [ -z "$SUSER" ] && SUSER="${sid}adm" SNUM=1 ;; esac - cnt=`ps -u $SUSER -o args 2> /dev/null | grep -c $SEARCH` + [ -z "$SUSER" ] && return $OCF_ERR_INSTALLED + + cnt=`ps -u $SUSER -o args 2> /dev/null | grep -v grep | grep -c $SEARCH` [ $cnt -ge $SNUM ] && return $OCF_SUCCESS return $OCF_NOT_RUNNING } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/ldirectord/ldirectord.in new/resource-agents-3.9.7+git.1458512170.48350a9/ldirectord/ldirectord.in --- old/resource-agents-3.9.7+git.1454950092.6f56933/ldirectord/ldirectord.in 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/ldirectord/ldirectord.in 2016-03-21 10:02:59.000000000 +0100 @@ -602,7 +602,7 @@ For FTP, IMAP, LDAP, MySQL, Oracle, POP and PostgreSQL, the username used to log in. -For Radius the username is used for the attribute User-Name. +For RADIUS the username is used for the attribute User-Name. For SIP, the username is used as both the to and from address for an OPTIONS query. @@ -628,7 +628,7 @@ Password to use to login to FTP, IMAP, LDAP, MySQL, Oracle, POP, PostgreSQL and SIP servers. -For Radius the passwd is used for the attribute User-Password. +For RADIUS the passwd is used for the attribute User-Password. Default: @@ -652,7 +652,7 @@ B<secret = ">I<radiussecret>B<"> -Secret to use for Radius servers, this is the secret used to perform an +Secret to use for RADIUS servers, this is the secret used to perform an Access-Request with the username (set by B<login> above) and passwd (set by B<passwd> above). @@ -2964,7 +2964,7 @@ my ($v, $r, $ssl) = @_; my $port = ld_checkport($v, $r); - &ld_debug(2, "Checking pop server=$$r{server} port=$port ssl=$ssl"); + &ld_debug(2, "Checking POP3 server=$$r{server} port=$port ssl=$ssl"); my $pop = new Mail::POP3Client(USER => $$v{login}, PASSWORD => $$v{passwd}, @@ -2999,7 +2999,7 @@ my ($v, $r) = @_; my $port = ld_checkport($v, $r); - &ld_debug(2, "Checking imap server=$$r{server} port=$port"); + &ld_debug(2, "Checking IMAP server=$$r{server} port=$port"); my $imap = Net::IMAP::Simple->new($$r{server}, port => $port, @@ -3030,7 +3030,7 @@ my ($v, $r) = @_; my $port = ld_checkport($v, $r); - &ld_debug(2, "Checking imaps server=$$r{server} port=$port"); + &ld_debug(2, "Checking IMAPS server=$$r{server} port=$port"); my $imaps = Net::IMAP::Simple::SSL->new($$r{server}, port => $port, @@ -3063,7 +3063,7 @@ my $result; my $recstr = $$r{receive}; - &ld_debug(2, "Checking ldap server=$$r{server} port=$port"); + &ld_debug(2, "Checking LDAP server=$$r{server} port=$port"); eval { local $SIG{'__DIE__'} = "DEFAULT"; local $SIG{'ALRM'} = sub { die "Timeout Alarm" }; @@ -3141,7 +3141,7 @@ my $port = ld_checkport($v, $r); my $status = 1; - &ld_debug(2, "Checking nntp server=$$r{server} port=$port"); + &ld_debug(2, "Checking NNTP server=$$r{server} port=$port"); unless ($sock = IO::Socket::INET6->new(PeerAddr => $$r{server}, PeerPort => $port, Proto => 'tcp', @@ -3174,7 +3174,7 @@ my ($v, $r) = @_; - &ld_debug(2, "Checking radius"); + &ld_debug(2, "Checking RADIUS"); my $port = ld_checkport($v, $r); my $radius; @@ -3187,19 +3187,19 @@ &ld_debug(2, "Starting Check"); alarm $$v{checktimeout}; - &ld_debug(2, "Starting Radius"); + &ld_debug(2, "Starting RADIUS"); $radius = new Authen::Radius(Host => "$$r{server}:$port", Secret=>$$v{secret}, TimeOut=>$$v{negotiatetimeout}, Errmode=>'die'); $result = $radius->check_pwd($$v{login}, $$v{passwd}); - &ld_debug(2, "Finished Radius"); + &ld_debug(2, "Finished RADIUS"); alarm 0; # Cancel the alarm }; if ($result eq "") { &service_set($v, $r, "down", {do_log => 1}); &ld_debug(3, "Deactivated service $$r{server}:$$r{port}: $@"); - &ld_debug(3, "Radius Error: ".$radius->get_error); + &ld_debug(3, "RADIUS Error: ".$radius->get_error); return $SERVICE_DOWN; } else { &service_set($v, $r, "up", {do_log => 1}); @@ -3429,7 +3429,7 @@ my ($v, $r) = @_; my $sip_d_port = ld_checkport($v, $r); - &ld_debug(2, "Checking sip server=$$r{server} port=$sip_d_port"); + &ld_debug(2, "Checking SIP server=$$r{server} port=$sip_d_port"); eval { @@ -3592,7 +3592,7 @@ my $debug = ($DEBUG > 2) ? 1 : 0; my $port = ld_checkport($v, $r); - &ld_debug(2, "Checking ftp server=$$r{server} port=$port"); + &ld_debug(2, "Checking FTP server=$$r{server} port=$port"); &ld_debug(4, "Timeout is $$v{negotiatetimeout}"); open(TMP,'+>', undef); @@ -3657,7 +3657,7 @@ $server = &ld_strip_brackets($$r{server}); - &ld_debug(2, "Checking dns: request=\"$request\" receive=\"" + &ld_debug(2, "Checking DNS: request=\"$request\" receive=\"" . $$r{"receive"} . "\"\n"); eval { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/rgmanager/src/resources/clusterfs.sh new/resource-agents-3.9.7+git.1458512170.48350a9/rgmanager/src/resources/clusterfs.sh --- old/resource-agents-3.9.7+git.1454950092.6f56933/rgmanager/src/resources/clusterfs.sh 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/rgmanager/src/resources/clusterfs.sh 2016-03-21 10:02:59.000000000 +0100 @@ -301,6 +301,7 @@ [ "$OCF_RESKEY_nfslock" = "1" ]; then ocf_log warning "Dropping node-wide NFS locks" mkdir -p $mp/.clumanager/statd + chown rpcuser.rpcuser $mp/.clumanager/statd pkill -KILL -x lockd # Copy out the notify list; our # IPs are already torn down diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1454950092.6f56933/rgmanager/src/resources/fs.sh.in new/resource-agents-3.9.7+git.1458512170.48350a9/rgmanager/src/resources/fs.sh.in --- old/resource-agents-3.9.7+git.1454950092.6f56933/rgmanager/src/resources/fs.sh.in 2016-02-19 10:41:38.000000000 +0100 +++ new/resource-agents-3.9.7+git.1458512170.48350a9/rgmanager/src/resources/fs.sh.in 2016-03-21 10:02:59.000000000 +0100 @@ -443,6 +443,7 @@ if [ "$OCF_RESKEY_nfslock" = "yes" ] || \ [ "$OCF_RESKEY_nfslock" = "1" ]; then mkdir -p "$mp"/.clumanager/statd + chown rpcuser.rpcuser "$mp"/.clumanager/statd notify_list_merge "$mp"/.clumanager/statd fi fi @@ -457,6 +458,7 @@ ocf_log warning "Dropping node-wide NFS locks" pkill -KILL -x lockd mkdir -p "$mp"/.clumanager/statd + chown rpcuser.rpcuser "$mp"/.clumanager/statd # Copy out the notify list; our # IPs are already torn down notify_list_store "$mp"/.clumanager/statd