commit rebootmgr for openSUSE:Factory
Hello community, here is the log from the commit of package rebootmgr for openSUSE:Factory checked in at 2017-02-28 23:51:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rebootmgr (Old) and /work/SRC/openSUSE:Factory/.rebootmgr.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rebootmgr" Tue Feb 28 23:51:12 2017 rev:2 rq:460730 version:0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/rebootmgr/rebootmgr.changes 2017-02-18 03:19:44.078965409 +0100 +++ /work/SRC/openSUSE:Factory/.rebootmgr.new/rebootmgr.changes 2017-02-28 23:51:13.475725673 +0100 @@ -1,0 +2,7 @@ +Mon Feb 27 17:44:46 CET 2017 - kukuk@suse.de + +- Update to version 0.11 + - Implement unlocking of a machine_id not equal to our own [bsc#1026273] + - Watch for correct key when waiting for lock [bsc#1026274] + +------------------------------------------------------------------- Old: ---- rebootmgr-0.10.tar.bz2 New: ---- rebootmgr-0.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rebootmgr.spec ++++++ --- /var/tmp/diff_new_pack.m1a6Of/_old 2017-02-28 23:51:14.191624628 +0100 +++ /var/tmp/diff_new_pack.m1a6Of/_new 2017-02-28 23:51:14.199623500 +0100 @@ -17,7 +17,7 @@ Name: rebootmgr -Version: 0.10 +Version: 0.11 Release: 0 Summary: Automatic controlled reboot during a maintenance window License: GPL-2.0 and LGPL-2.1+ ++++++ rebootmgr-0.10.tar.bz2 -> rebootmgr-0.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/NEWS new/rebootmgr-0.11/NEWS --- old/rebootmgr-0.10/NEWS 2017-02-16 15:00:06.000000000 +0100 +++ new/rebootmgr-0.11/NEWS 2017-02-27 17:42:31.000000000 +0100 @@ -2,6 +2,9 @@ Copyright (C) 2016, 2017 Thorsten Kukuk +Version 0.11 +* Fix several bugs in etcd locking/unlocking + Version 0.10 * Fix typos in documentation * Fix compilation on 32bit systems diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/configure new/rebootmgr-0.11/configure --- old/rebootmgr-0.10/configure 2017-02-16 15:00:15.000000000 +0100 +++ new/rebootmgr-0.11/configure 2017-02-27 17:42:38.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rebootmgr 0.10. +# Generated by GNU Autoconf 2.69 for rebootmgr 0.11. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='rebootmgr' PACKAGE_TARNAME='rebootmgr' -PACKAGE_VERSION='0.10' -PACKAGE_STRING='rebootmgr 0.10' +PACKAGE_VERSION='0.11' +PACKAGE_STRING='rebootmgr 0.11' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1326,7 +1326,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rebootmgr 0.10 to adapt to many kinds of systems. +\`configure' configures rebootmgr 0.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1396,7 +1396,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rebootmgr 0.10:";; + short | recursive ) echo "Configuration of rebootmgr 0.11:";; esac cat <<\_ACEOF @@ -1511,7 +1511,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rebootmgr configure 0.10 +rebootmgr configure 0.11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1876,7 +1876,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rebootmgr $as_me 0.10, which was +It was created by rebootmgr $as_me 0.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2740,7 +2740,7 @@ # Define the identity of the package. PACKAGE='rebootmgr' - VERSION='0.10' + VERSION='0.11' cat >>confdefs.h <<_ACEOF @@ -8627,7 +8627,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rebootmgr $as_me 0.10, which was +This file was extended by rebootmgr $as_me 0.11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8693,7 +8693,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rebootmgr config.status 0.10 +rebootmgr config.status 0.11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/configure.ac new/rebootmgr-0.11/configure.ac --- old/rebootmgr-0.10/configure.ac 2017-02-16 14:54:59.000000000 +0100 +++ new/rebootmgr-0.11/configure.ac 2017-02-27 17:41:41.000000000 +0100 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(rebootmgr, 0.10) +AC_INIT(rebootmgr, 0.11) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/rebootmgrd.c]) AM_CONFIG_HEADER(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/org.opensuse.RebootMgr.conf.8.html new/rebootmgr-0.11/man/org.opensuse.RebootMgr.conf.8.html --- old/rebootmgr-0.10/man/org.opensuse.RebootMgr.conf.8.html 2017-02-16 14:54:21.000000000 +0100 +++ new/rebootmgr-0.11/man/org.opensuse.RebootMgr.conf.8.html 2017-02-27 16:06:21.000000000 +0100 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.9</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.10</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task reboot at the same there, <span class="emphasis"><em>rebootmgrd</em></span> reboots the machine following configured policies.</p><div class="refsect2"><a name="reboot_strategy_options"></a><h3 id="Reboot Strategies">Reboot Strategies<a class="headerlink" title="Permalink to this headline" href="#Reboot%20Strategies">¶</a></h3><p> rebootmgr supports different strategies, when a reboot should be done: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgr.conf.5 new/rebootmgr-0.11/man/rebootmgr.conf.5 --- old/rebootmgr-0.10/man/rebootmgr.conf.5 2017-02-16 14:54:20.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgr.conf.5 2017-02-27 16:06:21.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: rebootmgr.conf .\" Author: Thorsten Kukuk <kukuk@suse.com> .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 02/16/2017 +.\" Date: 02/27/2017 .\" Manual: resolved.conf .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGR\&.CONF" "5" "02/16/2017" "rebootmgr" "resolved.conf" +.TH "REBOOTMGR\&.CONF" "5" "02/27/2017" "rebootmgr" "resolved.conf" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgr.conf.5.html new/rebootmgr-0.11/man/rebootmgr.conf.5.html --- old/rebootmgr-0.10/man/rebootmgr.conf.5.html 2017-02-16 14:54:21.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgr.conf.5.html 2017-02-27 16:06:21.000000000 +0100 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.9</span><hr><div class="refentry"><a name="rebootmgr.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.conf — Reboot Manager configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/rebootmgr.conf</code></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These configuration file controls and defines the reboot policy for + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.10</span><hr><div class="refentry"><a name="rebootmgr.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.conf — Reboot Manager configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/rebootmgr.conf</code></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These configuration file controls and defines the reboot policy for <a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a>.</p></div><div class="refsect1"><a name="id-1.6"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are available in the "<code class="literal">rebootmgr</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="window-start="><span class="term"><code class="varname">window-start=</code></span><a class="headerlink" title="Permalink to this term" href="#window-start=">¶</a></dt><dd><p> The format of <code class="varname">window-start</code> is the same as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgr.index.html new/rebootmgr-0.11/man/rebootmgr.index.html --- old/rebootmgr-0.10/man/rebootmgr.index.html 2017-02-16 14:54:21.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgr.index.html 2017-02-27 16:06:22.000000000 +0100 @@ -15,4 +15,4 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.9</span><hr><div class="refentry"><a name="rebootmgr.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.index — List all manpages from the rebootmgr project</p></div><div class="refsect1"><a name="id-1.4"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="org.opensuse.RebootMgr.conf.8.html"><span class="citerefentry"><span class="refentrytitle">org.opensuse.RebootMgr.conf</span>(8)</span></a> -- Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="rebootmgr.conf.5.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.conf</span>(5)</span></a> -- Reboot Manager configuration files<br><a href="rebootmgr.service.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.service</span>(8)</span></a> -- Reboot the machine during a maintenance window.<br><a href="rebootmgrctl.1.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrctl</span>(1)</span></a> -- Tool to control and configure the reboot manager daemon.<br><a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> -- Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.6"></a><p><a name="counts"></a>This index contains 5 entries, referring to 3 individual manual pages.</p></div></div></body></html> + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.10</span><hr><div class="refentry"><a name="rebootmgr.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.index — List all manpages from the rebootmgr project</p></div><div class="refsect1"><a name="id-1.4"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="org.opensuse.RebootMgr.conf.8.html"><span class="citerefentry"><span class="refentrytitle">org.opensuse.RebootMgr.conf</span>(8)</span></a> -- Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="rebootmgr.conf.5.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.conf</span>(5)</span></a> -- Reboot Manager configuration files<br><a href="rebootmgr.service.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.service</span>(8)</span></a> -- Reboot the machine during a maintenance window.<br><a href="rebootmgrctl.1.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrctl</span>(1)</span></a> -- Tool to control and configure the reboot manager daemon.<br><a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> -- Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.6"></a><p><a name="counts"></a>This index contains 5 entries, referring to 3 individual manual pages.</p></div></div></body></html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgr.service.8.html new/rebootmgr-0.11/man/rebootmgr.service.8.html --- old/rebootmgr-0.10/man/rebootmgr.service.8.html 2017-02-16 14:54:21.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgr.service.8.html 2017-02-27 16:06:21.000000000 +0100 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.9</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.10</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task reboot at the same there, <span class="emphasis"><em>rebootmgrd</em></span> reboots the machine following configured policies.</p><div class="refsect2"><a name="reboot_strategy_options"></a><h3 id="Reboot Strategies">Reboot Strategies<a class="headerlink" title="Permalink to this headline" href="#Reboot%20Strategies">¶</a></h3><p> rebootmgr supports different strategies, when a reboot should be done: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgrctl.1 new/rebootmgr-0.11/man/rebootmgrctl.1 --- old/rebootmgr-0.10/man/rebootmgrctl.1 2017-02-16 14:54:20.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgrctl.1 2017-02-27 16:06:21.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: rebootmgrctl .\" Author: Thorsten Kukuk <kukuk@suse.de> .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 02/16/2017 +.\" Date: 02/27/2017 .\" Manual: rebootmgrctl .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRCTL" "1" "02/16/2017" "rebootmgr" "rebootmgrctl" +.TH "REBOOTMGRCTL" "1" "02/27/2017" "rebootmgr" "rebootmgrctl" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgrctl.1.html new/rebootmgr-0.11/man/rebootmgrctl.1.html --- old/rebootmgr-0.10/man/rebootmgrctl.1.html 2017-02-16 14:54:21.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgrctl.1.html 2017-02-27 16:06:21.000000000 +0100 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.9</span><hr><div class="refentry"><a name="rebootmgrctl.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrctl — Tool to control and configure the reboot manager daemon.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> [ --help | --version ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> is-active [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> reboot [ fast | now ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> cancel </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> status [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-strategy best-effort | etcd-lock | maint-window | instantly | off </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-strategy </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-group <em class="replaceable"><code>group</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-group </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-window <em class="replaceable"><code>time</code></em> <em class="replaceable"><code>duration</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-window </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-max [--group <em class="replaceable"><code>group</code></em>] <em class="replaceable"><code>number</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> lock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> unlock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="emphasis"><em>rebootmgrctl</em></span> is used to + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.10</span><hr><div class="refentry"><a name="rebootmgrctl.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrctl — Tool to control and configure the reboot manager daemon.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> [ --help | --version ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> is-active [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> reboot [ fast | now ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> cancel </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> status [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-strategy best-effort | etcd-lock | maint-window | instantly | off </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-strategy </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-group <em class="replaceable"><code>group</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-group </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-window <em class="replaceable"><code>time</code></em> <em class="replaceable"><code>duration</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-window </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-max [--group <em class="replaceable"><code>group</code></em>] <em class="replaceable"><code>number</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> lock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> unlock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="emphasis"><em>rebootmgrctl</em></span> is used to query and configure the <a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> process.</p></div><div class="refsect1"><a name="options"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p>display help text and exit</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>output version information and exit</p></dd><dt id="cancel"><span class="term"><code class="option">cancel</code></span><a class="headerlink" title="Permalink to this term" href="#cancel">¶</a></dt><dd><p>Cancels an already running reboot.</p></dd><dt id="is-active --quiet"><span class="term"><code class="option">is-active</code> [<span class="optional">--quiet</span>]</span><a class="headerlink" title="Permalink to this term" href="#is-active%20--quiet">¶</a></dt><dd><p>Prints if the rebootmgrd is running and active or not. With the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgrd.8 new/rebootmgr-0.11/man/rebootmgrd.8 --- old/rebootmgr-0.10/man/rebootmgrd.8 2017-02-16 14:54:20.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgrd.8 2017-02-27 16:06:20.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: rebootmgrd .\" Author: Thorsten Kukuk <kukuk@suse.de> .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 02/16/2017 +.\" Date: 02/27/2017 .\" Manual: rebootmgrd .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRD" "8" "02/16/2017" "rebootmgr" "rebootmgrd" +.TH "REBOOTMGRD" "8" "02/27/2017" "rebootmgr" "rebootmgrd" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/man/rebootmgrd.8.html new/rebootmgr-0.11/man/rebootmgrd.8.html --- old/rebootmgr-0.10/man/rebootmgrd.8.html 2017-02-16 14:54:21.000000000 +0100 +++ new/rebootmgr-0.11/man/rebootmgrd.8.html 2017-02-27 16:06:21.000000000 +0100 @@ -15,7 +15,7 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.9</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 0.10</span><hr><div class="refentry"><a name="rebootmgrd.8"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrd, rebootmgr.service, org.opensuse.RebootMgr.conf — Reboot the machine during a maintenance window.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/sbin/rebootmgrd</code> [ --debug | --help | --version ]</p></div><p><code class="filename">/usr/lib/systemd/system/rebootmgr.service</code></p><p><code class="filename">/etc/dbus-1/system.d/org.opensuse.RebootMgr.conf</code></p></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>To avoid that a whole cluster or a set of machines with the same task reboot at the same there, <span class="emphasis"><em>rebootmgrd</em></span> reboots the machine following configured policies.</p><div class="refsect2"><a name="reboot_strategy_options"></a><h3 id="Reboot Strategies">Reboot Strategies<a class="headerlink" title="Permalink to this headline" href="#Reboot%20Strategies">¶</a></h3><p> rebootmgr supports different strategies, when a reboot should be done: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/src/lock-etcd.c new/rebootmgr-0.11/src/lock-etcd.c --- old/rebootmgr-0.10/src/lock-etcd.c 2017-02-16 14:53:06.000000000 +0100 +++ new/rebootmgr-0.11/src/lock-etcd.c 2017-02-27 17:30:58.000000000 +0100 @@ -135,7 +135,6 @@ { assert(idx < num_server); ++idx; - printf ("idx=%i, token=%s\n", idx, token); cetcd_array_append (addrs, token); } token = strtok(NULL, URL_DELIM); @@ -271,6 +270,52 @@ return 0; } + +/* + return values: + 1: own a lock + 0: don't own a lock + -1: error +*/ +static int +internal_etcd_own_lock (cetcd_client *cli, const char *group, + const char *machine_id) +{ + char *path = NULL; + int have_lock = 0; + cetcd_response *resp; + + /* Check if the data structure for the locks exists, else create them */ + if (asprintf (&path, "%s/%s/data", ETCD_LOCKS, group) == -1) + return -1; + resp = cetcd_get (cli, path); + free (path); + if (resp->err) + { + if (resp->err->ecode == 100) + create_lock_dir (cli, group); + else + log_msg (LOG_ERR, "ERROR: %d, %s (%s)", resp->err->ecode, + resp->err->message, resp->err->cause); + } + else + { + json_object *jobj = json_tokener_parse (resp->node->value); + + if (machine_id == NULL) + have_lock = is_id_in_holders (jobj, get_machine_id()); + else + have_lock = is_id_in_holders (jobj, machine_id); + + json_object_put (jobj); + } + + cetcd_response_release (resp); + + return have_lock; +} + + /* return values: 0: success @@ -306,6 +351,14 @@ } cetcd_response_release (resp); + /* Check if we have the lock already. Don't try to get it a + second time, deadlock possible! */ + if (internal_etcd_own_lock (&cli, group, machine_id)) + { + retval = 0; + goto cleanup; + } + /* try in a loop to get a mutex with current locks lower than max locks */ while (!have_lock) { @@ -380,7 +433,7 @@ { if (debug_flag) log_msg (LOG_DEBUG, "max locks reached for group '%s'", group); - if (watch_key (&cli, group, "count", 0 /* XXX */) != 0) + if (watch_key (&cli, group, "mutex", 0 /* XXX */) != 0) goto cleanup; } } @@ -392,6 +445,7 @@ return retval; } + /* return values: 0: success @@ -405,11 +459,14 @@ int retval = 1; int removed_lock = 0; - if (!etcd_own_lock (group)) - return 0; - setup_etcd_connection(&addrs, &cli); + if (!internal_etcd_own_lock (&cli, group, machine_id)) + { + retval = 0; + goto cleanup; + } + /* try in a loop to get a mutex */ while (!removed_lock) { @@ -565,43 +622,21 @@ int etcd_own_lock (const char *group) { + int retval; cetcd_client cli; - cetcd_response *resp; cetcd_array addrs; - char *path = NULL; - int have_lock = 0; setup_etcd_connection(&addrs, &cli); - /* Check if the data structure for the locks exists, else create them */ - if (asprintf (&path, "%s/%s/data", ETCD_LOCKS, group) == -1) - return -1; - resp = cetcd_get (&cli, path); - free (path); - if (resp->err) - { - if (resp->err->ecode == 100) - create_lock_dir (&cli, group); - else - log_msg (LOG_ERR, "ERROR: %d, %s (%s)", resp->err->ecode, - resp->err->message, resp->err->cause); - } - else - { - json_object *jobj = json_tokener_parse (resp->node->value); - - have_lock = is_id_in_holders (jobj, get_machine_id ()); - - json_object_put (jobj); - } + retval = internal_etcd_own_lock (&cli, group, get_machine_id ()); - cetcd_response_release (resp); cetcd_array_destroy (&addrs); cetcd_client_destroy (&cli); - return have_lock; + return retval; } + /* check if etcd is running. return values: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-0.10/src/rebootmgrd.c new/rebootmgr-0.11/src/rebootmgrd.c --- old/rebootmgr-0.10/src/rebootmgrd.c 2017-02-07 14:54:38.000000000 +0100 +++ new/rebootmgr-0.11/src/rebootmgrd.c 2017-02-21 16:49:38.000000000 +0100 @@ -123,6 +123,7 @@ etcd_is_running()) || ctx->reboot_strategy == RM_REBOOTSTRATEGY_ETCD_LOCK)) { + ctx->reboot_status = RM_REBOOTSTATUS_WAITING_ETCD; if (etcd_get_lock (ctx->lock_group, NULL) != 0) { log_msg (LOG_ERR, "ERROR: etcd_get_lock failed, abort reboot"); Binary files old/rebootmgr-0.10/tests/test-etcd and new/rebootmgr-0.11/tests/test-etcd differ
participants (1)
-
root@hilbertn.suse.de