Hello community,
here is the log from the commit of package ha-cluster-bootstrap for
openSUSE:Factory checked in at 2016-03-07 13:24:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-11-02 12:55:21.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.ha-cluster-bootstrap.new/ha-cluster-bootstrap.changes
2016-03-07 13:24:47.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Feb 24 08:49:46 UTC 2016 - [email protected]
+
+- Update to version 0.4+git.1456303675.b6eb2b3:
+ + Corosync UDPU support (fate#320604) (fate#320605)
+
+-------------------------------------------------------------------
Old:
----
sleha-bootstrap-0.4+git.1441350120.8e9abbe.tar.bz2
New:
----
sleha-bootstrap-0.4+git.1456303675.b6eb2b3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ha-cluster-bootstrap.spec ++++++
--- /var/tmp/diff_new_pack.1YiZ3l/_old 2016-03-07 13:24:48.000000000 +0100
+++ /var/tmp/diff_new_pack.1YiZ3l/_new 2016-03-07 13:24:48.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ha-cluster-bootstrap
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2011 Novell Inc. All Rights Reserved.
#
# All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
Name: ha-cluster-bootstrap
-Version: 0.4+git.1441350120.8e9abbe
+Version: 0.4+git.1456303675.b6eb2b3
Release: 0
Summary: Pacemaker HA Cluster Bootstrap Tool
License: GPL-2.0
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.1YiZ3l/_old 2016-03-07 13:24:48.000000000 +0100
+++ /var/tmp/diff_new_pack.1YiZ3l/_new 2016-03-07 13:24:48.000000000 +0100
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param
name="url">git://github.com/tserong/sleha-bootstrap.git</param>
- <param
name="changesrevision">8e9abbe8c603cda068aadbb949ebde7996e512c4</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">b6eb2b33223d3ef313a0dc4c96e267e229834e85</param></service></servicedata>
\ No newline at end of file
++++++ sleha-bootstrap-0.4+git.1441350120.8e9abbe.tar.bz2 ->
sleha-bootstrap-0.4+git.1456303675.b6eb2b3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sleha-bootstrap-0.4+git.1441350120.8e9abbe/scripts/ha-cluster-init
new/sleha-bootstrap-0.4+git.1456303675.b6eb2b3/scripts/ha-cluster-init
--- old/sleha-bootstrap-0.4+git.1441350120.8e9abbe/scripts/ha-cluster-init
2015-09-04 11:32:37.000000000 +0200
+++ new/sleha-bootstrap-0.4+git.1456303675.b6eb2b3/scripts/ha-cluster-init
2016-02-24 09:49:46.000000000 +0100
@@ -31,6 +31,7 @@
declare OCFS2_DEVICE
declare TEMPLATE
declare ADMIN_IP
+declare COROSYNC_UNICAST=false
usage()
{
@@ -49,6 +50,11 @@
-t <name> Optionally configure cluster with template 'name'
(currently only "ocfs2" is valid here)
+Options for corosync:
+ -u Configure corosync to communicate over unicast (UDP),
+ and not multicast. Default is multicast unless an
+ environment where multicast cannot be used is detected.
+
Options for ocfs2 template:
-p <dev> Partition this shared storage device (only used in
"storage" stage)
@@ -202,7 +208,92 @@
fi
}
-init_corosync()
+init_corosync_unicast()
+{
+ if $YES_TO_ALL; then
+ status 'Configuring corosync (unicast)'
+ else
+ status "
+Configure Corosync (unicast):
+ This will configure the cluster messaging layer. You will need
+ to specify a network address over which to communicate (default
+ is ${NET_IF}'s network, but you can use the network address of any
+ active interface).
+"
+ fi
+
+ if [ -f "$COROSYNC_CONF" ]; then
+ confirm \
+ "$COROSYNC_CONF already exists - overwrite?" || return
+ fi
+
+ local bindnetaddr=$(prompt_for_string \
+ 'Network address to bind to (e.g.: 192.168.1.0)' \
+ '([0-9]+\.){3}[0-9]+' "$IP_NETWORK")
+ [ -z "$bindnetaddr" ] && error 'No value for bindnetaddr'
+
+ local mcastport=$(prompt_for_string \
+ 'Port' \
+ '[0-9]+' 5405);
+ [ -z "$mcastport" ] && error 'No value for mcastport'
+
+ local tmp_conf=${COROSYNC_CONF}.$$
+ cat > $tmp_conf <<END
+# Please read the corosync.conf.5 manual page
+
+totem {
+ version: 2
+
+ crypto_cipher: none
+ crypto_hash: none
+
+ secauth: off
+ cluster_name: hacluster
+ clear_node_high_bit: yes
+
+ interface {
+ ringnumber: 0
+ bindnetaddr: $bindnetaddr
+ mcastport: $mcastport
+ ttl: 1
+ }
+
+ transport: udpu
+}
+logging {
+ fileline: off
+ to_stderr: no
+ to_logfile: no
+ logfile: /var/log/cluster/corosync.log
+ to_syslog: yes
+ debug: off
+ timestamp: on
+ logger_subsys {
+ subsys: QUORUM
+ debug: off
+ }
+}
+nodelist {
+ node {
+ ring0_addr: $(hostname)
+ nodeid: 1
+ }
+}
+quorum {
+ # Enable and configure quorum subsystem (default: off)
+ # see also corosync.conf.5 and votequorum.5
+ provider: corosync_votequorum
+ expected_votes: 1
+ two_node: 0
+}
+END
+ install_tmp $tmp_conf $COROSYNC_CONF
+ invoke csync2 -m $COROSYNC_CONF
+ invoke csync2 -f $COROSYNC_CONF
+ invoke csync2 -xv $COROSYNC_CONF
+}
+
+init_corosync_multicast()
{
if $YES_TO_ALL; then
status 'Configuring corosync'
@@ -238,19 +329,7 @@
[ -z "$mcastport" ] && error 'No value for mcastport'
local tmp_conf=${COROSYNC_CONF}.$$
-# for now, use our inline corosync.conf to force quorum expected_votes...
-# if grep -q -s '^[[:space:]]*name:[[:space:]]*pacemaker'
${COROSYNC_CONF}.example; then
-# # "name: pacemaker" in corosync example conf is our assumption
-# # that the example is sane, so use it:
-# sed \
-# -e
's/^\([[:space:]]*bindnetaddr:[[:space:]]*\).*/\1'$bindnetaddr'/' \
-# -e
's/^\([[:space:]]*mcastaddr:[[:space:]]*\).*/\1'$mcastaddr'/' \
-# -e
's/^\([[:space:]]*mcastport:[[:space:]]*\).*/\1'$mcastport'/' \
-# /etc/corosync/corosync.conf.example > $tmp_conf
-# else
-# # Fallback to known sane config (defaults from SLE HA 11 SP1
-# # corosync.conf.example.patch)
- cat > $tmp_conf <<END
+ cat > $tmp_conf <<END
# Please read the corosync.conf.5 manual page
totem {
@@ -300,13 +379,23 @@
two_node: 0
}
END
-# fi
install_tmp $tmp_conf $COROSYNC_CONF
invoke csync2 -m $COROSYNC_CONF
invoke csync2 -f $COROSYNC_CONF
invoke csync2 -xv $COROSYNC_CONF
}
+init_corosync()
+{
+ if dmidecode -s system-version | grep '\<.*\.amazon\>'; then
+ init_corosync_unicast
+ elif $COROSYNC_UNICAST; then
+ init_corosync_unicast
+ else
+ init_corosync_multicast
+ fi
+}
+
# Non-generic, i.e. not for use with every type of cluster you can imagine:
# requires shared storage, and specifically configures one block device as
# sbd partition + remainder for OCFS2 filesystem (created later).
@@ -642,7 +731,7 @@
# for --help option
[ "$1" == "--help" ] && usage
-while getopts 'hi:o:p:qs:t:A:y' o; do
+while getopts 'hi:o:p:qs:t:A:yu' o; do
case $o in
h) usage;;
i) NET_IF=$OPTARG;;
@@ -653,6 +742,7 @@
t) TEMPLATE=$OPTARG;;
A) ADMIN_IP=$OPTARG;;
y) YES_TO_ALL=true;;
+ u) COROSYNC_UNICAST=true;;
esac
done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sleha-bootstrap-0.4+git.1441350120.8e9abbe/scripts/ha-cluster-join
new/sleha-bootstrap-0.4+git.1456303675.b6eb2b3/scripts/ha-cluster-join
--- old/sleha-bootstrap-0.4+git.1441350120.8e9abbe/scripts/ha-cluster-join
2015-09-04 11:32:37.000000000 +0200
+++ new/sleha-bootstrap-0.4+git.1456303675.b6eb2b3/scripts/ha-cluster-join
2016-02-24 09:49:46.000000000 +0100
@@ -203,6 +203,11 @@
# If COROSYNC_CONF doesn't exist or is empty, we will fail here.
(bsc#943227)
[ ! -s $COROSYNC_CONF ] && error "$COROSYNC_CONF is not readable.
Please ensure that hostnames are resolvable."
+ # if unicast, we need to add our node to $COROSYNC_CONF
+ if grep nodelist < "$COROSYNC_CONF" >/dev/null 2>&1; then
+ crm corosync add-node "$(hostname)"
+ fi
+
local tmp_conf=${COROSYNC_CONF}.$$
local new_quorum=$(awk -F[^0-9] '/^[[:space:]]*expected_votes/ { print
$NF + 1 };' $COROSYNC_CONF)
local two_node=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sleha-bootstrap-0.4+git.1441350120.8e9abbe/scripts/ha-cluster-remove
new/sleha-bootstrap-0.4+git.1456303675.b6eb2b3/scripts/ha-cluster-remove
--- old/sleha-bootstrap-0.4+git.1441350120.8e9abbe/scripts/ha-cluster-remove
2015-09-04 11:32:37.000000000 +0200
+++ new/sleha-bootstrap-0.4+git.1456303675.b6eb2b3/scripts/ha-cluster-remove
2016-02-24 09:49:46.000000000 +0100
@@ -173,6 +173,11 @@
# for the host that's now gone.
invoke csync2 -R && invoke csync2 -m $CSYNC2_CFG && invoke csync2 -f
$CSYNC2_CFG && invoke csync2 -xv >/dev/null 2>&1 || error "Propagate the file
$CYNC2_CFG failed"
+ # remove node if unicast
+ if grep nodelist < "$COROSYNC_CONF" >/dev/null 2>&1; then
+ crm corosync del-node "$(hostname)"
+ fi
+
# Decrement expected_votes in corosync.conf
# TODO(must): this is rather fragile (see related code in
ha-cluster-join)
local tmp_conf=${COROSYNC_CONF}.$$