Hello community,

here is the log from the commit of package ha-cluster-bootstrap for 
openSUSE:Factory checked in at 2015-05-22 09:53:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ha-cluster-bootstrap (Old)
 and      /work/SRC/openSUSE:Factory/.ha-cluster-bootstrap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ha-cluster-bootstrap"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ha-cluster-bootstrap/ha-cluster-bootstrap.changes    
    2015-05-18 22:21:21.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.ha-cluster-bootstrap.new/ha-cluster-bootstrap.changes
   2015-05-22 09:53:29.000000000 +0200
@@ -1,0 +2,10 @@
+Thu May 21 08:01:56 UTC 2015 - [email protected]
+
+- Only check for pseudo-tty if in interactive mode (bnc#892702)
+- Add administration Virtual IP (fate#318549)
+- Only check watchdog if potentially using SBD
+- Add 0001-Only-check-for-pseudy-tty-if-in-interactive-mode-bnc.patch
+- Add 0002-Add-administration-Virtual-IP-fate-318549.patch
+- Add 0003-Only-check-watchdog-if-potentially-using-SBD.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Only-check-for-pseudy-tty-if-in-interactive-mode-bnc.patch
  0002-Add-administration-Virtual-IP-fate-318549.patch
  0003-Only-check-watchdog-if-potentially-using-SBD.patch

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

Other differences:
------------------
++++++ ha-cluster-bootstrap.spec ++++++
--- /var/tmp/diff_new_pack.EHxm0y/_old  2015-05-22 09:53:30.000000000 +0200
+++ /var/tmp/diff_new_pack.EHxm0y/_new  2015-05-22 09:53:30.000000000 +0200
@@ -25,6 +25,12 @@
 Group:          Productivity/Clustering/HA
 Url:            https://github.com/tserong/sleha-bootstrap
 Source:         sleha-bootstrap-%{version}.tar.bz2
+# PATCH-FIX-UPSTREAM: Only check for pseudo-tty if in interactive mode 
(bnc#892702)
+Patch1:         0001-Only-check-for-pseudy-tty-if-in-interactive-mode-bnc.patch
+# PATCH-FEATURE-UPSTREAM: Add administration Virtual IP (fate#318549)
+Patch2:         0002-Add-administration-Virtual-IP-fate-318549.patch
+# PATCH-FIX-UPSTREAM: Only check watchdog if potentially using SBD
+Patch3:         0003-Only-check-watchdog-if-potentially-using-SBD.patch
 
 Requires:       csync2
 Requires:       hawk
@@ -43,6 +49,9 @@
 
 %prep
 %setup -n sleha-bootstrap-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 %build
 
 %install

++++++ 0001-Only-check-for-pseudy-tty-if-in-interactive-mode-bnc.patch ++++++
>From 57991c77157f7a2e9bc7e2211c69ef45cf2b70c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Thu, 21 May 2015 09:54:41 +0200
Subject: [PATCH 1/3] Only check for pseudy-tty if in interactive mode
 (bnc#892702)

---
 scripts/ha-cluster-functions | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/ha-cluster-functions b/scripts/ha-cluster-functions
index d82290a..f8f2d42 100644
--- a/scripts/ha-cluster-functions
+++ b/scripts/ha-cluster-functions
@@ -472,6 +472,8 @@ check_prereqs()
 
 check_tty()
 {
+       $YES_TO_ALL && return 0
+
        # Check for pseudo-tty: Cannot display read prompts without a TTY 
(bnc#892702)
        if ! tty -s; then
                error "No pseudo-tty detected! Use -t option to ssh if calling 
remotely."
-- 
2.3.7

++++++ 0002-Add-administration-Virtual-IP-fate-318549.patch ++++++
>From 6726b9eb9dac5cbe3382c76db76ece5825efbcc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Fri, 8 May 2015 18:26:22 +0200
Subject: [PATCH 2/3] Add administration Virtual IP (fate#318549)

---
 scripts/ha-cluster-init | 55 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 51 insertions(+), 4 deletions(-)

diff --git a/scripts/ha-cluster-init b/scripts/ha-cluster-init
index ab2e582..a83abb3 100755
--- a/scripts/ha-cluster-init
+++ b/scripts/ha-cluster-init
@@ -30,6 +30,7 @@ declare SHARED_DEVICE
 declare SBD_DEVICE
 declare OCFS2_DEVICE
 declare TEMPLATE
+declare ADMIN_IP
 
 usage()
 {
@@ -53,6 +54,9 @@ Options for ocfs2 template:
                 "storage" stage)
     -o <dev>    Block device to use for OCFS2 (only used in "vgfs" stage)
 
+Options for administration IP template:
+    -A <ip>     IP address to use for the administration virtual IP
+
 Stage can be one of:
     ssh         Create SSH keys for passwordless SSH between cluster nodes
     csync2      Configure csync2
@@ -62,6 +66,7 @@ Stage can be one of:
     cluster     Bring the cluster online
     vgfs        Create volume group and filesystem (ocfs2 template only,
                 requires -o <dev>)
+    admin       Create administration virtual IP (optional)
 
 Note:
   - If stage is not specified, the script will run through each stage
@@ -592,12 +597,52 @@ END
        wait_for_resource "Waiting for /srv/clusterfs to be mounted" clusterfs:0
 }
 
+init_admin()
+{
+       # Skip this section when -y is passed
+       # unless $ADMIN_IP is set
+       $YES_TO_ALL && [ -z $ADMIN_IP ] && return
+
+       local adminaddr
+
+       if [ -z $ADMIN_IP ]; then
+               status "
+Configure Administration IP Address:
+  Optionally configure an administration virtual IP
+  address. The purpose of this IP address is to
+  provide a single IP that can be used to interact
+  with the cluster, rather than using the IP address
+  of any specific cluster node.
+"
+               if ! confirm "Do you wish to configure an administration IP?"; 
then
+                       return
+               fi
+
+               adminaddr=$(prompt_for_string \
+                                               'Administration Virtual IP 
(e.g.: 192.168.1.200)' \
+                                               '([0-9]+\.){3}[0-9]+' "")
+               [ -z "$adminaddr" ] && error 'No value for admin address'
+       else
+               adminaddr="$ADMIN_IP"
+       fi
+
+       local tmp_conf=/tmp/crm.$$
+       cat > $tmp_conf <<END
+primitive admin_addr ocf:heartbeat:IPaddr2 \\
+       params ip="$adminaddr" \\
+       op monitor interval="10" timeout="20"
+END
+       crm_configure_load update $tmp_conf
+
+       wait_for_resource "Waiting for Admin Address" admin_addr
+}
+
 #------------------------------------------------------------------------------
 
 # for --help option
 [ "$1" == "--help" ] && usage
 
-while getopts 'hi:o:p:qs:t:y' o; do
+while getopts 'hi:o:p:qs:t:A:y' o; do
        case $o in
        h) usage;;
        i) NET_IF=$OPTARG;;
@@ -606,6 +651,7 @@ while getopts 'hi:o:p:qs:t:y' o; do
        q) BE_QUIET=true;;
        s) SBD_DEVICE=$OPTARG;;
        t) TEMPLATE=$OPTARG;;
+       A) ADMIN_IP=$OPTARG;;
        y) YES_TO_ALL=true;;
        esac
 done
@@ -619,8 +665,8 @@ stage=$1 ; shift
 # just in case this breaks ha-cluster-join on another node).
 systemctl -q is-active corosync.service
 rc=$?
-if [ "$stage" == "vgfs" ]; then
-       [ $rc -ne 0 ] && error "Cluster is inactive  - can't run vgfs stage"
+if [ "$stage" == "vgfs" -o "$stage" == "admin" ]; then
+       [ $rc -ne 0 ] && error "Cluster is inactive  - can't run $stage stage"
 elif [ "$stage" != "ssh" -a "$stage" != "ssh_remote" -a "$stage" != "csync2" 
-a "$stage" != "csync2_remote" ]; then
        [ $rc -eq 0 ] && error "Cluster is currently active - can't run"
 fi
@@ -638,7 +684,7 @@ ocfs2)      ;;
 esac
 
 case $stage in
-ssh|ssh_remote|csync2|csync2_remote|corosync|storage|sbd|cluster|vgfs)
+ssh|ssh_remote|csync2|csync2_remote|corosync|storage|sbd|cluster|vgfs|admin)
        init
        # $2 == nasty hack to pick up IP arg to csync2_remote (not strictly
        # necessary currently, as we're not auto-updating /etc/hosts)
@@ -655,6 +701,7 @@ 
ssh|ssh_remote|csync2|csync2_remote|corosync|storage|sbd|cluster|vgfs)
        init_sbd
        init_cluster
        [ "$TEMPLATE" == "ocfs2" ] && init_vgfs
+       init_admin
        ;;
 *)     echo -e "Invalid stage ($1)\n"
        usage
-- 
2.3.7

++++++ 0003-Only-check-watchdog-if-potentially-using-SBD.patch ++++++
>From 1ae9a9ed0e12de3dac8a45599de132519c419e53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Fri, 8 May 2015 19:16:42 +0200
Subject: [PATCH 3/3] Only check watchdog if potentially using SBD

---
 scripts/ha-cluster-functions | 9 ++++++---
 scripts/ha-cluster-init      | 2 +-
 scripts/ha-cluster-join      | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/scripts/ha-cluster-functions b/scripts/ha-cluster-functions
index f8f2d42..6b42f3a 100644
--- a/scripts/ha-cluster-functions
+++ b/scripts/ha-cluster-functions
@@ -458,9 +458,12 @@ check_prereqs()
                warned=1
        fi
 
-       if ! check_watchdog ; then
-               warn "No watchdog device found. If SBD is used, the cluster 
will be unable to start without a watchdog."
-               warned=1
+       local stage="$1"
+       if [ -z "$stage" -o "$stage" == "join" -o "$stage" == "sbd" ]; then
+               if ! check_watchdog ; then
+                       warn "No watchdog device found. If SBD is used, the 
cluster will be unable to start without a watchdog."
+                       warned=1
+               fi
        fi
 
        if [ $warned -ne 0 ]; then
diff --git a/scripts/ha-cluster-init b/scripts/ha-cluster-init
index a83abb3..e1cd774 100755
--- a/scripts/ha-cluster-init
+++ b/scripts/ha-cluster-init
@@ -674,7 +674,7 @@ fi
 # Need hostname resolution to work, want NTP (but don't block ssh_remote or 
csync2_remote)
 if [ "$stage" != "ssh_remote" -a "$stage" != "csync2_remote" ]; then
        check_tty
-       check_prereqs
+       check_prereqs "$stage"
 fi
 
 case $TEMPLATE in
diff --git a/scripts/ha-cluster-join b/scripts/ha-cluster-join
index eca2cf8..0e49a97 100755
--- a/scripts/ha-cluster-join
+++ b/scripts/ha-cluster-join
@@ -260,7 +260,7 @@ fi
 
 check_tty
 # Need hostname resolution to work, want NTP
-check_prereqs
+check_prereqs "join"
 
 case $1 in
 ssh|csync2|ssh_merge|cluster)
-- 
2.3.7


Reply via email to