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 2023-05-02 16:18:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
 and      /work/SRC/openSUSE:Factory/.resource-agents.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "resource-agents"

Tue May  2 16:18:32 2023 rev:123 rq:1083864 version:4.12.0+git30.7fd7c8fa

Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes  
2023-03-19 16:15:56.691137264 +0100
+++ 
/work/SRC/openSUSE:Factory/.resource-agents.new.1533/resource-agents.changes    
    2023-05-02 16:18:34.897652276 +0200
@@ -1,0 +2,16 @@
+Mon May 01 12:24:36 UTC 2023 - [email protected]
+
+- Update to version 4.12.0+git30.7fd7c8fa:
+  * Filesystem: fail if AWS efs-utils not installed when fstype=efs
+  * azure-events*: Use -LS instead of -Ls as parameter to get the Transition 
Summary (#1864)
+  * spec: remove JFLAGS logic and use %{_smp_mflags} like we do in other 
projects
+  * exportfs: make the "fsid=" parameter optional
+  * nfsserver: prepare the layout for the default /var/lib/nfs
+  * IPv6addr: expect ping/pong delay
+  * azure-events*: fix for no "Transition Summary" for Pacemaker 2.1+
+  * ZFS: add non-blocking check if pool was imported (#1853)
+  * ethmonitor: dont log "Interface does not exist" for monitor-action
+  * mysql: promotable fixes to avoid nodes getting bounced around by setting 
-v 1/-v 2, and added OCF_CHECK_LEVEL=10 for promotable resources to be able to 
distinguish between promoted and not
+  * LVM-activate: failover with missing PVs
+
+-------------------------------------------------------------------

Old:
----
  resource-agents-4.12.0+git10.fe1a2f88.tar.xz

New:
----
  resource-agents-4.12.0+git30.7fd7c8fa.tar.xz

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

Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.Jg1hGd/_old  2023-05-02 16:18:35.465655644 +0200
+++ /var/tmp/diff_new_pack.Jg1hGd/_new  2023-05-02 16:18:35.473655692 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           resource-agents
-Version:        4.12.0+git10.fe1a2f88
+Version:        4.12.0+git30.7fd7c8fa
 Release:        0
 Summary:        HA Reusable Cluster Resource Scripts
 License:        GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Jg1hGd/_old  2023-05-02 16:18:35.525656000 +0200
+++ /var/tmp/diff_new_pack.Jg1hGd/_new  2023-05-02 16:18:35.529656024 +0200
@@ -1,7 +1,7 @@
 <servicedata>
 <service name="tar_scm">
 <param name="url">https://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">76cc4da4818570fd9511bc620ff6bea418d6d8b5</param>
+<param name="changesrevision">b02b06c437b1d8cb1dcfe8ace47c2efc4a0e476c</param>
 </service>
 </servicedata>
 (No newline at EOF)

++++++ resource-agents-4.12.0+git10.fe1a2f88.tar.xz -> 
resource-agents-4.12.0+git30.7fd7c8fa.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/Filesystem 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/Filesystem
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/Filesystem      
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/Filesystem      
2023-05-01 13:54:32.000000000 +0200
@@ -456,7 +456,7 @@
        # System (EFS)
        case "$FSTYPE" in
                fuse.*|glusterfs|rozofs) support="fuse";;
-               efs) support="nfs4";;
+               efs) check_binary "mount.efs"; support="nfs4";;
        esac
 
        if [ "$support" != "$FSTYPE" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/IPv6addr.c 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/IPv6addr.c
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/IPv6addr.c      
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/IPv6addr.c      
2023-05-01 13:54:32.000000000 +0200
@@ -104,6 +104,7 @@
 #include <syslog.h>
 #include <signal.h>
 #include <errno.h>
+#include <poll.h>
 #include <clplumbing/cl_log.h>
 
 
@@ -606,6 +607,8 @@
        struct iovec                    iov;
        u_char                          packet[MINPACKSIZE];
        struct msghdr                   msg;
+       int                             i;
+       struct pollfd                   pfd;
 
        if ((icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) == -1) {
                return -1;
@@ -644,12 +647,26 @@
        msg.msg_control = NULL;
        msg.msg_controllen = 0;
 
-       ret = recvmsg(icmp_sock, &msg, MSG_DONTWAIT);
-       if (0 >= ret) {
-               return -1;
+       for (i = 0; i < 3; i++) {
+               pfd.fd = icmp_sock;
+               pfd.events = POLLIN;
+               pfd.revents = 0;
+               ret = poll(&pfd, 1, 10);
+
+               if (ret < 1)
+                       continue;
+
+               ret = recvmsg(icmp_sock, &msg, MSG_DONTWAIT);
+               if (ret > 0)
+                       return 0;
+               if (ret == 0)
+                       break;
+
+               if (errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR)
+                       break;
        }
        
-       return 0;
+       return -1;
 }
 
 static void usage(const char* self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/LVM-activate 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/LVM-activate
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/LVM-activate    
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/LVM-activate    
2023-05-01 13:54:32.000000000 +0200
@@ -50,6 +50,8 @@
 OCF_RESKEY_activation_mode_default="exclusive"
 OCF_RESKEY_tag_default="pacemaker"
 OCF_RESKEY_partial_activation_default="false"
+OCF_RESKEY_degraded_activation_default="false"
+OCF_RESKEY_majority_pvs_default="false"
 
 : ${OCF_RESKEY_vgname=${OCF_RESKEY_vgname_default}}
 : ${OCF_RESKEY_lvname=${OCF_RESKEY_lvname_default}}
@@ -57,6 +59,8 @@
 : ${OCF_RESKEY_activation_mode=${OCF_RESKEY_activation_mode_default}}
 : ${OCF_RESKEY_tag=${OCF_RESKEY_tag_default}}
 : ${OCF_RESKEY_partial_activation=${OCF_RESKEY_partial_activation_default}}
+: ${OCF_RESKEY_degraded_activation=${OCF_RESKEY_degraded_activation_default}}
+: ${OCF_RESKEY_majority_pvs=${OCF_RESKEY_majority_pvs_default}}
 
 # If LV is given, only activate this named LV; otherwise, activate all
 # LVs in the named VG.
@@ -191,6 +195,29 @@
 <content type="string" default="${OCF_RESKEY_partial_activation_default}" />
 </parameter>
 
+<parameter name="degraded_activation" unique="0" required="0">
+<longdesc lang="en">
+Activate RAID LVs using the "degraded" activation mode. This allows RAID
+LVs to be activated with missing PVs if all data can be provided with
+RAID redundancy. The RAID level determines the number of PVs that are
+required for degraded activation to succeed. If fewer PVs are available,
+then degraded activation will fail. Also enable majority_pvs.
+</longdesc>
+<shortdesc lang="en">Activate RAID LVs in degraded mode when missing 
PVs</shortdesc>
+<content type="string" default="${OCF_RESKEY_degraded_activation_default}" />
+</parameter>
+
+<parameter name="majority_pvs" unique="0" required="0">
+<longdesc lang="en">
+If set, the VG system ID can be reassigned to a new host if a majority
+of PVs in the VG are present. Otherwise, VG failover with system ID
+will fail when the VG is missing PVs. Also enable degraded_activation
+when RAID LVs are used.
+</longdesc>
+<shortdesc lang="en">Allow changing the system ID of a VG with a majority of 
PVs</shortdesc>
+<content type="string" default="${OCF_RESKEY_majority_pvs_default}" />
+</parameter>
+
 </parameters>
 
 <actions>
@@ -524,24 +551,27 @@
                exit $OCF_ERR_GENERIC
        fi
 
-       # Inconsistency might be due to missing physical volumes, which doesn't
-       # automatically mean we should fail.  If partial_activation=true then
-       # we should let start try to handle it, or if no PVs are listed as
-       # "unknown device" then another node may have marked a device missing
-       # where we have access to all of them and can start without issue.
-       case $(vgs -o attr --noheadings $VG | tr -d ' ') in
-       ???p??*)
-               if ! ocf_is_true "$OCF_RESKEY_partial_activation" ; then
-                       # We are missing devices and cannot activate partially
-                       ocf_exit_reason "Volume group [$VG] has devices 
missing.  Consider partial_activation=true to attempt to activate partially"
-                       exit $OCF_ERR_GENERIC
+       vg_missing_pv_count=$(vgs -o missing_pv_count --noheadings ${VG} 
2>/dev/null)
+
+       if [ $vg_missing_pv_count -gt 0 ]; then
+               ocf_log warn "Volume Group ${VG} is missing 
$vg_missing_pv_count PVs."
+
+               # Setting new system ID will succeed if over half of PVs remain.
+               # Don't try to calculate here if a majority is present,
+               # but leave this up to the vgchange command to determine.
+               if ocf_is_true "$OCF_RESKEY_majority_pvs" ; then
+                       ocf_log warn "Attempting fail over with missing PVs 
(majority.)"
+
+               # Setting new system ID will fail, and behavior is undefined for
+               # other access modes.
+               elif ocf_is_true "$OCF_RESKEY_partial_activation" ; then
+                       ocf_log warn "Attempting fail over with missing PVs 
(partial.)"
+
                else
-                       # We are missing devices but are allowed to activate 
partially.
-                       # Assume that caused the vgck failure and carry on
-                       ocf_log warn "Volume group inconsistency detected with 
missing device(s) and partial_activation enabled.  Proceeding with requested 
action."
+                       ocf_exit_reason "Volume group [$VG] has devices 
missing.  Consider majority_pvs=true"
+                       exit $OCF_ERR_GENERIC
                fi
-               ;;
-       esac
+       fi
 
        # Get the access mode from VG metadata and check if it matches the input
        # value. Skip to check "tagging" mode because there's no reliable way to
@@ -601,7 +631,18 @@
 do_activate() {
        do_activate_opt=$1
 
-       if ocf_is_true "$OCF_RESKEY_partial_activation" ; then
+       if ocf_is_true "$OCF_RESKEY_degraded_activation" ; then
+               # This will allow a RAID LV to be activated if sufficient
+               # devices are available to allow the LV to be usable
+               do_activate_opt="${do_activate_opt} --activationmode degraded"
+
+       elif ocf_is_true "$OCF_RESKEY_partial_activation" ; then
+               # This will allow a mirror LV to be activated if any
+               # devices are missing, but the activated LV may not be
+               # usable, so it is not recommended.  Also, other LV
+               # types without data redundancy will be activated
+               # when partial is set.
+               # RAID LVs and degraded_activation should be used instead.
                do_activate_opt="${do_activate_opt} --partial"
        fi
 
@@ -661,11 +702,16 @@
 }
 
 systemid_activate() {
+       majority_opt=""
        set_autoactivation=0
        cur_systemid=$(vgs --foreign --noheadings -o systemid ${VG} | tr -d 
'[:blank:]')
 
+       if ocf_is_true "$OCF_RESKEY_majority_pvs" ; then
+               vgchange --help | grep '\--majoritypvs' >/dev/null 2>&1 && 
majority_opt="--majoritypvs"
+       fi
+
        # Put our system ID on the VG
-       vgchange -y --config "local/extra_system_ids=[\"${cur_systemid}\"]" \
+       vgchange -y $majority_opt --config 
"local/extra_system_ids=[\"${cur_systemid}\"]" \
                --systemid ${SYSTEM_ID} ${VG}
        vgchange --help | grep '\--setautoactivation' >/dev/null 2>&1 && 
set_autoactivation=1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/ZFS 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/ZFS
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/ZFS     2023-03-13 
15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/ZFS     2023-05-01 
13:54:32.000000000 +0200
@@ -83,7 +83,16 @@
 }
 
 zpool_is_imported () {
-       zpool list -H "$OCF_RESKEY_pool" > /dev/null
+       # Check if ZFS kstats exists
+       if [ -d  /proc/spl/kstat/zfs/ ] ; then
+               # Check the existence of kstats for the pool. If the stats 
exists, the pool was imported.
+               [ -d  /proc/spl/kstat/zfs/"${OCF_RESKEY_pool}" ]
+               rc=$? 
+       else
+               # If ZFS kstats do not exists, fallback to the standard check
+               rc=$(zpool list -H "$OCF_RESKEY_pool" > /dev/null)
+       fi
+       return $rc
 }
 
 # Forcibly imports a ZFS pool, mounting all of its auto-mounted filesystems
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/azure-events-az.in 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/azure-events-az.in
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/azure-events-az.in      
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/azure-events-az.in      
2023-05-01 13:54:32.000000000 +0200
@@ -298,7 +298,7 @@
                Get the current Pacemaker transition summary (used to check if 
all resources are stopped when putting a node standby)
                """
                # <tniek> Is a global crm_simulate "too much"? Or would it be 
sufficient it there are no planned transitions for a particular node?
-               # # crm_simulate -Ls
+               # # crm_simulate -LS
                #       Transition Summary:
                #        * Promote rsc_SAPHana_HN1_HDB03:0      (Slave -> 
Master hsr3-db1)
                #        * Stop    rsc_SAPHana_HN1_HDB03:1      (hsr3-db0)
@@ -308,15 +308,16 @@
                #       Transition Summary:
                ocf.logger.debug("transitionSummary: begin")
 
-               summary = clusterHelper._exec("crm_simulate", "-Ls")
+               summary = clusterHelper._exec("crm_simulate", "-LS")
                if not summary:
                        ocf.logger.warning("transitionSummary: could not load 
transition summary")
-                       return False
+                       return ""
                if summary.find("Transition Summary:") < 0:
-                       ocf.logger.warning("transitionSummary: received 
unexpected transition summary: %s" % summary)
-                       return False
-               summary = summary.split("Transition Summary:")[1]
-               ret = summary.split("\n").pop(0)
+                       ocf.logger.debug("transitionSummary: no transactions: 
%s" % summary)
+                       return ""
+               j=summary.find('Transition Summary:') + len('Transition 
Summary:')
+               l=summary.lower().find('executing cluster transition:')
+               ret = list(filter(str.strip, summary[j:l].split("\n")))
 
                ocf.logger.debug("transitionSummary: finished; return = %s" % 
str(ret))
                return ret
@@ -768,4 +769,4 @@
        agent.run()
 
 if __name__ == '__main__':
-       main()
\ No newline at end of file
+       main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/azure-events.in 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/azure-events.in
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/azure-events.in 
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/azure-events.in 
2023-05-01 13:54:32.000000000 +0200
@@ -297,7 +297,7 @@
                Get the current Pacemaker transition summary (used to check if 
all resources are stopped when putting a node standby)
                """
                # <tniek> Is a global crm_simulate "too much"? Or would it be 
sufficient it there are no planned transitions for a particular node?
-               # # crm_simulate -Ls
+               # # crm_simulate -LS
                #       Transition Summary:
                #        * Promote rsc_SAPHana_HN1_HDB03:0      (Slave -> 
Master hsr3-db1)
                #        * Stop    rsc_SAPHana_HN1_HDB03:1      (hsr3-db0)
@@ -307,15 +307,16 @@
                #       Transition Summary:
                ocf.logger.debug("transitionSummary: begin")
 
-               summary = clusterHelper._exec("crm_simulate", "-Ls")
+               summary = clusterHelper._exec("crm_simulate", "-LS")
                if not summary:
                        ocf.logger.warning("transitionSummary: could not load 
transition summary")
-                       return False
+                       return ""
                if summary.find("Transition Summary:") < 0:
-                       ocf.logger.warning("transitionSummary: received 
unexpected transition summary: %s" % summary)
-                       return False
-               summary = summary.split("Transition Summary:")[1]
-               ret = summary.split("\n").pop(0)
+                       ocf.logger.debug("transitionSummary: no transactions: 
%s" % summary)
+                       return ""
+               j=summary.find('Transition Summary:') + len('Transition 
Summary:')
+               l=summary.lower().find('executing cluster transition:')
+               ret = list(filter(str.strip, summary[j:l].split("\n")))
 
                ocf.logger.debug("transitionSummary: finished; return = %s" % 
str(ret))
                return ret
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/ethmonitor 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/ethmonitor
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/ethmonitor      
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/ethmonitor      
2023-05-01 13:54:32.000000000 +0200
@@ -271,6 +271,9 @@
                        validate-all)
                                ocf_exit_reason "Interface $NIC does not exist"
                                exit $OCF_ERR_CONFIGURED;;
+                       monitor)
+                               ocf_log debug "Interface $NIC does not exist"
+                               ;;
                        *)      
                                ## It might be a bond interface which is 
temporarily not available, therefore we want to continue here
                                ocf_log warn "Interface $NIC does not exist"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/exportfs 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/exportfs
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/exportfs        
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/exportfs        
2023-05-01 13:54:32.000000000 +0200
@@ -82,7 +82,7 @@
 <content type="string" />
 </parameter>
 
-<parameter name="fsid" unique="0" required="1">
+<parameter name="fsid" unique="0" required="0">
 <longdesc lang="en">
 The fsid option to pass to exportfs. This can be a unique positive
 integer, a UUID (assuredly sans comma characters), or the special string
@@ -185,6 +185,8 @@
 
 reset_fsid() {
        CURRENT_FSID=$OCF_RESKEY_fsid
+       [ -z "$CURRENT_FSID" ] && CURRENT_FSID=`echo "$OCF_RESKEY_options" | 
sed -n 's/.*fsid=\([^,]*\).*/\1/p'`
+       echo $CURRENT_FSID
 }
 bump_fsid() {
        CURRENT_FSID=$((CURRENT_FSID+1))
@@ -322,7 +324,7 @@
        if echo "$opts" | grep fsid >/dev/null; then
                #replace fsid in options list
                opts=`echo "$opts" | sed "s,fsid=[^,]*,fsid=$(get_fsid),g"`
-       else
+       elif [ -n "$OCF_RESKEY_fsid" ]; then
                #tack the fsid option onto our options list.
                opts="${opts}${sep}fsid=$(get_fsid)"
        fi
@@ -448,8 +450,8 @@
                ocf_exit_reason "$OCF_RESKEY_fsid cannot contain a comma"
                return $OCF_ERR_CONFIGURED
        fi
-       if [ $NUMDIRS -gt 1 ] &&
-                       ! ocf_is_decimal "$OCF_RESKEY_fsid"; then
+       if [ $NUMDIRS -gt 1 ] && [ -n "$(reset_fsid)" ] &&
+                       ! ocf_is_decimal "$(reset_fsid)"; then
                ocf_exit_reason "use integer fsid when exporting multiple 
directories"
                return $OCF_ERR_CONFIGURED
        fi
@@ -485,6 +487,6 @@
 OCF_RESKEY_directory="${directories%% }"
 
 NUMDIRS=`echo "$OCF_RESKEY_directory" | wc -w`
-OCF_REQUIRED_PARAMS="directory fsid clientspec"
+OCF_REQUIRED_PARAMS="directory clientspec"
 OCF_REQUIRED_BINARIES="exportfs"
 ocf_rarun $*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/mysql 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/mysql
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/mysql   2023-03-13 
15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/mysql   2023-05-01 
13:54:32.000000000 +0200
@@ -757,6 +757,10 @@
         status_loglevel="info"
     fi
 
+    if ocf_is_ms; then
+        OCF_CHECK_LEVEL=10
+    fi
+
     mysql_common_status $status_loglevel
     rc=$?
 
@@ -777,7 +781,13 @@
         return $rc
     fi
 
-    if [ $OCF_CHECK_LEVEL -gt 0 -a -n "$OCF_RESKEY_test_table" ]; then
+    if [ $OCF_CHECK_LEVEL -eq 10 ]; then
+        if [ -z "$OCF_RESKEY_test_table" ]; then
+            ocf_exit_reason "test_table not set"
+            return $OCF_ERR_CONFIGURED
+
+        fi
+
         # Check if this instance is configured as a slave, and if so
         # check slave status
         if is_slave; then
@@ -795,18 +805,16 @@
             ocf_exit_reason "Failed to select from $test_table";
             return $OCF_ERR_GENERIC;
         fi
-    else
-        # In case no exnteded tests are enabled and we are in master/slave 
mode _always_ set the master score to 1 if we reached this point
-        ocf_is_ms && ocf_promotion_score -v 1
     fi
 
     if ocf_is_ms && ! get_read_only; then
         ocf_log debug "MySQL monitor succeeded (master)";
         # Always set master score for the master
-        ocf_promotion_score -v 2
+        ocf_promotion_score -v $((${OCF_RESKEY_max_slave_lag}+1))
         return $OCF_RUNNING_MASTER
     else
         ocf_log debug "MySQL monitor succeeded";
+        ocf_is_ms && ocf_promotion_score -v 1
         return $OCF_SUCCESS
     fi
 }
@@ -873,7 +881,6 @@
         # preference set by the administrator. We choose a low
         # greater-than-zero preference.
         ocf_promotion_score -v 1
-
     fi
 
     # Initial monitor action
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/nfsserver 
new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/nfsserver
--- old/resource-agents-4.12.0+git10.fe1a2f88/heartbeat/nfsserver       
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/heartbeat/nfsserver       
2023-05-01 13:54:32.000000000 +0200
@@ -455,7 +455,7 @@
 prepare_directory ()
 {
        if [ -z "$fp" ]; then
-               return
+               fp="/var/lib/nfs"
        fi
 
        [ -d "$OCF_RESKEY_rpcpipefs_dir" ] || mkdir -p $OCF_RESKEY_rpcpipefs_dir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.12.0+git10.fe1a2f88/resource-agents.spec.in 
new/resource-agents-4.12.0+git30.7fd7c8fa/resource-agents.spec.in
--- old/resource-agents-4.12.0+git10.fe1a2f88/resource-agents.spec.in   
2023-03-13 15:12:01.000000000 +0100
+++ new/resource-agents-4.12.0+git30.7fd7c8fa/resource-agents.spec.in   
2023-05-01 13:54:32.000000000 +0200
@@ -232,13 +232,7 @@
        --with-pkg-name=%{name} \
        --with-ras-set=%{rasset}
 
-%if %{defined jobs}
-JFLAGS="$(echo '-j%{jobs}')"
-%else
-JFLAGS="$(echo '%{_smp_mflags}')"
-%endif
-
-make $JFLAGS
+make %{_smp_mflags}
 
 %install
 rm -rf %{buildroot}

Reply via email to