Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2014-06-01 18:57:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents"
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes 2014-05-26 10:27:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2014-06-01 18:57:19.000000000 +0200
@@ -1,0 +2,18 @@
+Fri May 30 13:25:09 UTC 2014 - lwang@suse.com
+
+- sg_persist: change sg_persist ocft not configure isci and let user prepare it manually
+ add sg_persist-ocft-not-configure-iscsi.patch
+
+-------------------------------------------------------------------
+Fri May 30 12:07:13 UTC 2014 - lwang@suse.com
+
+- bnc#880726: sg_persist devs required and not defined when define by configuration file
+ add fix-sg_persist-devs-required-and-not-defined.patch
+
+-------------------------------------------------------------------
+Tue May 27 09:28:08 UTC 2014 - lwang@suse.com
+
+- bnc#879881: fix sg_persit demote error
+ add fix-sg_persist-demote-error.patch
+
+-------------------------------------------------------------------
New:
----
fix-sg_persist-demote-error.patch
fix-sg_persist-devs-required-and-not-defined.patch
sg_persist-ocft-not-configure-iscsi.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.vqtRmL/_old 2014-06-01 18:57:20.000000000 +0200
+++ /var/tmp/diff_new_pack.vqtRmL/_new 2014-06-01 18:57:20.000000000 +0200
@@ -71,6 +71,12 @@
Patch16: 0001-Medium-mysql-Update-mysql-with-more-sensible-default.patch
# PATCH-FIX-UPSTREAM: sg_persist: fix commented by Lars
Patch17: fix-sg_persist-commented-byLars.patch
+# PATCH: sg_persist: fix demote error
+Patch18: fix-sg_persist-demote-error.patch
+# sg_persist: fix devs required and not defined error when defined by configuration file(bnc#880726)
+Patch19: fix-sg_persist-devs-required-and-not-defined.patch
+# sg_persist: change sg_persist ocft not configure isci and let user prepare it manually
+Patch20: sg_persist-ocft-not-configure-iscsi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: heartbeat-resources
@@ -153,6 +159,9 @@
%patch14 -p1
%patch16 -p1
%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
###########################################################
%build
++++++ fix-sg_persist-demote-error.patch ++++++
Index: resource-agents-3.9.5+git404/heartbeat/sg_persist
===================================================================
--- resource-agents-3.9.5+git404.orig/heartbeat/sg_persist
+++ resource-agents-3.9.5+git404/heartbeat/sg_persist
@@ -653,7 +653,7 @@ sg_persist_action_promote() {
}
sg_persist_action_demote() {
- case $RESERVATION_TYPER in
+ case $RESERVATION_TYPE in
1|3|5|6)
if [ ${#RESERVED_DEVS[*]} -eq 0 ]; then
ocf_log info "$RESOURCE demote: already slave"
++++++ fix-sg_persist-devs-required-and-not-defined.patch ++++++
Index: resource-agents-3.9.5+git404/heartbeat/sg_persist
===================================================================
--- resource-agents-3.9.5+git404.orig/heartbeat/sg_persist
+++ resource-agents-3.9.5+git404/heartbeat/sg_persist
@@ -1,3 +1,4 @@
+
#!/bin/bash
#
#
@@ -114,7 +115,7 @@ Resorce init functions for several sg_pe
<content type="string" default="/etc/sg_persist.conf"/>
</parameter>
-<parameter name="devs" unique="0" required="1">
+<parameter name="devs" unique="0" required="0">
<longdesc lang="en">
Device list. Shell wildcars are allowed.
</longdesc>
@@ -261,28 +262,36 @@ sg_persist_init() {
# default configure file path
SG_PERSIST_CONF="${OCF_RESKEY_config_file:=/etc/sg_persist.conf}"
- if [ -f "$SG_PERSIST_CONF" ]; then
- sg_persist_read_config
- fi
-
# no default value for device list
- DEVS=${OCF_RESKEY_devs:=""}
+ devs=""
# default number of required devices
- REQUIRED_DEVS_NOF=${OCF_RESKEY_required_devs_nof:=1}
+ required_devs_nof=1
# default reservation type
- RESERVATION_TYPE=${OCF_RESKEY_reservation_type:=1}
+ reservation_type=1
# default master score base
- MASTER_SCORE_BASE=${OCF_RESKEY_master_score_base:=0}
+ master_score_base=0
# default device factor for master score
- MASTER_SCORE_DEV_FACTOR=${OCF_RESKEY_master_score_dev_factor:=100}
+ master_score_dev_factor=100
# default delay for master score
- MASTER_SCORE_DELAY=${OCF_RESKEY_master_score_delay:=30}
-
+ master_score_delay=30
+
+ if [ -f "$SG_PERSIST_CONF" ]
+ then
+ sg_persist_read_config
+ fi
+
+ DEVS=${OCF_RESKEY_devs:=$devs}
+ REQUIRED_DEVS_NOF=${OCF_RESKEY_required_devs_nof:=$required_devs_nof}
+ RESERVATION_TYPE=${OCF_RESKEY_reservation_type:=$reservation_type}
+ MASTER_SCORE_BASE=${OCF_RESKEY_master_score_base:=$master_score_base}
+ MASTER_SCORE_DEV_FACTOR=${OCF_RESKEY_master_score_dev_factor:=$master_score_dev_factor}
+ MASTER_SCORE_DELAY=${OCF_RESKEY_master_score_delay:=$master_score_delay}
+
ocf_log debug "$RESOURCE: DEVS=$DEVS"
ocf_log debug "$RESOURCE: REQUIRED_DEVS_NOF=$REQUIRED_DEVS_NOF"
ocf_log debug "$RESOURCE: RESERVATION_TYPE=$RESERVATION_TYPE"
@@ -588,7 +597,7 @@ sg_persist_action_monitor() {
fi
if [ ${#REGISTERED_DEVS[*]} -eq ${#WORKING_DEVS[*]} ]; then
- if [ $RESERVATION_TYPE -eq 7 ] || [ $RESERVATION_TYPE -eq 8]; then
+ if [ $RESERVATION_TYPE -eq 7 ] || [ $RESERVATION_TYPE -eq 8 ]; then
if [ ${#DEVS_WITH_RESERVATION[*]} -gt 0 ]; then
return $OCF_RUNNING_MASTER
else
++++++ sg_persist-ocft-not-configure-iscsi.patch ++++++
Index: resource-agents-3.9.5+git404/tools/ocft/sg_persist
===================================================================
--- resource-agents-3.9.5+git404.orig/tools/ocft/sg_persist
+++ resource-agents-3.9.5+git404/tools/ocft/sg_persist
@@ -1,77 +1,38 @@
# sg_persist
+# Before use sg_persist ocft test case you have to prepare to make pacemaker
+# can be started successfully because sg_persist RA needs to use the result of
+# `crm_node -i` as sg_persist register key.
CONFIG
Agent sg_persist
AgentRoot /usr/lib/ocf/resource.d/heartbeat
- InstallPackage open-iscsi
- InstallPackage iscsitarget
InstallPackage sg3_utils
HangTimeout 20
VARIABLE
- OCFT_disk=/var/run/resource-agents/ocft-sg_disk
- OCFT_target="iqn.2013-12.ocft.localhost:disk0"
+
+ #Please set the disk you want to test for example "/dev/sdd"
+ OCFT_sg_disk=
+
OCFT_sg_conf="/tmp/sg_persist.conf"
- # please modify it by yourself.
+ # please set the IP addrees of the other server.
IP_2=
- OCFT_portal="$IP_2:3260"
SETUP-AGENT
- # create an iscsi target at node IP_2
- ifconfig|grep -q $IP_2
- if [ $? -eq 0 ]
- then
- dd if=/dev/zero of=$OCFT_disk bs=1024k count=1 2>/dev/null
- echo "Target $OCFT_target" >> /etc/iet/ietd.conf
- echo " Lun 0 Path=$OCFT_disk,Type=fileio" >> /etc/iet/ietd.conf
- /etc/init.d/iscsitarget restart 2>/dev/null
- fi
-
- # connect to the target
- iscsiadm --mode discoverydb --type sendtargets --portal $IP_2 --discover 2>/dev/null
- iscsiadm --mode node --targetname $OCFT_target --portal $OCFT_portal --login 2>/dev/null
-
# start pacemaker to get node_id through crm_node -i
systemctl start pacemaker
- # get the disk attached through target name.
- get_scsi_disk_attached()
- {
- found=0
- while read line
- do
- if [ "$found" = "0" ];then
- echo $line|grep -q "$1"
- [ $? -eq 0 ] && found=1
- fi
-
- if [ "$found" = "1" ];then
- echo $line|grep -q "Attached scsi disk"
- if [ $? = 0 ];then
- found=0;
- disk_attached=`echo $line|tr -s ' '|cut -d' ' -f4`
- echo "$disk_attached"
- break
- fi
- fi
- done <<< "`iscsiadm -m session -P3`"
- }
-
- OCFT_sg_disk=`get_scsi_disk_attached $OCFT_target`
-
cat > $OCFT_sg_conf <