Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2017-05-10 20:53:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Wed May 10 20:53:18 2017 rev:122 rq:493999 version:3.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2017-05-06 18:30:20.153432682 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2017-05-10 20:53:19.887022863 +0200 @@ -1,0 +2,6 @@ +Wed May 10 06:46:09 UTC 2017 - [email protected] + +- medium: bootstrap: Make arbitrator argument optional (bsc#1038386) + * Add 0013-medium-bootstrap-Make-arbitrator-argument-optional-b.patch + +------------------------------------------------------------------- New: ---- 0013-medium-bootstrap-Make-arbitrator-argument-optional-b.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.gvLPv6/_old 2017-05-10 20:53:21.166842265 +0200 +++ /var/tmp/diff_new_pack.gvLPv6/_new 2017-05-10 20:53:21.170841700 +0200 @@ -66,6 +66,8 @@ Patch11: 0011-medium-bootstrap-Check-required-arguments-to-geo-joi.patch # PATCH-FIX-UPSTREAM: doc: geo-join requires --clusters argument (bsc#1037442) Patch12: 0012-doc-geo-join-requires-clusters-argument-bsc-1037442.patch +# PATCH-FIX-UPSTREAM: medium: bootstrap: Make arbitrator argument optional (bsc#1038386) +Patch13: 0013-medium-bootstrap-Make-arbitrator-argument-optional-b.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} @@ -180,6 +182,7 @@ %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 # Force the local time # ++++++ 0013-medium-bootstrap-Make-arbitrator-argument-optional-b.patch ++++++ >From 79a73793fc536d87348b8058615faa2464f3ec1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]> Date: Wed, 10 May 2017 07:15:03 +0200 Subject: [PATCH] medium: bootstrap: Make arbitrator argument optional (bsc#1038386) --- crmsh/bootstrap.py | 27 +++++++++++---------------- crmsh/ui_cluster.py | 8 +++----- doc/crm.8.adoc | 6 +++--- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/crmsh/bootstrap.py b/crmsh/bootstrap.py index 16772244..3d648539 100644 --- a/crmsh/bootstrap.py +++ b/crmsh/bootstrap.py @@ -1631,7 +1631,7 @@ def create_booth_authkey(): def create_booth_config(arbitrator, clusters, tickets): status("Configure booth") - config_template = Template("""# The booth configuration file is "/etc/booth/booth.conf". You need to + config_template = """# The booth configuration file is "/etc/booth/booth.conf". You need to # prepare the same booth configuration file on each arbitrator and # each node in the cluster sites where the booth daemon can be launched. @@ -1639,21 +1639,16 @@ def create_booth_config(arbitrator, clusters, tickets): # Currently only "UDP" is supported. transport="UDP" port="9929" -arbitrator="$arbitrator" -$sites -authfile="$authkey" -$tickets -""") - ticket_template = Template("""ticket="$name" - expire="600" -""") - site_template = Template('site="$site"\n') - - cfg = config_template.substitute( - arbitrator=arbitrator, - sites="".join(site_template.substitute(site=s) for s in clusters.itervalues()), - authkey=BOOTH_AUTH, - tickets="".join(ticket_template.substitute(name=t) for t in tickets)) +""" + cfg = [config_template] + if arbitrator is not None: + cfg.append("arbitrator=\"{}\"".format(arbitrator)) + for s in clusters.itervalues(): + cfg.append("site=\"{}\"".format(s)) + cfg.append("authfile=\"{}\"".format(BOOTH_AUTH)) + for t in tickets: + cfg.append("ticket=\"{}\"\nexpire=\"600\"".format(t)) + cfg = "\n".join(cfg) + "\n" if os.path.exists(BOOTH_CFG): invoke("rm -f {}".format(BOOTH_CFG)) diff --git a/crmsh/ui_cluster.py b/crmsh/ui_cluster.py index 8730aa41..96166713 100644 --- a/crmsh/ui_cluster.py +++ b/crmsh/ui_cluster.py @@ -328,9 +328,9 @@ If stage is not specified, each stage will be invoked in sequence. Make this cluster a geo cluster. Needs some information to set up. - * arbitrator IP / hostname * cluster map: "cluster-name=ip cluster-name=ip" - * list of tickets + * arbitrator IP / hostname (optional) + * list of tickets (can be empty) ''' parser = OptParser(usage="usage: geo-init [options]", epilog=""" @@ -355,12 +355,10 @@ Cluster Description parser.add_option("--tickets", help="Tickets to create (space-separated)", dest="tickets", metavar="LIST") options, args = parser.parse_args(list(args)) - if options.clusters is None or options.arbitrator is None: + if options.clusters is None: errs = [] if options.clusters is None: errs.append("The --clusters argument is required.") - if options.arbitrator is None: - errs.append("The --arbitrator argument is required.") parser.error(" ".join(errs)) clustermap = self._parse_clustermap(options.clusters) diff --git a/doc/crm.8.adoc b/doc/crm.8.adoc index e1218339..c7766824 100644 --- a/doc/crm.8.adoc +++ b/doc/crm.8.adoc @@ -996,12 +996,12 @@ Options: *-y, --yes*:: Answer "yes" to all prompts (use with caution) -*--arbitrator=IP*:: - IP address of geo cluster arbitrator - *--clusters=DESC*:: Cluster description (see details below) +*--arbitrator=IP*:: + IP address of geo cluster arbitrator (optional) + *--tickets=LIST*:: Tickets to create (space-separated) -- 2.12.2
