Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package resource-agents for openSUSE:Factory 
checked in at 2022-12-17 20:36:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
 and      /work/SRC/openSUSE:Factory/.resource-agents.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "resource-agents"

Sat Dec 17 20:36:01 2022 rev:120 rq:1043402 version:4.11.0+git90.c1dd3806

Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes  
2022-11-02 12:47:04.061545543 +0100
+++ 
/work/SRC/openSUSE:Factory/.resource-agents.new.1835/resource-agents.changes    
    2022-12-17 20:36:01.908435775 +0100
@@ -1,0 +2,17 @@
+Wed Dec 14 10:17:45 UTC 2022 - Peter Varkoly <vark...@suse.com>
+
+- Remove ocf_heartbeat_ZFS (bsc#1205556)
+  A new package resource-agents-zfs will contain ZFS support, which will not 
be shipped on SLES. 
+- Update to version 4.11.0+git90.c1dd3806:
+  * Please don't suggest /tmp/mysql-proxy.sock, that is bad practice. Use one 
of the directories where this socket can be provided securely (bsc#1146768)
+  * SAPInstance: be more resilient against broken kill.sap files (#1825) 
(bsc#1206100)
+  * lvmlockd: add "use_lvmlockd = 1" if it's commented out or missing
+  * nfsserver: add nfsv4_only parameter to make it run without 
rpc-statd/rpcbind services
+  * mysql-common: return error in stop-action if kill fails to stop the 
process, so the node can get fenced
+  * configure.ac: Fix bashisms
+  * docker/podman/zabbixserver:replace error log messages with calls to 
ocf_exit_reason
+  * vdo-vol: dont fail probe action when the underlying device doesnt exist
+  * build: add iface-macvlan
+  * iface-macvlan: new resource agent (#1815)
+
+-------------------------------------------------------------------
@@ -107 +124 @@
-  * ocf-shellfuncs: Parametrise the log destinarion by OCF_RESKEY_trace_dir
+  * ocf-shellfuncs: Parametrise the log destinarion by OCF_RESKEY_trace_dir 
(jsc#PED-121)

Old:
----
  resource-agents-4.11.0+git72.c1f0a07e.tar.xz

New:
----
  resource-agents-4.11.0+git90.c1dd3806.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.juaVFo/_old  2022-12-17 20:36:02.668439950 +0100
+++ /var/tmp/diff_new_pack.juaVFo/_new  2022-12-17 20:36:02.672439972 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           resource-agents
-Version:        4.11.0+git72.c1f0a07e
+Version:        4.11.0+git90.c1dd3806
 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
@@ -65,6 +65,14 @@
 High Availability environment for both Pacemaker and rgmanager
 service managers.
 
+%package zfs
+Summary:        resource-agent for ZFS support
+License:        GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
+Group:          Productivity/Clustering/HA
+Requires:       %{name}
+Provides:       %{name}:%{_mandir}/man7/ocf_heartbeat_ZFS.*
+Provides:       %{name}:%{_prefix}/lib/ocf/resource.d/heartbeat/ZFS
+
 %package -n ldirectord
 Summary:        A Monitoring Daemon for Maintaining High Availability Resources
 License:        GPL-2.0-only AND LGPL-2.1-or-later
@@ -81,6 +89,9 @@
 Provides:       heartbeat-ldirectord
 %{?systemd_requires}
 
+%description zfs
+Containing the resource agent and documentation for ZFS support
+
 %description -n ldirectord
 ldirectord is a stand-alone daemon for monitoring the services on real
 servers. Currently, HTTP, HTTPS, and FTP services are supported.
@@ -212,6 +223,7 @@
 %{_datadir}/%{name}/ocft/runocft.prereq
 %{_prefix}/lib/ocf/resource.d/suse
 %{_prefix}/lib/ocf/resource.d/heartbeat
+%exclude %{_prefix}/lib/ocf/resource.d/heartbeat/ZFS
 %{_prefix}/lib/ocf/lib/heartbeat
 %{_sbindir}/ocf-tester
 %{_sbindir}/ocft
@@ -226,6 +238,7 @@
 %license COPYING.GPLv3
 %doc %{_datadir}/%{name}/ra-api-1.dtd
 %{_mandir}/man7/*.7*
+%exclude %{_mandir}/man7/ocf_heartbeat_ZFS.*
 %{_mandir}/man8/ocf-tester.8*
 %{_mandir}/man8/sfex_init.8*
 %doc doc/README.webapps
@@ -236,6 +249,10 @@
 %{_libdir}/heartbeat/*
 %{_datadir}/pkgconfig/resource-agents.pc
 
+%files zfs
+%{_prefix}/lib/ocf/resource.d/heartbeat/ZFS
+%{_mandir}/man7/ocf_heartbeat_ZFS.*
+
 %files -n ldirectord
 %defattr(-,root,root)
 %doc ldirectord/ldirectord.cf

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.juaVFo/_old  2022-12-17 20:36:02.724440258 +0100
+++ /var/tmp/diff_new_pack.juaVFo/_new  2022-12-17 20:36:02.728440279 +0100
@@ -1,7 +1,7 @@
 <servicedata>
 <service name="tar_scm">
 <param name="url">https://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">1f387ac8017b3eee23b41eadafd58ce21a29eb21</param>
+<param name="changesrevision">e7822f35256d57d6d3eb8b01ef41817de5363ab8</param>
 </service>
 </servicedata>
 (No newline at EOF)

++++++ resource-agents-4.11.0+git72.c1f0a07e.tar.xz -> 
resource-agents-4.11.0+git90.c1dd3806.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resource-agents-4.11.0+git72.c1f0a07e/configure.ac 
new/resource-agents-4.11.0+git90.c1dd3806/configure.ac
--- old/resource-agents-4.11.0+git72.c1f0a07e/configure.ac      2022-10-17 
11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/configure.ac      2022-12-13 
14:48:10.000000000 +0100
@@ -148,14 +148,14 @@
 # PKG_CHECK_MODULES will fail if systemd is not found by default, so make sure
 # we set the proper vars and deal with it
 PKG_CHECK_MODULES([systemd], [systemd], [HAS_SYSTEMD=yes], [HAS_SYSTEMD=no])
-if test "x$HAS_SYSTEMD" == "xyes"; then
+if test "x$HAS_SYSTEMD" = "xyes"; then
        PKG_CHECK_VAR([SYSTEMD_UNIT_DIR], [systemd], [systemdsystemunitdir])
-       if test "x$SYSTEMD_UNIT_DIR" == "x"; then
+       if test "x$SYSTEMD_UNIT_DIR" = "x"; then
                AC_MSG_ERROR([Unable to detect systemd unit dir automatically])
        fi
 
        PKG_CHECK_VAR([SYSTEMD_TMPFILES_DIR], [systemd], [tmpfilesdir])
-       if test "x$SYSTEMD_TMPFILES_DIR" == "x"; then
+       if test "x$SYSTEMD_TMPFILES_DIR" = "x"; then
                AC_MSG_ERROR([Unable to detect systemd tmpfiles directory 
automatically])
        fi
 
@@ -168,7 +168,7 @@
        fi
 
 fi
-AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$HAS_SYSTEMD" == xyes ])
+AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$HAS_SYSTEMD" = xyes ])
 
 
 dnl ===============================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/doc/man/Makefile.am 
new/resource-agents-4.11.0+git90.c1dd3806/doc/man/Makefile.am
--- old/resource-agents-4.11.0+git72.c1f0a07e/doc/man/Makefile.am       
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/doc/man/Makefile.am       
2022-12-13 14:48:10.000000000 +0100
@@ -147,6 +147,7 @@
                           ocf_heartbeat_iSCSILogicalUnit.7 \
                           ocf_heartbeat_iSCSITarget.7 \
                           ocf_heartbeat_iface-bridge.7 \
+                          ocf_heartbeat_iface-macvlan.7 \
                           ocf_heartbeat_iface-vlan.7 \
                           ocf_heartbeat_ipsec.7 \
                           ocf_heartbeat_ids.7 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/Makefile.am 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/Makefile.am
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/Makefile.am     
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/Makefile.am     
2022-12-13 14:48:10.000000000 +0100
@@ -122,6 +122,7 @@
                        iSCSITarget             \
                        ids                     \
                        iface-bridge            \
+                       iface-macvlan           \
                        iface-vlan              \
                        ipsec                   \
                        iscsi                   \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/SAPInstance 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/SAPInstance
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/SAPInstance     
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/SAPInstance     
2022-12-13 14:48:10.000000000 +0100
@@ -830,7 +830,7 @@
   local pids
 
   [ ! -f "/usr/sap/$SID/$InstanceName/work/kill.sap" ] && return 
$OCF_NOT_RUNNING
-  pids=`grep '^kill -[0-9]' /usr/sap/$SID/$InstanceName/work/kill.sap | awk 
'{print $3}'`
+  pids=$(awk '$3 ~ "^[0-9]+$" { print $3 }' 
/usr/sap/$SID/$InstanceName/work/kill.sap)
   for pid in $pids
   do
     [ `pgrep -f -U $sidadm $InstanceName | grep -c $pid` -gt 0 ] && return 
$OCF_SUCCESS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/docker 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/docker
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/docker  2022-10-17 
11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/docker  2022-12-13 
14:48:10.000000000 +0100
@@ -284,7 +284,7 @@
        local val
 
        if [ ! -x "$(command -v docker)" ]; then 
-               ocf_log err "docker is not installed on this host"
+               ocf_exit_reason "docker is not installed on this host"
                return $OCF_ERR_INSTALLED
        fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/iface-macvlan 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/iface-macvlan
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/iface-macvlan   
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/iface-macvlan   
2022-12-13 14:48:10.000000000 +0100
@@ -0,0 +1,363 @@
+#!/bin/sh
+#
+#       OCF Resource Agent compliant iface-macvlan script.
+#
+#       Implements network MACVLAN interface management
+#
+# Resource script for MACVLAN dervice from Fabio M. Di Nitto iface-vlan
+# script.
+#
+# Author: Ulrich Goettlich
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of version 2 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Further, this software is distributed without any warranty that it is
+# free of the rightful claim of any third person regarding infringement
+# or the like.  Any license provided herein, whether implied or
+# otherwise, applies only to this software file.  Patent licenses, if
+# any, provided herein do not apply to combinations of this program with
+# other software, or any other product whatsoever.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+#
+#
+
+# TODO:
+#
+#      OCF parameters are as below
+#       OCF_RESKEY_device
+#       OCF_RESKEY_name
+#       OCF_RESKEY_mode
+#       OCF_RESKEY_mac
+#
+
+#######################################################################
+# Initialization:
+
+: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
+. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
+
+# Defaults
+OCF_RESKEY_mode_default="bridge"
+
+: ${OCF_RESKEY_mode=${OCF_RESKEY_mode_default}}
+
+#######################################################################
+
+macvlan_usage() {
+       cat <<END
+usage: $0 {start|stop|status|monitor|validate-all|meta-data}
+
+Expects to have a fully populated OCF RA-compliant environment set.
+END
+}
+
+macvlan_meta_data() {
+       cat <<END
+<?xml version="1.0"?>
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
+<resource-agent name="iface-macvlan" version="1.0">
+  <version>1.0</version>
+
+  <longdesc lang="en">
+    This resource manages MACVLAN network interfaces.
+    It can add, remove, configure MACVLANs.
+  </longdesc>
+
+  <shortdesc lang="en">
+    Manages MACVLAN network interfaces.
+  </shortdesc>
+
+  <parameters>
+    <parameter name="device" unique="0" required="1">
+      <longdesc lang="en">
+        Define the interface where MACVLAN should be attached.
+      </longdesc>
+      <shortdesc lang="en">
+        Network interface.
+      </shortdesc>
+      <content type="string"/>
+    </parameter>
+
+    <parameter name="name" unique="1" required="1">
+      <longdesc lang="en">
+        Define the MACVLAN NAME. It has to be a valid interface name (max 15 
characters).
+      </longdesc>
+      <shortdesc lang="en">
+        Define the MACVLAN NAME.
+      </shortdesc>
+      <content type="string"/>
+    </parameter>
+
+    <parameter name="mode" unique="0">
+      <longdesc lang="en">
+        Define the name of the MACVLAN mode (currently only bridge is 
supported).
+      </longdesc>
+      <shortdesc lang="en">
+        Mode of the macvlan.
+      </shortdesc>
+      <content type="string" default="${OCF_RESKEY_mode_default}" />
+    </parameter>
+
+    <parameter name="mac" unique="1">
+     <longdesc lang="en">
+      Set the interface MAC address explicitly.
+     </longdesc>
+     <shortdesc lang="en">MAC address of the macvlan</shortdesc>
+     <content type="string" />
+</parameter>
+  </parameters>
+
+  <actions>
+    <action name="start"        timeout="30s" />
+    <action name="stop"         timeout="20s" />
+    <action name="status"       timeout="20s" depth="0" interval="10s" />
+    <action name="monitor"      timeout="20s" depth="0" interval="10s" />
+    <action name="meta-data"    timeout="5s" />
+    <action name="validate-all" timeout="20s" />
+  </actions>
+</resource-agent>
+END
+}
+
+# check if the interface is admin up/down
+
+iface_is_up() {
+       if ! $IP2UTIL -o link show $1 | \
+           sed -e 's#.*<##g' -e 's#>.*##' -e 's#LOWER_UP##g' | \
+           grep -q UP; then
+               return 1
+       fi
+       return 0
+}
+
+# check if the slaves have link layer up/down
+# see kernel network documentation on meaning of LOWER_UP flag
+# for more in depth explanation on how it works
+# NOTE: this check is not reliable in virt environment
+# since interfaces are always LOWER_UP. There is no way
+# from the guest to know if the host has disconnected somehow
+
+iface_lower_is_up() {
+       if ! $IP2UTIL -o link show $1 | \
+           grep -q LOWER_UP; then
+               return 1
+       fi
+       return 0
+}
+
+macvlan_validate() {
+       check_binary $IP2UTIL
+
+       if [ -z "$OCF_RESKEY_device" ]; then
+               ocf_log err "Invalid device: value cannot be empty"
+               return $OCF_ERR_CONFIGURED
+       fi
+
+       if [ -z "$OCF_RESKEY_name" ]; then
+               ocf_log err "Invalid name: value cannot be empty"
+               return $OCF_ERR_CONFIGURED
+       fi
+
+       # the echo .. is the equivalent of strlen in bash
+       #
+       # /usr/include/linux/if.h:#define IFNAMSIZ        16
+       # needs to include 0 byte end string
+
+       if [ "${#OCF_RESKEY_name}" -gt 15 ]; then
+               ocf_log err "Invalid name: name is too long"
+               return $OCF_ERR_CONFIGURED
+       fi
+
+       if [ ! -d "/sys/class/net" ]; then
+               ocf_log err "Unable to find sysfs network class in /sys"
+               return $OCF_ERR_GENERIC
+       fi
+
+       if [ ! -e "/sys/class/net/$OCF_RESKEY_device" ]; then
+               ocf_log err "Invalid device: $OCF_RESKEY_device does not exists"
+               return $OCF_ERR_ARGS
+       fi
+
+       if [ "${OCF_RESKEY_mode}" != "bridge" ]; then
+               ocf_log err "Invalid mode: only bridge mode is currently 
supported (because other modes are not tested)"
+               return $OCF_ERR_CONFIGURED
+       fi
+
+       return 0
+}
+
+macvlan_check() {
+       if [ -e "/sys/class/net/$OCF_RESKEY_name" ]; then
+               if [ ! -e "$HA_RSCTMP/iface-macvlan.$OCF_RESKEY_name" ]; then
+                       return $OCF_ERR_GENERIC
+               fi
+       else
+               if [ -e "$HA_RSCTMP/iface-macvlan.$OCF_RESKEY_name" ]; then
+                       error="$(rm -f 
"$HA_RSCTMP/iface-macvlan.$OCF_RESKEY_name" 2>&1)"
+                       if [ "$?" != "0" ]; then
+                               ocf_log err "Unable to remove stale lock file 
for macvlan $OCF_RESKEY_name: $error"
+                               return $OCF_ERR_INSTALLED
+                       fi
+               fi
+               return $OCF_NOT_RUNNING
+       fi
+
+       if ! iface_is_up $OCF_RESKEY_name; then
+               ocf_log err "MACVLAN $OCF_RESKEY_name is administratively down"
+               return $OCF_ERR_GENERIC
+       fi
+
+       if ! iface_lower_is_up $OCF_RESKEY_name; then
+               ocf_log err "MACVLAN $OCF_RESKEY_name has no active link-layer"
+               return $OCF_ERR_GENERIC
+       fi
+
+       return $OCF_SUCCESS
+}
+
+# we need a simpler stop version to clean after us if start fails
+# without involving any error checking
+# rolling back in case of failure is otherwise complex
+
+macvlan_force_stop() {
+       $IP2UTIL link delete "$OCF_RESKEY_name" >/dev/null 2>&1
+       rm -f "$HA_RSCTMP/iface-macvlan.$OCF_RESKEY_name" 2>&1
+}
+
+macvlan_start() {
+       # check if the macvlan already exists
+       macvlan_check
+       ret=$?
+       if [ "$ret" != "$OCF_NOT_RUNNING" ]; then
+               return $ret
+       fi
+
+       # create the MACVLAN
+        set_specific_mac=""
+        [ -n "${OCF_RESKEY_mac}" ] && set_specific_mac="address 
${OCF_RESKEY_mac}"
+       error="$($IP2UTIL link add link "$OCF_RESKEY_device" 
${set_specific_mac} name "$OCF_RESKEY_name" type macvlan mode 
"$OCF_RESKEY_mode" 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to create MACVLAN $OCF_RESKEY_name: $error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       # set the interface up
+       error="$($IP2UTIL link set dev "$OCF_RESKEY_device" up 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to set MACVLAN $OCF_RESKEY_device up: 
$error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       # set the macvlan up
+       error="$($IP2UTIL link set dev "$OCF_RESKEY_name" up 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to set MACVLAN $OCF_RESKEY_name up: $error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       error="$(touch "$HA_RSCTMP/iface-macvlan.$OCF_RESKEY_name" 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to create lock file for MACVLAN 
$OCF_RESKEY_name: $error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       return $OCF_SUCCESS
+}
+
+macvlan_stop() {
+       macvlan_check
+       ret=$?
+       if [ "$ret" = "$OCF_NOT_RUNNING" ]; then
+               return $OCF_SUCCESS
+       fi
+       if [ "$ret" != "$OCF_SUCCESS" ]; then
+               return $ret
+       fi
+
+       # set macvlan down
+       error="$($IP2UTIL link set dev "$OCF_RESKEY_name" down 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to set MACVLAN $OCF_RESKEY_name down: 
$error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       # delete macvlan
+       error="$($IP2UTIL link delete "$OCF_RESKEY_name" 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to delete MACVLAN $OCF_RESKEY_name: $error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       error="$(rm -f "$HA_RSCTMP/iface-macvlan.$OCF_RESKEY_name" 2>&1)"
+       if [ "$?" != "0" ]; then
+               ocf_log err "Unable to remove lock file for MACVLAN 
$OCF_RESKEY_name: $error"
+               return $OCF_ERR_GENERIC
+       fi
+
+       return $OCF_SUCCESS
+}
+
+case $__OCF_ACTION in
+       meta-data)
+               macvlan_meta_data
+               exit $OCF_SUCCESS
+       ;;
+       usage|help)
+               macvlan_usage
+               exit $OCF_SUCCESS
+       ;;
+esac
+
+if [ ! -d "$HA_RSCTMP" ]; then
+       ocf_log debug "$HA_RSCTMP not found, we are probably being executed 
manually"
+       mkdir -p "$HA_RSCTMP"
+fi
+
+if [ -n "$__OCF_ACTION" ] && ! macvlan_validate; then
+       exit $OCF_ERR_CONFIGURED
+fi
+
+case $__OCF_ACTION in
+       start|stop)
+               if ! ocf_is_root; then
+                       ocf_log err "You must be root for $__OCF_ACTION 
operation."
+                       exit $OCF_ERR_PERM
+               fi
+       ;;
+esac
+
+case $__OCF_ACTION in
+       start)
+               macvlan_start
+               ret=$?
+               if [ "$ret" != "$OCF_SUCCESS" ]; then
+                       macvlan_force_stop
+               fi
+               exit $ret
+       ;;
+       stop)
+               macvlan_stop
+               exit $?
+       ;;
+       status|monitor)
+               macvlan_check
+               exit $?
+       ;;
+       validate-all)
+               # macvlan_validate above does the trick
+       ;;
+       *)
+               macvlan_usage
+               exit $OCF_ERR_UNIMPLEMENTED
+       ;;
+esac
+# vi:sw=4:ts=8:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/lvmlockd 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/lvmlockd
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/lvmlockd        
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/lvmlockd        
2022-12-13 14:48:10.000000000 +0100
@@ -180,14 +180,23 @@
        lock_type=$(echo "$out" | cut -d'=' -f2)
 
        if [ -z "$use_lvmlockd" ]; then
-               ocf_exit_reason "\"use_lvmlockd\" not set in /etc/lvm/lvm.conf 
..."
-               exit $OCF_ERR_CONFIGURED
-       fi
+               ocf_log info "adding \"use_lvmlockd=1\" to /etc/lvm/lvm.conf 
..."
+               cat >> /etc/lvm/lvm.conf << EOF
+
+global {
+    use_lvmlockd = 1
+}
+EOF
 
-       if [ -n "$use_lvmlockd" ] && [ "$use_lvmlockd" != 1 ] ; then
+               if [ $? -ne 0 ]; then
+                       ocf_exit_reason "unable to add \"use_lvmlockd=1\" to 
/etc/lvm/lvm.conf ..."
+                       exit $OCF_ERR_CONFIGURED
+               fi
+       elif [ "$use_lvmlockd" != 1 ] ; then
                ocf_log info "setting \"use_lvmlockd=1\" in /etc/lvm/lvm.conf 
..."
                sed -i 's,^[[:blank:]]*use_lvmlockd[[:blank:]]*=.*,\ \ \ \ 
use_lvmlockd = 1,g' /etc/lvm/lvm.conf
        fi
+
        if [ -n "$lock_type" ] ; then
                # locking_type was removed from config in v2.03
                ocf_version_cmp "$(lvmconfig --version | awk '/LVM ver/ 
{sub(/\(.*/, "", $3); print $3}')" "2.03"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/mysql-common.sh 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/mysql-common.sh
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/mysql-common.sh 
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/mysql-common.sh 
2022-12-13 14:48:10.000000000 +0100
@@ -318,6 +318,10 @@
     if [ $? != $OCF_NOT_RUNNING ]; then
         ocf_log info "MySQL failed to stop after ${shutdown_timeout}s using 
SIGTERM. Trying SIGKILL..."
         /bin/kill -KILL $pid > /dev/null
+        mysql_common_status info $pid
+        if [ $? != $OCF_NOT_RUNNING ]; then
+            return $OCF_ERR_GENERIC
+        fi
     fi
 
     ocf_log info "MySQL stopped";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/mysql-proxy 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/mysql-proxy
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/mysql-proxy     
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/mysql-proxy     
2022-12-13 14:48:10.000000000 +0100
@@ -171,7 +171,7 @@
 <parameter name="proxy_address" unique="0" required="0">
 <longdesc lang="en">
 Listening address:port of the proxy server (default: :4040).
-You can also specify a socket like "/tmp/mysql-proxy.sock".
+You can also specify a socket like "/var/run/mysql-proxy.sock".
 </longdesc>
 <shortdesc lang="en">MySQL Proxy listening address</shortdesc>
 <content type="string" default="${OCF_RESKEY_proxy_address_default}" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/nfsserver 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/nfsserver
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/nfsserver       
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/nfsserver       
2022-12-13 14:48:10.000000000 +0100
@@ -79,6 +79,16 @@
 <content type="string" default="auto detected" />
 </parameter>
 
+<parameter name="nfsv4_only" unique="0" required="0">
+<longdesc lang="en">
+Run in NFSv4 only mode (rpc-statd and rpcbind services masked).
+</longdesc>
+<shortdesc lang="en">
+NFSv4 only mode.
+</shortdesc>
+<content type="boolean" default="false" />
+</parameter>
+
 <parameter name="nfs_no_notify" unique="0" required="0">
 <longdesc lang="en">
 Do not send reboot notifications to NFSv3 clients during server startup.
@@ -348,20 +358,22 @@
        local rc
        local fn
 
-       ocf_log debug "Status: rpcbind"
-       rpcinfo > /dev/null 2>&1
-       rc=$?
-       if [ "$rc" -ne "0" ]; then
-               ocf_exit_reason "rpcbind is not running"
-               return $OCF_NOT_RUNNING
-       fi
+       if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+               ocf_log debug "Status: rpcbind"
+               rpcinfo > /dev/null 2>&1
+               rc=$?
+               if [ "$rc" -ne "0" ]; then
+                       ocf_exit_reason "rpcbind is not running"
+                       return $OCF_NOT_RUNNING
+               fi
 
-       ocf_log debug "Status: nfs-mountd"
-       ps axww | grep -q "[r]pc.mountd"
-       rc=$?
-       if [ "$rc" -ne "0" ]; then
-               ocf_exit_reason "nfs-mountd is not running"
-               return $OCF_NOT_RUNNING
+               ocf_log debug "Status: nfs-mountd"
+               ps axww | grep -q "[r]pc.mountd"
+               rc=$?
+               if [ "$rc" -ne "0" ]; then
+                       ocf_exit_reason "nfs-mountd is not running"
+                       return $OCF_NOT_RUNNING
+               fi
        fi
 
        ocf_log debug "Status: nfs-idmapd"
@@ -375,12 +387,14 @@
                return $OCF_NOT_RUNNING
        fi
 
-       ocf_log debug "Status: rpc-statd"
-       rpcinfo -t localhost 100024 > /dev/null 2>&1
-       rc=$?
-       if [ "$rc" -ne "0" ]; then
-               ocf_exit_reason "rpc-statd is not running"
-               return $OCF_NOT_RUNNING
+       if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+               ocf_log debug "Status: rpc-statd"
+               rpcinfo -t localhost 100024 > /dev/null 2>&1
+               rc=$?
+               if [ "$rc" -ne "0" ]; then
+                       ocf_exit_reason "rpc-statd is not running"
+                       return $OCF_NOT_RUNNING
+               fi
        fi
 
        nfs_exec is-active nfs-server
@@ -424,7 +438,7 @@
        if [ $rc -eq 0 ]; then
                # don't report success if nfs servers are up
                # without locking daemons.
-               v3locking_exec "status"
+               ocf_is_true "$OCF_RESKEY_nfsv4_only" || v3locking_exec "status"
                rc=$?
                if [ $rc -ne 0 ]; then
                        ocf_exit_reason "NFS server is up, but the locking 
daemons are down"
@@ -786,48 +800,54 @@
 
        # systemd
        case $EXEC_MODE in
-            [23]) nfs_exec start rpcbind
-                 local i=1
-                 while : ; do
-                       ocf_log info "Start: rpcbind i: $i"
-                       rpcinfo > /dev/null 2>&1
-                       rc=$?
-                       if [ "$rc" -eq "0" ]; then
-                               break;
-                       fi
-                       sleep 1
-                       i=$((i + 1))
-                 done
+            [23]) if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+                       nfs_exec start rpcbind
+                       local i=1
+                       while : ; do
+                               ocf_log info "Start: rpcbind i: $i"
+                               rpcinfo > /dev/null 2>&1
+                               rc=$?
+                               if [ "$rc" -eq "0" ]; then
+                                       break
+                               fi
+                               sleep 1
+                               i=$((i + 1))
+                       done
+                 fi
                  ;;
        esac
 
-       # check to see if we need to start rpc.statd
-       v3locking_exec "status"
-       if [ $? -ne $OCF_SUCCESS ]; then
-               v3locking_exec "start"
-               rc=$?
-               if [ $rc -ne 0 ]; then
-                       ocf_exit_reason "Failed to start NFS server locking 
daemons"
-                       return $rc
+       if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+               # check to see if we need to start rpc.statd
+               v3locking_exec "status"
+               if [ $? -ne $OCF_SUCCESS ]; then
+                       v3locking_exec "start"
+                       rc=$?
+                       if [ $rc -ne 0 ]; then
+                               ocf_exit_reason "Failed to start NFS server 
locking daemons"
+                               return $rc
+                       fi
+               else
+                       ocf_log info "rpc.statd already up"
                fi
-       else
-               ocf_log info "rpc.statd already up"
        fi
 
        # systemd
        case $EXEC_MODE in
-            [23]) nfs_exec start nfs-mountd
-                 local i=1
-                 while : ; do
-                       ocf_log info "Start: nfs-mountd i: $i"
-                       ps axww | grep -q "[r]pc.mountd"
-                       rc=$?
-                       if [ "$rc" -eq "0" ]; then
-                               break;
-                       fi
-                       sleep 1
-                       i=$((i + 1))
-                 done
+            [23]) if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+                       nfs_exec start nfs-mountd
+                       local i=1
+                       while : ; do
+                               ocf_log info "Start: nfs-mountd i: $i"
+                               ps axww | grep -q "[r]pc.mountd"
+                               rc=$?
+                               if [ "$rc" -eq "0" ]; then
+                                       break
+                               fi
+                               sleep 1
+                               i=$((i + 1))
+                       done
+                 fi
 
                  nfs_exec start nfs-idmapd
                  local i=1
@@ -839,24 +859,26 @@
                        ocf_log debug "$(cat $fn)"
                        rm -f $fn
                        if [ "$rc" -eq "0" ]; then
-                               break;
+                               break
                        fi
                        sleep 1
                        i=$((i + 1))
                  done
 
-                 nfs_exec start rpc-statd
-                 local i=1
-                 while : ; do
-                       ocf_log info "Start: rpc-statd i: $i"
-                       rpcinfo -t localhost 100024 > /dev/null 2>&1
-                       rc=$?
-                       if [ "$rc" -eq "0" ]; then
-                               break;
-                       fi
-                       sleep 1
-                       i=$((i + 1))
-                 done
+                 if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+                       nfs_exec start rpc-statd
+                       local i=1
+                       while : ; do
+                               ocf_log info "Start: rpc-statd i: $i"
+                               rpcinfo -t localhost 100024 > /dev/null 2>&1
+                               rc=$?
+                               if [ "$rc" -eq "0" ]; then
+                                       break
+                               fi
+                               sleep 1
+                               i=$((i + 1))
+                       done
+                 fi
        esac
 
 
@@ -914,13 +936,15 @@
                        sleep 1
                  done
 
-                 nfs_exec stop rpc-statd > /dev/null 2>&1
-                 ocf_log info "Stop: rpc-statd"
-                 rpcinfo -t localhost 100024 > /dev/null 2>&1
-                 rc=$?
-                 if [ "$rc" -eq "0" ]; then
-                       ocf_exit_reason "Failed to stop rpc-statd"
-                       return $OCF_ERR_GENERIC
+                 if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+                       nfs_exec stop rpc-statd > /dev/null 2>&1
+                       ocf_log info "Stop: rpc-statd"
+                       rpcinfo -t localhost 100024 > /dev/null 2>&1
+                       rc=$?
+                       if [ "$rc" -eq "0" ]; then
+                               ocf_exit_reason "Failed to stop rpc-statd"
+                               return $OCF_ERR_GENERIC
+                       fi
                  fi
 
                  nfs_exec stop nfs-idmapd > /dev/null 2>&1
@@ -935,13 +959,15 @@
                        return $OCF_ERR_GENERIC
                  fi
 
-                 nfs_exec stop nfs-mountd > /dev/null 2>&1
-                 ocf_log info "Stop: nfs-mountd"
-                 ps axww | grep -q "[r]pc.mountd"
-                 rc=$?
-                 if [ "$rc" -eq "0" ]; then
-                       ocf_exit_reason "Failed to stop nfs-mountd"
-                       return $OCF_ERR_GENERIC
+                 if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+                       nfs_exec stop nfs-mountd > /dev/null 2>&1
+                       ocf_log info "Stop: nfs-mountd"
+                       ps axww | grep -q "[r]pc.mountd"
+                       rc=$?
+                       if [ "$rc" -eq "0" ]; then
+                               ocf_exit_reason "Failed to stop nfs-mountd"
+                               return $OCF_ERR_GENERIC
+                       fi
                  fi
 
                  if systemctl --no-legend list-unit-files "nfsdcld*" | grep -q 
nfsdcld; then
@@ -960,10 +986,12 @@
        esac
 
 
-       v3locking_exec "stop"
-       if [ $? -ne 0 ]; then
-               ocf_exit_reason "Failed to stop NFS locking daemons"
-               rc=$OCF_ERR_GENERIC
+       if ! ocf_is_true "$OCF_RESKEY_nfsv4_only"; then
+               v3locking_exec "stop"
+               if [ $? -ne 0 ]; then
+                       ocf_exit_reason "Failed to stop NFS locking daemons"
+                       rc=$OCF_ERR_GENERIC
+               fi
        fi
 
        # systemd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/podman 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/podman
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/podman  2022-10-17 
11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/podman  2022-12-13 
14:48:10.000000000 +0100
@@ -322,7 +322,7 @@
        local rc=$OCF_SUCCESS
 
        if [ -z "$cid" ]; then
-               ocf_log error "Container ID not found for \"$CONTAINER\". Not 
creating drop-in dependency"
+               ocf_exit_reason "Container ID not found for \"$CONTAINER\". Not 
creating drop-in dependency"
                return $OCF_ERR_GENERIC
        fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/vdo-vol 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/vdo-vol
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/vdo-vol 2022-10-17 
11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/vdo-vol 2022-12-13 
14:48:10.000000000 +0100
@@ -148,6 +148,12 @@
        MODE=$(vdostats --verbose ${OCF_RESKEY_volume} | grep "operating mode" 
| awk '{print $NF}')
 
        case "$status" in
+               *"ERROR - vdodumpconfig: Failed to make FileLayer from"*)
+                       if ocf_is_probe; then
+                           return $OCF_NOT_RUNNING
+                       fi
+                       return $OCF_ERR_GENERIC
+                       ;;
                *"Device mapper status: not available"*)
                        return $OCF_NOT_RUNNING
                        ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/zabbixserver 
new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/zabbixserver
--- old/resource-agents-4.11.0+git72.c1f0a07e/heartbeat/zabbixserver    
2022-10-17 11:54:47.000000000 +0200
+++ new/resource-agents-4.11.0+git90.c1dd3806/heartbeat/zabbixserver    
2022-12-13 14:48:10.000000000 +0100
@@ -138,7 +138,7 @@
         if ocf_is_probe; then
             ocf_log info "Can't read configuration file $1 during probe"
         else
-            ocf_log err "Can't read configuration file $1"
+            ocf_exit_reason "Can't read configuration file $1"
             return 1
         fi
     fi
@@ -207,7 +207,7 @@
 
     startserver
     if [ $? -ne 0 ]; then
-        ocf_log err "Can't start Zabbix server"
+        ocf_exit_reason "Can't start Zabbix server"
         return $OCF_ERR_GENERIC
     fi
 
@@ -244,14 +244,14 @@
 
     pid=`getpid $OCF_RESKEY_pid`
     if [ $? -ne 0 ]; then
-        ocf_log err "Can't find process PID"
+        ocf_exit_reason "Can't find process PID"
         return $OCF_ERR_GENERIC
     fi
 
     # kill the process
     ocf_run -q kill $pid
     if [ $? -ne 0 ]; then
-        ocf_log err "Can't stop process (PID $pid)"
+        ocf_exit_reason "Can't stop process (PID $pid)"
         return $OCF_ERR_GENERIC
     fi
 

Reply via email to