Hello community,

here is the log from the commit of package cluster-glue for openSUSE:Factory 
checked in at 2015-10-03 20:30:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cluster-glue (Old)
 and      /work/SRC/openSUSE:Factory/.cluster-glue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cluster-glue"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cluster-glue/cluster-glue.changes        
2015-08-29 20:03:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cluster-glue.new/cluster-glue.changes   
2015-10-03 20:30:03.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Sep 25 09:49:28 UTC 2015 - [email protected]
+
+- Dev: stonith: external/ec2: Be able to omit the "port" option. (bsc#947026) 
(fate#319008)
+- Add 0006-ec2-instance-tag-bsc-947026.patch
+
+-------------------------------------------------------------------

New:
----
  0006-ec2-instance-tag-bsc-947026.patch

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

Other differences:
------------------
++++++ cluster-glue.spec ++++++
--- /var/tmp/diff_new_pack.TlMyAY/_old  2015-10-03 20:30:04.000000000 +0200
+++ /var/tmp/diff_new_pack.TlMyAY/_new  2015-10-03 20:30:04.000000000 +0200
@@ -62,6 +62,8 @@
 Patch9:         0004-low-hb_report-increase-time-to-wait-for-the-logmark.patch
 # PATCH-FIX-OPENSUSE: low: hb_report: Collect libqb version (bsc#943327)
 Patch10:        0005-low-hb_report-collect-libqb-version-bsc-943327.patch
+# PATCH-FIX-UPSTREAM: Dev: stonith: external/ec2: Be able to omit the "port" 
option. (bsc#947026) (fate#319008)
+Patch11:        0006-ec2-instance-tag-bsc-947026.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  OpenIPMI-devel
 BuildRequires:  asciidoc
@@ -174,6 +176,7 @@
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 ###########################################################
 
 %build

++++++ 0006-ec2-instance-tag-bsc-947026.patch ++++++
# HG changeset patch
# User Kazuhiko Higashi <[email protected]>
# Date 1443417289 -32400
# Node ID 70c1608dd39535465b9f04147081436bcc59f611
# Parent  9da0680bc9c0b99eba65b40aac9282a8dd28889a
Dev: stonith: external/ec2: Be able to omit the "port" option.

It changed the following points.

 - the "tag" and the "port" options will be "not" required.

 - if the "port" option is not set, the 2nd argument of ec2 will use as the 
"port".
   - the 2nd argument of ec2 is "node to fence".

 - the "stat" and "status" action will be same the "monitor" action.
   (for do not use the "port" parameter in "stat" action.)

By this modifications, If it is described uname in the Name tag,
the setting of the "tag" and "port" parameters are no longer necessary.

diff -r 9da0680bc9c0 -r 70c1608dd395 lib/plugins/stonith/external/ec2
--- a/lib/plugins/stonith/external/ec2  Wed Mar 11 13:24:25 2015 +0100
+++ b/lib/plugins/stonith/external/ec2  Mon Sep 28 14:14:49 2015 +0900
@@ -47,7 +47,6 @@
 #######################################################################
 
 quiet=0
-port_default=""
 
 instance_not_found=0
 unknown_are_stopped=0
@@ -57,10 +56,9 @@
 
 sleep_time="1"
 
-ec2_tag=${tag}
+[ -n "$tag" ] && ec2_tag="$tag"
 
 : ${ec2_tag=${ec2_tag_default}}
-: ${port=${port_default}}
 
 function usage()
 {
@@ -94,7 +92,7 @@
 {
        cat <<EOF
 <parameters>
-       <parameter name="port" unique="1" required="1">
+       <parameter name="port" unique="1" required="0">
                <content type="string" />
                <shortdesc lang="en">The name/id/tag of a instance to 
control/check</shortdesc>
        </parameter>
@@ -102,7 +100,7 @@
                <content type="string" default="default" />
                <shortdesc lang="en">Use a specific profile from your 
credential file.</shortdesc>
        </parameter>
-       <parameter name="tag" unique="0" required="1">
+       <parameter name="tag" unique="0" required="0">
                <content type="string" default="Name" />
                <shortdesc lang="en">Name of the tag containing the instances 
uname</shortdesc>
        </parameter>
@@ -129,7 +127,7 @@
                <content type="string" default="reboot" />
                <shortdesc lang="en">Fencing Action</shortdesc>
        </parameter>
-       <parameter name="port" unique="1" required="1">
+       <parameter name="port" unique="1" required="0">
                <getopt mixed="-n, --port=[port]" />
                <content type="string" />
                <shortdesc lang="en">The name/id/tag of a instance to 
control/check</shortdesc>
@@ -139,7 +137,7 @@
                <content type="string" default="default" />
                <shortdesc lang="en">Use a specific profile from your 
credential file.</shortdesc>
        </parameter>
-       <parameter name="tag" unique="0" required="1">
+       <parameter name="tag" unique="0" required="0">
                <getopt mixed="-t, --tag=[tag]" />
                <content type="string" default="Name" />
                <shortdesc lang="en">Name of the tag containing the instances 
uname</shortdesc>
@@ -219,6 +217,11 @@
        return $rc
 }
 
+function monitor()
+{
+               # Is the device ok?
+               aws ec2 describe-instances $options | grep INSTANCES &> 
/dev/null
+}
 
 TEMP=`getopt -o qVho:e:p:n:t:U --long 
version,help,action:,port:,option:,profile:,tag:,quiet,unknown-are-stopped \
      -n 'fence_ec2' -- "$@"`
@@ -265,6 +268,7 @@
 done
 
 [ -n "$1" ] && action=$1
+[ -n "$2" ] && node_to_fence=$2
 
 if [ -z "$ec2_profile"]; then
        options="--output text --profile default"
@@ -324,6 +328,10 @@
        exit 1
 fi
 
+if [ -z "$port" ]; then
+       port="$node_to_fence"
+fi
+
 # get target's instance id
 instance=""
 if [ ! -z "$port" ]; then
@@ -376,8 +384,7 @@
                done
        ;;
        monitor)
-               # Is the device ok?
-               aws ec2 describe-instances $options | grep INSTANCES &> 
/dev/null
+               monitor
        ;;
        gethosts|hostlist|list)
                # List of names we know about
@@ -388,7 +395,7 @@
                echo $a
        ;;
        stat|status)
-               instance_status $instance > /dev/null
+               monitor
        ;;
        *) ha_log.sh err "Unknown action: $action"; exit 1;;
 esac

Reply via email to