Hello community,

here is the log from the commit of package booth for openSUSE:Factory checked 
in at 2014-08-25 11:03:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-15 
09:56:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.booth.new/booth.changes 2014-08-25 
11:04:44.000000000 +0200
@@ -1,0 +2,20 @@
+Thu Aug 21 14:30:50 UTC 2014 - [email protected]
+
+- Doc: update client help
+- upstream version: 063bc2c
+
+-------------------------------------------------------------------
+Thu Aug 21 12:01:53 UTC 2014 - [email protected]
+
+- doc: man page update
+- upstream version: 1e41e32
+
+-------------------------------------------------------------------
+Wed Aug 20 12:50:17 UTC 2014 - [email protected]
+
+- service-runnable: test also if the ticket is in standby
+- service-runnable: unset -e, crm_resource fails if the meta
+  attribute doesn't exist
+- upstream version: 2928215
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ 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-14 17:59:35.000000000 +0200
+++ new/booth/.git_info 2014-08-21 16:30:28.000000000 +0200
@@ -1 +1 @@
-v0.1.7-315-g5c48dbb
+v0.1.7-321-g063bc2c
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-14 12:30:55.000000000 +0200
+++ new/booth/docs/boothd.8.txt 2014-08-21 16:05:13.000000000 +0200
@@ -10,15 +10,15 @@
 
 SYNOPSIS
 --------
-*boothd* 'daemon' ['-D'] [-c 'config']
+*boothd* 'daemon' [-SD] [-c 'config'] [-l 'lockfile']
 
-*booth* ['client'] 'list' [-s 'site'] ['-D'] [-c 'config']
+*booth* 'list' [-s 'site'] [-c 'config']
 
-*booth* ['client'] 'grant' [-F] [-s 'site'] ['-D'] [-t] 'ticket' [-c 'config']
+*booth* 'grant' [-s 'site'] [-c 'config'] [-Fw] 'ticket'
 
-*booth* ['client'] 'revoke' [-s 'site'] ['-D'] [-t] 'ticket'  [-c 'config']
+*booth* 'revoke' [-s 'site'] [-c 'config'] [-w] 'ticket'
 
-*booth* 'status' ['-D'] [-c 'config']
+*booth* 'status' [-D] [-c 'config']
 
 
 DESCRIPTION
@@ -38,20 +38,20 @@
 --------------
 
 ---------------------
-# boothd daemon
+# boothd daemon -D
 
 # booth list
 
-# booth grant -t ticket-nfs
+# booth grant ticket-nfs
 
-# booth revoke -t ticket-nfs
+# booth revoke ticket-nfs
 ---------------------
 
 
 
 OPTIONS
 -------
-*-c*::
+*-c* 'configfile'::
        Configuration to use.
 +
 Can be a full path to a configuration file, or a short name; in the latter 
@@ -61,25 +61,8 @@
 The configuration name also determines the name of the PID file - for the 
defaults,
 '/var/run/booth/booth.pid'.
 
-*-D*::
-       Debug output/don't daemonize.
-       Increases the debug output level; for 'boothd daemon', keeps the process
-       in the foreground.
-
-*-h*, *--help*::
-       Give a short usage output.
-
 *-s*::
-       Site address.
-
-*-t*::
-       Ticket name.
-
-*-v*, *--version*::
-       Report version information.
-
-*-S*::
-       'systemd' mode: don't fork. This is like '-D' but without the debug 
output.
+       Site address or name.
 
 *-F*::
        'immediate grant': Don't wait for unreachable sites to
@@ -90,6 +73,25 @@
        'wait indefinitely': The client will wait forever for the
        server result for grant and revoke requests.
 
+*-h*, *--help*::
+       Give a short usage output.
+
+*--version*::
+       Report version information.
+
+*-S*::
+       'systemd' mode: don't fork. This is like '-D' but without the debug 
output.
+
+*-D*::
+       Debug output/don't daemonize.
+       Increases the debug output level; booth daemon remains
+       in the foreground.
+
+*-l* 'lockfile'::
+       Use another lock file. By default, the lock file name is
+       inferred from the configuration file name. Normally not
+       needed.
+
 
 COMMANDS
 --------
@@ -199,74 +201,75 @@
        acquired by another site if the ticket holder is not
        reachable.
 +
-'booth' renews a ticket after half the lease time.
-
-*'weights'*::
-       A comma-separated list of integers that define the weight of individual 
-       Raft members, in the same order as the 'site' and 'arbitrator' lines.
-+
-Default is '0' for all; this means that the order in the configuration 
-file defines priority for conflicting requests.
+The default is '600'.
 
 *'acquire-after'*::
-       Try to acquire a lost ticket _after_ this period passed.
+       Once a ticket is lost, wait this time in addition before
+       acquiring the ticket.
 +
-This is to allow for some time for the site that lost the ticket
-to relinquish the resources, by either stopping them or fencing a
-node.
+This is to allow for the site that lost the ticket to relinquish
+the resources, by either stopping them or fencing a node.
 +
 A typical delay might be 60 seconds, but ultimately it depends on
 the protected resources and the fencing configuration.
++
+The default is '0'.
+
+*'renewal-freq'*::
+       Set the ticket renewal frequency period.
++
+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.
 
 *'timeout'*::
-       After that time 'booth' will re-send packets if there was an 
insufficient 
-       number of replies. This should be long enough to allow
-       packets to reach other members.
+       After that time 'booth' will re-send packets if there was an
+       insufficient number of replies. This should be long enough to
+       allow packets to reach other members.
 +
-The default is '5' seconds.
+The default is '5'.
 
 *'retries'*::
        Defines how many times to retry sending packets before giving
        up waiting for acks from other members.
 +
-Default is 10. Values lower than 3 are illegal.
+Default is '10'. Values lower than 3 are illegal.
 +
-Ticket *renewal*, which by default occurs every half expire time,
-must happen after packet resending. Hence, the total retry time
-must be shorter than half the expire time:
+Ticket renewals should allow for this number of retries. Hence,
+the total retry time must be shorter than the renewal time
+(either half the expire time or *'renewal-freq'*):
 
-       timeout*(retries+1) < expire/2
+       timeout*(retries+1) < renewal
+
+*'weights'*::
+       A comma-separated list of integers that define the weight of individual 
+       Raft members, in the same order as the 'site' and 'arbitrator' lines.
++
+Default is '0' for all; this means that the order in the configuration 
+file defines priority for conflicting requests.
 
 *'before-acquire-handler'*::
        If set, this command will be called before 'boothd' tries to
        acquire or renew a ticket. On exit code other than 0,
-       'boothd' cancels the operation.
+       'boothd' relinquishes the ticket.
 +
-This makes it possible to check whether it is appropriate
-to acquire the ticket. For instance, if a service in the
-dependency-chain has a failcount of 'INFINITY' on all
-available nodes, the service will be unable to run. In that case,
-it is of no use to claim the ticket.
+Thus it is possible to ensure whether the services and its
+dependencies protected by the ticket are in good shape at this
+site. For instance, if a service in the dependency-chain has a
+failcount of 'INFINITY' on all available nodes, the service will
+be unable to run. In that case, it is of no use to claim the
+ticket.
 +
 'boothd' waits synchronously for the result of the handler, so make
 sure that the program returns quickly.
 +
-See below for details about booth specific environment variables
-and the distributed 'service-runnable' script.
-
-*'renewal-freq'*::
-       Set the ticket renewal frequency period. By default, it is
-       set to half the ticket expire time.
-+
-If the network reliability is often reduced over prolonged
-periods, it may help to reduce the renewal frequency.
-+
-Before every renewal, if set, the 'before-acquire-handler' is
-run. This parameter then may be used to set the local cluster
-monitor interval.
+See below for details about booth specific environment variables.
+The distributed 'service-runnable' script is an example which may
+be used to test whether a pacemaker resource can be started.
 
-
-A more verbose example of a configuration file might be
+One example of a booth configuration file:
 
 -----------------------
 transport = udp
@@ -284,6 +287,8 @@
     acquire-after = 60
     timeout       = 10
     retries       = 5
+    renewal-freq  = 60
+    before-acquire-handler = /usr/share/booth/service-runnable db8
 -----------------------
 
 
@@ -293,11 +298,9 @@
 The booth cluster guarantees that every ticket is owned by only
 one site at the time.
 
-Only granted tickets are managed by 'booth'.
-
 Tickets must be initially granted with the 'booth client grant'
 command. Once it gets granted, the ticket is managed by the booth
-cluster.
+cluster. Hence, only granted tickets are managed by 'booth'.
 
 If the ticket gets lost, i.e. that the other members of the booth
 cluster do not hear from the ticket owner in a sufficiently long
@@ -317,11 +320,11 @@
 
 The grant operation, in case not all sites are reachable, may get
 delayed for the ticket expire time (and, if defined, the
-'acquire-after' time). Under certain circumstances, the rest of
-the booth members may not know if the ticket is currently granted
-at the unreachable site.
+'acquire-after' time). The reason is that the other booth members
+may not know if the ticket is currently granted at the
+unreachable site.
 
-This delay is disabled if the '-F' option is specified. In that
+This delay may be disabled with the '-F' option. In that
 case, it is up to the administrator to make sure that the
 unreachable site is not holding the ticket.
 
@@ -329,33 +332,30 @@
 it manually using either `crm_ticket` command or `crm site
 ticket`. Neither of these tools is aware of 'booth' and,
 consequently, 'booth' itself may not be aware of any ticket
-status changes.
+status changes. A notable exception is setting the ticket to
+standby which is typically done before a planned failover.
 
 
 NOTES
 -----
 
-Tickets are not meant to be moved around quickly--a reasonable
-'expire' time might be 300 seconds (5 minutes).
+Tickets are not meant to be moved around quickly, the default
+'expire' time is 600 seconds (10 minutes).
 
 'booth' works with both IPv4 and IPv6 addresses.
 
 'booth' renews a ticket before it expires, to account for
-possible transmission delays.
-
-The renewal time is calculated as larger of half the 'expire'
-time and 'timeout'*'retries'/2. Hence, with small 'expire' values
-(eg. 60 seconds) the ticket renewal process will be started just
-after the ticket got acquired.
+possible transmission delays. The renewal time, unless explicitly
+set, is set to half the 'expire' time.
 
 
 HANDLERS
 --------
 
-Currently, there's only one external handler defined (see the 
'before-acquire-handler'
-configuration item above).
+Currently, there's only one external handler defined (see the
+'before-acquire-handler' configuration item above).
 
-The following data is available as environment variables:
+The following environment variables are exported to the handler:
 
 *'BOOTH_TICKET'::
        The ticket name, as given in the configuration file. (See 'ticket' item 
above.)
@@ -372,6 +372,8 @@
 *'BOOTH_TICKET_EXPIRES'::
        When the ticket expires (in seconds since 1.1.1970), or '0'.
 
+The handler is invoked with positional arguments specified after
+it.
 
 FILES
 -----
@@ -388,25 +390,30 @@
 
 In essence, every ticket corresponds to a separate Raft cluster.
 
-A ticket is granted _only_ to the Raft _Leader_, but a Leader
-needs not grant the ticket to Pacemaker.
+A ticket is granted to the Raft _Leader_ which then owns (or
+keeps) the ticket.
 
+ARBITRATOR MANAGEMENT
+---------------------
 
-SYSTEMD INTEGRATION
--------------------
+The booth daemon for an arbitrator which typically doesn't run
+the cluster stack, may be started through systemd or with
+'/etc/init.d/booth-arbitrator', depending on which init system
+the platform supports.
 
-The 'boothd' 'systemd' unit file should be distributed with booth.
+The SysV init script starts a booth arbitrator for every
+configuration file found in '/etc/booth'.
 
-The booth daemon for a site or an arbitrator may be started
-through systemd:
+Platforms running systemd can enable and start every
+configuration separately using 'systemctl':
 
 -----------
-# systemctl enable booth@{configurationname}.service
-# systemctl start  booth@{configurationname}.service
+# systemctl enable booth@<configurationname>
+# systemctl start  booth@<configurationname>
 -----------
 
-The configuration name is required for 'systemctl', even in case
-of the default name 'booth'.
+'systemctl' requires the configuration name, even for the default
+name 'booth'.
 
 
 EXIT STATUS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/booth/script/service-runnable 
new/booth/script/service-runnable
--- old/booth/script/service-runnable   2014-08-14 12:30:55.000000000 +0200
+++ new/booth/script/service-runnable   2014-08-21 16:05:13.000000000 +0200
@@ -4,8 +4,6 @@
 # to run on the local cluster, so that booth knows whether to
 # acquire the ticket here.
 
-set -e
-
 service="${1:?Need a resource name as first argument.}"
 tmpshadow=`mktemp booth-check.XXXXXX`
 trap "rm -f $tmpshadow" EXIT
@@ -25,7 +23,14 @@
 # If target-role is Stopped, it judges with being stopped explicitly.
 output=$(crm_resource --meta --get-parameter="target-role" --resource=$service 
2>/dev/null)
 rc=$?
-if [ $rc == 0 -a "$output" = "Stopped" ]; then
+if [ $rc -eq 0 -a "$output" = "Stopped" ]; then
+       exit 0
+fi
+
+# is ticket in standby?
+output=$(crm_ticket --ticket "$BOOTH_TICKET" --get-attr standby)
+rc=$?
+if [ $rc -eq 0 -a "$output" = true ]; then
        exit 0
 fi
 
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-14 12:30:55.000000000 +0200
+++ new/booth/src/main.c        2014-08-21 16:05:13.000000000 +0200
@@ -853,29 +853,34 @@
 
 static void print_usage(void)
 {
-       printf("Usages:\n");
-       printf("  booth daemon [-c config] [-D]\n");
-       printf("  booth [client] {list|grant|revoke} [options]\n");
-       printf("  booth status [-c config] [-D]\n");
-       printf("\n");
-       printf("Client operations:\n");
-       printf("  list:         List all the tickets\n");
-       printf("  grant:        Grant ticket to site\n");
-       printf("  revoke:       Revoke ticket from site\n");
-       printf("\n");
-       printf("Options:\n");
-       printf("  -c FILE       Specify config file [default " 
BOOTH_DEFAULT_CONF "]\n");
-       printf("                Can be a path or a name without \".conf\" 
suffix\n");
-       printf("  -D            Enable debugging to stderr and don't fork\n");
-       printf("  -S            Systemd mode (no forking)\n");
-       printf("  -t            ticket name\n");
-       printf("  -s            site name\n");
-       printf("  -l LOCKFILE   Specify lock file path (daemon only)\n");
-       printf("  -F            Try to grant the ticket immediately (client 
only)\n");
-       printf("  -w            Wait forever for the result (client only)\n");
-       printf("  -h            Print this help, then exit\n");
-       printf("\n");
-       printf("Please see the man page for details.\n");
+       printf(
+       "Usage:\n"
+       "  booth list [options]\n"
+       "  booth {grant|revoke} [options] <ticket>\n"
+       "  booth status [options]\n"
+       "\n"
+       "  list:             List all tickets\n"
+       "  grant:        Grant ticket to site\n"
+       "  revoke:       Revoke ticket\n"
+       "\n"
+       "Options:\n"
+       "  -c FILE       Specify config file [default " BOOTH_DEFAULT_CONF "]\n"
+       "                Can be a path or just a name without \".conf\" 
suffix\n"
+       "  -s <site>     Connect/grant to a different site\n"
+       "  -F            Try to grant the ticket immediately\n"
+       "                even if not all sites are reachable\n"
+       "  -w            Wait forever for the outcome of the request\n"
+       "  -h            Print this help\n"
+       "\n"
+       "Examples:\n"
+       "\n"
+       "  # booth list (list tickets)\n"
+       "  # booth grant ticket-A (grant ticket here)\n"
+       "  # booth grant -s 10.121.8.183 ticket-A (grant ticket to site 
10.121.8.183)\n"
+       "  # booth revoke ticket-A (revoke ticket)\n"
+       "\n"
+       "See the booth(8) man page for more details.\n"
+       );
 }
 
 #define OPTION_STRING          "c:Dl:t:s:FhSw"
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-14 12:30:55.000000000 +0200
+++ new/booth/test/live_test.sh 2014-08-21 16:05:13.000000000 +0200
@@ -498,7 +498,7 @@
        fi
 }
 revoke_ticket() {
-       run_site 1 booth revoke $tkt >/dev/null
+       run_site 1 booth revoke -w $tkt >/dev/null
        wait_timeout
 }
 run_report() {
@@ -521,6 +521,12 @@
        echo -n "Testing: $1... "
        can_run_test $1 || return 0
        echo "starting booth test $1 ..." | logmsg
+       if is_function setup_$1; then
+               if ! setup_$1; then
+                       echo "setup test $1 failed" | logmsg
+                       return 1
+               fi
+       fi
        setup_netem
        test_$1
        rc=$?
@@ -569,7 +575,7 @@
 
 # most tests start by granting ticket
 grant_ticket() {
-       run_site $1 booth grant $tkt >/dev/null
+       run_site $1 booth grant -w $tkt >/dev/null
 }
 
 ## TEST: grant ##
@@ -595,6 +601,22 @@
        check_consistency `get_site 1`
 }
 
+## TEST: longgrant2 ##
+
+# just a grant followed by three expire times
+setup_longgrant2() {
+       grant_ticket 1 || return $ERR_SETUP_FAILED
+}
+test_longgrant2() {
+       local i
+       for i in `seq 10`; do
+               wait_exp
+       done
+}
+check_longgrant2() {
+       check_consistency `get_site 1`
+}
+
 ## TEST: grant_noarb ##
 
 # just a grant with no arbitrators
@@ -634,7 +656,7 @@
 
 # just a grant to another site
 test_grant_elsewhere() {
-       run_site 1 booth grant -s `get_site 2` $tkt >/dev/null
+       run_site 1 booth grant -w -s `get_site 2` $tkt >/dev/null
 }
 check_grant_elsewhere() {
        check_consistency `get_site 2`

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to