Hello community,
here is the log from the commit of package booth for openSUSE:Factory checked in at 2014-10-05 20:31:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/booth (Old)
and /work/SRC/openSUSE:Factory/.booth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "booth"
Changes:
--------
--- /work/SRC/openSUSE:Factory/booth/booth.changes 2014-08-25 11:04:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.booth.new/booth.changes 2014-10-05 20:33:12.000000000 +0200
@@ -1,0 +2,17 @@
+Fri Oct 3 14:07:24 UTC 2014 - dmuhamedagic@suse.com
+
+- doc: clarify the meaning of renewal-freq
+- ra: add restart and reload actions (bnc#899244)
+- upstream version: v0.2.0
+
+-------------------------------------------------------------------
+Fri Sep 12 14:42:30 UTC 2014 - dmuhamedagic@suse.com
+
+- doc: add documentation for upgrade from v0.1
+- build: stop arbitrator on update from previous v0.1
+- ra: support the previously released v0.1
+- build: better support for sysv and systemd init files
+- ra: update library location
+- upstream version: 644df54
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ booth.spec ++++++
--- /var/tmp/diff_new_pack.GQJqPd/_old 2014-10-05 20:33:13.000000000 +0200
+++ /var/tmp/diff_new_pack.GQJqPd/_new 2014-10-05 20:33:13.000000000 +0200
@@ -103,9 +103,15 @@
gzip < docs/boothd.8 > %{buildroot}/%{_mandir}/man8/booth.8.gz
ln %{buildroot}/%{_mandir}/man8/booth.8.gz %{buildroot}/%{_mandir}/man8/boothd.8.gz
+%if %{defined _unitdir}
# systemd
-mkdir -p %{buildroot}/usr/lib/systemd/system/
-cp -a conf/booth@.service %{buildroot}/usr/lib/systemd/system/booth@.service
+mkdir -p %{buildroot}/%{_unitdir}
+cp -a conf/booth@.service %{buildroot}/%{_unitdir}/booth@.service
+ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcbooth-arbitrator
+%else
+# sysV init
+ln -s ../../%{_initddir}/booth-arbitrator %{buildroot}%{_sbindir}/rcbooth-arbitrator
+%endif
#install test-parts
@@ -143,16 +149,36 @@
%dir /usr/lib/ocf/resource.d
%dir /usr/lib/ocf/resource.d/pacemaker
%dir %{_sysconfdir}/booth
-%exclude %{_initddir}/booth-arbitrator
+%{_sbindir}/rcbooth-arbitrator
/usr/lib/ocf/resource.d/pacemaker/booth-site
%config %{_sysconfdir}/booth/booth.conf.example
-/usr/lib/systemd/system/booth@.service
+%if %{defined _unitdir}
+%{_unitdir}/booth@.service
+%exclude %{_initddir}/booth-arbitrator
+%else
+%{_initddir}/booth-arbitrator
+%endif
%dir %{_datadir}/booth
%{_datadir}/booth/service-runnable
%doc README COPYING
+%doc README.upgrade-from-v0.1
+
+# this should be preun, but...
+%pre
+# stop the arbitrator if it's the previous paxos version 1.0
+if [ "`booth version | awk '{print $2}'`" = "1.0" ]; then
+ echo "booth v0.1 found"
+ if grep -qs 'ticket.*;' /etc/booth/booth.conf; then
+ echo "Convert the booth configuration in /etc/booth/booth.conf!"
+ fi
+ if ps -o pid,cmd -e | grep -qs "[b]oothd arbitrator"; then
+ rcbooth-arbitrator stop
+ fi
+fi
+exit 0
%package test
Summary: Test scripts for Booth
++++++ booth.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/.git_info new/booth/.git_info
--- old/booth/.git_info 2014-08-21 16:30:28.000000000 +0200
+++ new/booth/.git_info 2014-10-02 10:04:28.000000000 +0200
@@ -1 +1 @@
-v0.1.7-321-g063bc2c
+v0.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/Makefile.am new/booth/Makefile.am
--- old/booth/Makefile.am 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/Makefile.am 2014-10-02 09:19:51.000000000 +0200
@@ -43,7 +43,7 @@
config.guess config.sub missing install-sh \
autoheader automake autoconf test_lense.sh
-dist_doc_DATA = README COPYING
+dist_doc_DATA = README COPYING README.upgrade-from-v0.1
notrans_dist_man8_MANS = docs/boothd.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/README.upgrade-from-v0.1 new/booth/README.upgrade-from-v0.1
--- old/booth/README.upgrade-from-v0.1 1970-01-01 01:00:00.000000000 +0100
+++ new/booth/README.upgrade-from-v0.1 2014-10-02 09:19:51.000000000 +0200
@@ -0,0 +1,57 @@
+Notes on upgrade from PAXOS booth v0.1
+======================
+
+Booth v0.1 was a booth version based on the PAXOS algorithm. The
+current booth v0.2 is loosely based on raft and incompatible
+with the one running v0.1. Therefore, rolling upgrades are not
+possible.
+
+Due to the new multi-tenancy feature, the new arbitrator init
+script cannot stop or test status of the paxos v0.1 arbitrator.
+On upgrade to v0.2, the arbitrator, if running, will be stopped.
+
+The OCF resource-agent ocf:pacemaker:booth-site is capable of
+stopping and monitoring the booth v0.1 site daemon.
+
+Update procedure
+----------------
+
+The recommended procedure for update from the paxos booth to the
+new booth version is as follows:
+
+- convert the configuration file /etc/booth/booth.conf on all
+ nodes and arbitrators to the new syntax
+
+- update booth on all arbitrators and start them
+
+- update booth on all nodes and restart the resource:
+
+ # crm resource restart booth
+
+Configuration file syntax changes
+----------------
+
+.Note
+If you didn't specify expiry time or weights different from the
+defaults, then you can skip this section and use the old
+'booth.conf'.
+
+The new booth configuration has many more options for tickets
+and the syntax for 'ticket' got changed. Whereas previously the
+optional expiry time and weights could be specified by appending
+them to the ticket name with a ';' as a separator, the new syntax
+has separate tokens for all ticket options.
+
+For instance, this ticket specification:
+
+ ticket="tkt-A;600;1,2,2"
+
+looks in the new syntax like this:
+
+ ticket="tkt-A"
+ expire="600"
+ weights="1,2,2"
+
+See the 'booth(8)' man page for more details.
+
+# vim: set ft=asciidoc :
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/booth.spec new/booth/booth.spec
--- old/booth/booth.spec 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/booth.spec 2014-10-02 09:19:51.000000000 +0200
@@ -79,9 +79,15 @@
gzip < docs/boothd.8 > %{buildroot}/%{_mandir}/man8/booth.8.gz
ln %{buildroot}/%{_mandir}/man8/booth.8.gz %{buildroot}/%{_mandir}/man8/boothd.8.gz
+%if %{defined _unitdir}
# systemd
-mkdir -p %{buildroot}/usr/lib/systemd/system/
-cp -a conf/booth@.service %{buildroot}/usr/lib/systemd/system/booth@.service
+mkdir -p %{buildroot}/%{_unitdir}
+cp -a conf/booth@.service %{buildroot}/%{_unitdir}/booth@.service
+ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcbooth-arbitrator
+%else
+# sysV init
+ln -s ../../%{_initddir}/booth-arbitrator %{buildroot}%{_sbindir}/rcbooth-arbitrator
+%endif
#install test-parts
@@ -101,22 +107,42 @@
%defattr(-,root,root,-)
%{_sbindir}/booth
%{_sbindir}/boothd
-%{_initrddir}/booth-arbitrator
%{_mandir}/man8/booth.8.gz
%{_mandir}/man8/boothd.8.gz
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
%dir /usr/lib/ocf/resource.d/pacemaker
%dir %{_sysconfdir}/booth
+%{_sbindir}/rcbooth-arbitrator
/usr/lib/ocf/resource.d/pacemaker/booth-site
%config %{_sysconfdir}/booth/booth.conf.example
-/usr/lib/systemd/system/booth@.service
+%if %{defined _unitdir}
+%{_unitdir}/booth@.service
+%exclude %{_initddir}/booth-arbitrator
+%else
+%{_initddir}/booth-arbitrator
+%endif
%dir %{_datadir}/booth
%{_datadir}/booth/service-runnable
%doc README COPYING
+%doc README.upgrade-from-v0.1
+
+# this should be preun, but...
+%pre
+# stop the arbitrator if it's the previous paxos version 1.0
+if [ "`booth version | awk '{print $2}'`" = "1.0" ]; then
+ echo "booth v0.1 found"
+ if grep -qs 'ticket.*;' /etc/booth/booth.conf; then
+ echo "Convert the booth configuration in /etc/booth/booth.conf!"
+ fi
+ if ps -o pid,cmd -e | grep -qs "[b]oothd arbitrator"; then
+ rcbooth-arbitrator stop
+ fi
+fi
+exit 0
%package test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/docs/boothd.8.txt new/booth/docs/boothd.8.txt
--- old/booth/docs/boothd.8.txt 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/docs/boothd.8.txt 2014-10-02 09:19:51.000000000 +0200
@@ -221,8 +221,10 @@
If the network reliability is often reduced over prolonged
periods, it is advisable to try to renew more often.
+
-Before every renewal the 'before-acquire-handler' is run. This
-parameter then doubles as a local cluster monitor interval.
+Before every renewal, if defined, the command specified in
+'before-acquire-handler' is run. In that case the 'renewal-freq'
+parameter is effectively also the local cluster monitoring
+interval.
*'timeout'*::
After that time 'booth' will re-send packets if there was an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/script/ocf/booth-site new/booth/script/ocf/booth-site
--- old/booth/script/ocf/booth-site 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/script/ocf/booth-site 2014-10-02 09:19:51.000000000 +0200
@@ -1,5 +1,5 @@
#!/bin/bash
-# vim: set sw=4 et :
+# vim: set sw=4 :
#
# Resource Agent for BOOTH site daemon.
#
@@ -29,7 +29,8 @@
DEFAULT_BIN="boothd"
DEFAULT_CONF="/etc/booth/booth.conf"
-. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
+: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
+. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
#######################################################################
@@ -79,6 +80,8 @@
<actions>
<action name="start" timeout="20" />
<action name="stop" timeout="20" />
+<action name="restart" timeout="20" />
+<action name="reload" timeout="20" />
<action name="monitor" timeout="20" interval="10" depth="0" start-delay="0" />
<action name="meta-data" timeout="5" />
<action name="validate-all" timeout="30" />
@@ -91,18 +94,25 @@
booth_site_usage() {
cat < /dev/null
}
@@ -126,12 +138,11 @@
return $OCF_SUCCESS
;;
$OCF_NOT_RUNNING) ;;
- *) booth_site_stop ;;
esac
$OCF_RESKEY_daemon daemon -c $OCF_RESKEY_config $OCF_RESKEY_args
sleep 1
- while ! booth_site_status; do
+ while ! booth_monitor_basic; do
sleep 1
done
@@ -153,12 +164,20 @@
return $OCF_SUCCESS
}
+booth_site_restart() {
+ booth_site_stop
+ booth_site_start
+}
+
+booth_site_reload() {
+ booth_site_restart
+}
+
booth_site_monitor() {
booth_site_status
case $? in
0) return $OCF_SUCCESS ;;
$OCF_NOT_RUNNING) return $OCF_NOT_RUNNING ;;
- *) return $OCF_ERR_GENERIC ;;
esac
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/script/wireshark-dissector.lua new/booth/script/wireshark-dissector.lua
--- old/booth/script/wireshark-dissector.lua 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/script/wireshark-dissector.lua 2014-10-02 09:19:51.000000000 +0200
@@ -2,6 +2,7 @@
--
do
booth_proto = Proto("Booth","Booth")
+ local hdr_len = 48
function T32(tree, buffer, start, format)
local b = buffer(start, 4)
@@ -12,13 +13,23 @@
local endbuf = buffer:len()
pinfo.cols.protocol = "Booth"
- if (endbuf < 24) then
+ if (endbuf < hdr_len) then
pinfo.cols.info = "Booth - too small"
else
- local hdr = tree:add(booth_proto, buffer(0, 24), "Booth header")
+ local hdr = tree:add(booth_proto, buffer(0, hdr_len), "Booth header")
local cmd = buffer(28, 4)
- local tcmd = T32(hdr, cmd, 0, "Cmd %08x, \"" .. cmd:string() .. "\"");
+ local tcmd = T32(hdr, cmd, 0, "Cmd \"" .. cmd:string() .. "\"");
+
+ local req = buffer(32, 4)
+ if (req:uint() > 0) then
+ local treq = T32(hdr, req, 0, "Req \"" .. req:string() .. "\"");
+ end
+
+ local reason = buffer(40, 4)
+ if (reason:uint() > 0) then
+ local treason = T32(hdr, reason, 0, "Reason \"" .. reason:string() .. "\"");
+ end
local from = buffer(20, 4)
local tfrom = T32(hdr, from, 0, "From %08x");
@@ -32,7 +43,7 @@
tlen:add_expert_info(PI_PROTOCOL, PI_WARN, "Length too big?")
end
- T32(hdr, buffer, 32, "Result %08x");
+ T32(hdr, buffer, 44, "Result %08x");
T32(hdr, buffer, 12, "Magic %08x");
T32(hdr, buffer, 16, "Version %08x");
@@ -42,15 +53,14 @@
- if (endbuf > 36) then
- local tick = tree:add(booth_proto, buffer(36, endbuf-36), "Booth data")
- local name = buffer(36, 64)
+ if (endbuf > hdr_len) then
+ local tick = tree:add(booth_proto, buffer(hdr_len, endbuf-hdr_len), "Booth data")
+ local name = buffer(hdr_len, 64)
tick:add(name, "Ticket name: ", name:string())
- T32(tick, buffer, 36+64 + 0, "Leader: %08x")
- T32(tick, buffer, 36+64 + 4, "Term: %08x")
- T32(tick, buffer, 36+64 + 8, "Term valid for: %08x")
- T32(tick, buffer, 36+64 + 12, "Leader commit: %8d")
+ T32(tick, buffer, hdr_len+64 + 0, "Leader: %08x")
+ T32(tick, buffer, hdr_len+64 + 4, "Term: %08x")
+ T32(tick, buffer, hdr_len+64 + 8, "Term valid for: %08x")
end
pinfo.cols.info = "Booth, cmd " .. cmd:string()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/booth.h new/booth/src/booth.h
--- old/booth/src/booth.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/booth.h 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _BOOTH_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/config.c new/booth/src/config.c
--- old/booth/src/config.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/config.c 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/config.h new/booth/src/config.h
--- old/booth/src/config.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/config.h 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _CONFIG_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/handler.c new/booth/src/handler.c
--- old/booth/src/handler.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/handler.c 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/handler.h new/booth/src/handler.h
--- old/booth/src/handler.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/handler.h 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _HANDLER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/inline-fn.h new/booth/src/inline-fn.h
--- old/booth/src/inline-fn.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/inline-fn.h 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _INLINE_FN_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/log.h new/booth/src/log.h
--- old/booth/src/log.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/log.h 2014-10-02 09:19:51.000000000 +0200
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _LOG_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/main.c new/booth/src/main.c
--- old/booth/src/main.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/main.c 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/pacemaker.c new/booth/src/pacemaker.c
--- old/booth/src/pacemaker.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/pacemaker.c 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/pacemaker.h new/booth/src/pacemaker.h
--- old/booth/src/pacemaker.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/pacemaker.h 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _PACEMAKER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/raft.c new/booth/src/raft.c
--- old/booth/src/raft.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/raft.c 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/raft.h new/booth/src/raft.h
--- old/booth/src/raft.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/raft.h 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _RAFT_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/ticket.c new/booth/src/ticket.c
--- old/booth/src/ticket.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/ticket.c 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/ticket.h new/booth/src/ticket.h
--- old/booth/src/ticket.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/ticket.h 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _TICKET_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/timer.c new/booth/src/timer.c
--- old/booth/src/timer.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/timer.c 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "timer.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/timer.h new/booth/src/timer.h
--- old/booth/src/timer.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/timer.h 2014-10-02 09:19:51.000000000 +0200
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _TIMER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/transport.c new/booth/src/transport.c
--- old/booth/src/transport.c 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/transport.c 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/transport.h new/booth/src/transport.h
--- old/booth/src/transport.h 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/src/transport.h 2014-10-02 09:19:51.000000000 +0200
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _TRANSPORT_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/test/live_test.sh new/booth/test/live_test.sh
--- old/booth/test/live_test.sh 2014-08-21 16:05:13.000000000 +0200
+++ new/booth/test/live_test.sh 2014-10-02 09:19:51.000000000 +0200
@@ -93,6 +93,14 @@
netem_delay() {
ext_prog_log tc qdisc add dev $1 parent `netem_parent $1` netem delay $2ms $(($2/10))ms
}
+netem_duplicate() {
+ ext_prog_log tc qdisc add dev $1 parent `netem_parent $1` \
+ netem duplicate $2\%
+}
+netem_reorder() {
+ ext_prog_log tc qdisc add dev $1 parent `netem_parent $1` \
+ netem reorder $2\% $3\% delay 10ms
+}
netem_loss() {
ext_prog_log tc qdisc add dev $1 parent `netem_parent $1` netem loss $2%
}
@@ -100,7 +108,9 @@
ext_prog_log tc qdisc del dev $1 root
}
local_netem_env() {
- local fun=$1 arg=$2
+ local fun=$1
+ shift 1
+ local args=$*
local t netif=""
local my_addr
my_addr=`booth status | get_stat_fld booth_addr_string`
@@ -119,7 +129,7 @@
# before first netem qdisc insert the prio qdisc and filter
tc qdisc show dev $netif | grep -qs netem ||
tc_prio $netif
- $fun $netif $arg
+ $fun $netif $args
else
logmsg "cannot find netif for $my_addr, netem not set"
fi
@@ -133,7 +143,7 @@
shift 1
echo "$h: running '$@'" | logmsg
if ip a l | fgrep -wq $h; then
- $@
+ eval $@
else
ssh $SSH_OPTS $h $@
fi
@@ -147,7 +157,11 @@
runcmd $1 crm resource $2 booth
}
manage_arbitrator() {
- runcmd $1 systemctl $2 booth@booth.service
+ if ps 1 | grep -qws systemd; then
+ runcmd $1 systemctl $2 booth@booth.service
+ else
+ runcmd $1 rcbooth-arbitrator $2
+ fi
}
start_site() {
manage_site $1 start
@@ -158,7 +172,7 @@
stop_site_clean() {
manage_site $1 stop &&
sleep 1 &&
- runcmd $1 crm --force site ticket revoke $tkt
+ runcmd $1 crm_ticket --force -t $tkt -r
}
stop_site() {
manage_site $1 stop
@@ -169,6 +183,9 @@
restart_site() {
manage_site $1 restart
}
+reload_site() {
+ runcmd $1 OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/pacemaker/booth-site reload
+}
restart_arbitrator() {
manage_arbitrator $1 restart
}
@@ -755,6 +772,18 @@
check_consistency `get_site 1`
}
+## TEST: reload_granted ##
+
+# reload with ticket granted
+test_reload_granted() {
+ grant_ticket 1 || return $ERR_SETUP_FAILED
+ reload_site `get_site 1` || return $ERR_SETUP_FAILED
+ wait_timeout
+}
+check_reload_granted() {
+ check_consistency `get_site 1`
+}
+
## TEST: restart_granted_nocib ##
# restart with ticket granted (but cib empty)
@@ -771,7 +800,7 @@
check_consistency `get_site 1`
}
-## TEST: notgranted ##
+## TEST: restart_notgranted ##
# restart with ticket not granted
test_restart_notgranted() {
@@ -898,6 +927,16 @@
forall $0 $run_cnf __netem__ netem_delay ${1:-100}
}
+# duplicate packets
+NETEM_ENV_duplicate() {
+ forall $0 $run_cnf __netem__ netem_duplicate ${1:-10}
+}
+
+# reorder packets
+NETEM_ENV_reorder() {
+ forall $0 $run_cnf __netem__ netem_reorder ${1:-25} ${2:-50}
+}
+
[ -f "$cnf" ] || {
echo "ERROR: configuration file $cnf doesn't exist"
usage 1
@@ -961,7 +1000,7 @@
: ${TESTS:="grant longgrant grant_noarb grant_elsewhere
grant_site_lost grant_site_reappear revoke
simultaneous_start_even slow_start_granted
-restart_granted restart_granted_nocib restart_notgranted
+restart_granted reload_granted restart_granted_nocib restart_notgranted
failover split_leader split_follower split_edge
external_prog_failed"}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org