Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2016-02-08 09:47:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2016-01-26 10:14:52.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2016-02-08 09:47:44.000000000 +0100 @@ -1,0 +2,19 @@ +Thu Feb 04 07:00:04 UTC 2016 - [email protected] + +- Update to version 2.2.0+git.1454489864.2aa76e4: + + medium: corosync: added optional parameter [name] to "corosync add-node" function + + medium: command: Disable fuzzy matcher for completion (#116) + +------------------------------------------------------------------- +Wed Jan 27 11:36:03 UTC 2016 - [email protected] + +- Update to version 2.2.0+git.1453820226.445f556: + + high: Add "push" method to "configure load" command (fate#320389) + + medium: history: update patterns for resource (new lrmd) + + medium: cibconfig: add and|or filter combinators to influence filtering (fate#320401) + + medium: constants: clone-min meta attribute (new in Pacemaker 1.1.14) + + low: maintenance: allow action to be forced + +- Move dependencies of crmsh-test package to post + +------------------------------------------------------------------- Old: ---- crmsh-2.2.0+git.1453451184.2fbd420.tar.bz2 New: ---- crmsh-2.2.0+git.1454489864.2aa76e4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.ao6aoz/_old 2016-02-08 09:47:45.000000000 +0100 +++ /var/tmp/diff_new_pack.ao6aoz/_new 2016-02-08 09:47:45.000000000 +0100 @@ -36,12 +36,16 @@ Summary: High Availability cluster command-line interface License: GPL-2.0+ Group: %{pkg_group} -Version: 2.2.0+git.1453451184.2fbd420 +Version: 2.2.0+git.1454489864.2aa76e4 Release: 0 Url: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} +# Requiring pacemaker makes crmsh harder to build on other distributions, +# and is mostly a convenience feature. So only do it for SUSE. Requires(pre): pacemaker +%endif Requires: %{name}-scripts >= %{version}-%{release} Requires: /usr/bin/which Requires: python >= 2.6 @@ -77,7 +81,7 @@ BuildRequires: libxslt-tools %endif -%if 0%{?suse_version} > 1110 +%if 0%{?suse_version} > 1110 || 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?fedora} BuildArch: noarch %endif @@ -92,29 +96,26 @@ Group: %{pkg_group} Requires: crmsh %if 0%{?with_regression_tests} -BuildRequires: mailx -BuildRequires: procps -BuildRequires: python-dateutil -BuildRequires: python-nose -BuildRequires: python-parallax -BuildRequires: vim -Requires: pacemaker +Requires(post): mailx +Requires(post): procps +Requires(post): python-dateutil +Requires(post): python-nose +Requires(post): python-parallax +Requires(post): pacemaker %if 0%{?suse_version} > 1110 BuildArch: noarch %endif %if 0%{?suse_version} -BuildRequires: libglue-devel -BuildRequires: libpacemaker-devel +Requires(post): libglue-devel %else -BuildRequires: cluster-glue-libs-devel -BuildRequires: pacemaker-libs-devel +Requires(post): cluster-glue-libs-devel %endif %if 0%{?fedora_version} -BuildRequires: PyYAML +Requires(post): PyYAML %else -BuildRequires: python-PyYAML +Requires(post): python-PyYAML %endif %endif ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ao6aoz/_old 2016-02-08 09:47:45.000000000 +0100 +++ /var/tmp/diff_new_pack.ao6aoz/_new 2016-02-08 09:47:45.000000000 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">2fbd420746e62e1b727472a2a1beb0a95b560b4a</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">2aa76e41e1f21d6ffbfeb317b214183e4f1ea85b</param></service></servicedata> \ No newline at end of file ++++++ crmsh-2.2.0+git.1453451184.2fbd420.tar.bz2 -> crmsh-2.2.0+git.1454489864.2aa76e4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/.travis.yml new/crmsh-2.2.0+git.1454489864.2aa76e4/.travis.yml --- old/crmsh-2.2.0+git.1453451184.2fbd420/.travis.yml 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/.travis.yml 2016-02-04 08:00:04.000000000 +0100 @@ -7,4 +7,5 @@ install: - "pip install -r requirements.txt" script: ./test/run --with-coverage - +notifications: + irc: "chat.freenode.net#clusterlabs-dev" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/AUTHORS new/crmsh-2.2.0+git.1454489864.2aa76e4/AUTHORS --- old/crmsh-2.2.0+git.1453451184.2fbd420/AUTHORS 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/AUTHORS 2016-02-04 08:00:04.000000000 +0100 @@ -3,6 +3,7 @@ afederic <afederic[at]gmail[dot]com> Adam Spiers <aspiers[at]suse[dot]com> + Andrei Maruha <Andrei_Maruha[at]epam[dot]com> Andrew Beekhof <andrew[at]beekhof[dot]net> Borislav Borisov <borislav[dot]v[dot]borisov[at]gmail[dot]com> Christian Seiler <christian[at]iwakd[dot]de> @@ -17,6 +18,7 @@ Kristoffer Gronlund <kgronlund[at]suse[dot]com> Lars Ellenberg <lars[dot]ellenberg[at]linbit[dot]com> Lars Marowsky-Brée <lmb[at]suse[dot]de> + Marc A. Smith <marc[at]astersmith[dot]com> Michael Prokop <devnull[at]localhost> Motaharu Kobu <mkubo[at]3ware[dot]co[dot]jp> NAKAHIRA Kazutomo <nakahira[dot]kazutomo[at]oss[dot]ntt[dot]co[dot]jp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/Makefile.am new/crmsh-2.2.0+git.1454489864.2aa76e4/Makefile.am --- old/crmsh-2.2.0+git.1453451184.2fbd420/Makefile.am 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/Makefile.am 2016-02-04 08:00:04.000000000 +0100 @@ -68,12 +68,7 @@ --build-base $(shell readlink -f $(builddir))/build \ --verbose) -# Fix for GNU/Linux -if UNAME_IS_DEBIAN -python_prefix = -else python_prefix = --prefix=$(prefix) -endif install-exec-local: -mkdir -p $(DESTDIR)$(pkgpythondir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/configure.ac new/crmsh-2.2.0+git.1454489864.2aa76e4/configure.ac --- old/crmsh-2.2.0+git.1453451184.2fbd420/configure.ac 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/configure.ac 2016-02-04 08:00:04.000000000 +0100 @@ -41,8 +41,6 @@ dnl Wrap in m4_ifdef to avoid breaking on older platforms m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) -AM_CONDITIONAL([UNAME_IS_DEBIAN], [test x`uname -v | grep -oh Debian` = x"Debian"]) - AC_SUBST(OCF_ROOT_DIR) AC_SUBST(CRM_DAEMON_USER) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/data-manifest new/crmsh-2.2.0+git.1454489864.2aa76e4/data-manifest --- old/crmsh-2.2.0+git.1453451184.2fbd420/data-manifest 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/data-manifest 2016-02-04 08:00:04.000000000 +0100 @@ -29,8 +29,10 @@ scripts/init/main.yml scripts/init/verify.py scripts/libvirt/main.yml +scripts/lvm-drbd/main.yml scripts/lvm/main.yml scripts/mailto/main.yml +scripts/nfsserver-lvm-drbd/main.yml scripts/nfsserver/main.yml scripts/ocfs2/main.yml scripts/oracle/main.yml @@ -147,6 +149,7 @@ test/unittests/scripts/legacy/main.yml test/unittests/scripts/templates/apache.xml test/unittests/scripts/templates/virtual-ip.xml +test/unittests/scripts/unified/main.yml test/unittests/scripts/v2/main.yml test/unittests/scripts/vipinc/main.yml test/unittests/scripts/vip/main.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/crm.8.adoc new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/crm.8.adoc --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/crm.8.adoc 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/crm.8.adoc 2016-02-04 08:00:04.000000000 +0100 @@ -1211,7 +1211,7 @@ Usage: ......... -add-node <addr> +add-node <addr> [name] ......... [[cmdhelp_corosync_del-node,Remove a corosync node]] @@ -2936,8 +2936,11 @@ Load a part of configuration (or all of it) from a local file or a network URL. The +replace+ method replaces the current -configuration with the one from the source. The +update+ tries to -import the contents into the current configuration. +configuration with the one from the source. The +update+ method +tries to import the contents into the current configuration. The ++push+ method imports the contents into the current configuration +and removes any lines that are not present in the given +configuration. The file may be a CLI file or an XML file. If the URL is `-`, the configuration is read from standard input. @@ -2946,12 +2949,13 @@ ............... load [xml] <method> URL -method :: replace | update +method :: replace | update | push ............... Example: ............... load xml update myfirstcib.xml load xml replace http://storage.big.com/cibs/bigcib.xml +load xml push smallcib.xml ............... [[cmdhelp_configure_location,a location preference]] @@ -3653,6 +3657,11 @@ example, to show both the tag itself and the objects tagged by it the following combination can be used: +show tag:my-tag my-tag+. +To refine a selection of objects using multiple modifiers, the keywords ++and+ and +or+ can be used. For example, to select all primitives tagged ++foo+, the following combination can be used: ++show type:primitive and tag:foo+. + Usage: ............... show [xml] [<id> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/Makefile new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/Makefile --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/Makefile 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/Makefile 2016-02-04 08:00:04.000000000 +0100 @@ -1,7 +1,7 @@ ASCIIDOC := asciidoc CRMCONF := crm.conf SRC := faq.adoc documentation.adoc development.adoc installation.adoc \ - configuration.adoc about.adoc rsctest-guide.adoc \ + configuration.adoc about.adoc rsctest-guide.adoc download.adoc \ history-guide.adoc start-guide.adoc man-1.2.adoc scripts.adoc man-2.0.adoc HISTORY_LISTINGS = include/history-guide/nfs-probe-err.typescript \ include/history-guide/sample-cluster.conf.crm \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/crm.conf new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/crm.conf --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/crm.conf 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/crm.conf 2016-02-04 08:00:04.000000000 +0100 @@ -549,14 +549,28 @@ </head> <body> <div id="header"> -<h1><a href="/"><span class="fa-stack"> +<h1> +<a href="/"><span class="fa-stack"> <i class="fa fa-square fa-stack-2x"></i> <i class="fa fa-terminal fa-stack-1x fa-inverse"></i> -</span>crmsh</a></h1> +</span>crmsh</a> +</h1> + +<div id="topbar-small"> +<ul> +<li><a href="/news" title="News"><i class="fa fa-rss fa-2x"></i></a></li> +<li><a href="/documentation" title="Documentation"><i class="fa fa-book fa-2x"></i></a></li> +<li><a href="/download" title="Download"><i class="fa fa-download fa-2x"></i></a></li> +<li><a href="/development" title="Development"><i class="fa fa-code-fork fa-2x"></i></a></li> +<li><a href="/about" title="About"><i class="fa fa-question fa-2x"></i></a></li> +</ul> +</div> + <div id="topbar"> <ul> <li><a href="/news">News</a></li> <li><a href="/documentation">Documentation</a></li> +<li><a href="/download">Download</a></li> <li><a href="/development">Development</a></li> <li><a href="/about">About</a></li> </ul> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/css/crm.css new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/css/crm.css --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/css/crm.css 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/css/crm.css 2016-02-04 08:00:04.000000000 +0100 @@ -7,15 +7,20 @@ Kristoffer Gronlund <[email protected]> --------------------------------------------------------------------------- */ +/* Fonts */ + body { font-family:'Open Sans', 'lucida grande',verdana,helvetica,arial,sans-serif; - font-size: 100%; - line-height: 1.3636rem; - margin: 0px 0px; - padding: 0px; - width: 100%; - color:#333; - background: #fff; + font-size: 16px; + line-height: 21px; +} + +.small { + font-size: 12px; /* 75% of the baseline */ +} + +.large { + font-size: 20px; /* 125% of the baseline */ } em { @@ -28,6 +33,78 @@ .monospaced { font-family: 'Menlo', 'Monaco', 'Consolas', 'lucida console', 'bitstream vera sans mono', 'courier new', monospace; +} + +dt { + font-weight:normal; +} + +h1, h2, h3, h4, h5 { + font-family:'Open Sans', 'lucida grande',verdana,helvetica,arial,sans-serif; + font-weight:normal; +} + +h1 { + font-size:2.6rem; + line-height:1.428; +} + +h2 { + font-size:2rem; + line-height:1.36363636; /* repeating, of course */ +} + +h3 { + font-size:1.6rem; + line-height:1.1; +} + +h4 { + font-weight: bold; + font-size:1.3rem; + line-height:1.538; +} + +h5 { + font-size:1.2rem; + font-style:italic; + line-height:1.538; +} + +pre { + font-family:'Menlo', 'Monaco', consolas, 'lucida console', 'bitstream vera sans mono', 'courier new', monospace; + font-size: 14px; +} + +#header h1 { + font-size: 42px; + margin: 0px; + display: inline; +} + +#topbar { + display: inline; + font-size: 18px; +} + +#topbar-small { + display: none; + font-size: 14px; +} + + + +/* Style */ + +body { + margin: 0px 0px; + padding: 0px; + width: 100%; + color:#333; + background: #fff; +} + +.monospaced { color: #211; background-color: #fafaf8; } @@ -50,13 +127,10 @@ } dt { - font-weight:normal; color:#000; } h1, h2, h3, h4, h5 { - font-family:'Open Sans', 'lucida grande',verdana,helvetica,arial,sans-serif; - font-weight:normal; color:#000; } @@ -66,44 +140,22 @@ } h1 { - font-size:2.6rem; - line-height:1.428; margin:0px; margin-top: 48px; } h2 { - font-size:2rem; - line-height:1.36363636; /* repeating, of course */ margin-top: 36px; margin-bottom: 1.5rem; } -h2 + .sectionbody {} - h3 { - font-size:1.6rem; - line-height:1.1; margin: 0px; margin-top: 30px; } -h4 { - font-weight: bold; - font-size:1.3rem; - line-height:1.538; -} - -h5 { - font-size:1.2rem; - font-style:italic; - line-height:1.538; -} - pre { - font-family:'Menlo', 'Monaco', consolas, 'lucida console', 'bitstream vera sans mono', 'courier new', monospace; color: #211; - font-size: 85%; overflow-x: auto; } @@ -113,12 +165,9 @@ padding-top: 4px; padding-bottom: 0px; border-bottom: 2px solid #efefea; -} - -#header h1 { - margin: 0px; - font-size: 42px; - display: inline; + width: 100%; + height: 86px; + overflow: hidden; } #header a { @@ -130,11 +179,6 @@ color:#ee3300; } -#topbar { - display: inline; - font-size: 18px; -} - #topbar ul { list-style: none; display: inline; @@ -146,6 +190,19 @@ padding-right: 1rem; } +#topbar-small ul { + list-style: none; + display: inline; + padding-left: 0.5rem; +} + +#topbar-small li { + list-style: none; + display: inline; + padding-right: 0.5rem; +} + + #container { max-width: 720px; margin-left: 240px; @@ -173,7 +230,6 @@ #content { - text-align: justify; } h1 { @@ -253,12 +309,12 @@ } div.sidebarblock > div.content { - border-left:4px solid #419eda; + border-left:4px solid #ee3300; background: #faf7f8; padding:0 10px; color:#222; - font-size:smaller; - line-height:1.5; + font-size: 14px; + line-height:18px; max-width: 720px; background-image: -moz-linear-gradient(left, right, @@ -274,7 +330,7 @@ div.sidebarblock .title { margin:10px 0; font-weight:bold; - font-size: 1.1rem; + font-size: 14px; color:#442; } @@ -307,7 +363,7 @@ } #footer { - font-size:11px; + font-size: 12px; color:#888; margin-top:40px; text-align: right; @@ -324,7 +380,7 @@ } .nav a { - font-size: 120%; + font-size: 20px; text-decoration: none; } @@ -349,12 +405,11 @@ top: 120px; left: 4px; margin: 0px; - font-size: 80%; - line-height: 1rem; + font-size: 12px; + line-height: 1.2em; } #toc a .monospaced { - font-size: small; color:#419eda; } @@ -363,28 +418,28 @@ } #toc .toclevel1 { - font-weight: bold; padding: 1px; + margin-top: 8px; + font-size: 14px; + line-height: 16px; } #toc .toclevel2 { margin-left: 8px; - color: #aaaaaa; padding-left: 4px; - line-height: 1.2rem; + font-size: 12px; + line-height: 16px; } #toc .toclevel3 { - font-size: 0.8rem; - line-height: 1rem; margin-left: 24px; - color: #aaaaaa; padding-left: 4px; + font-size: 11px; + line-height: 15px; + font-weight: bold; } #toctitle { - font-size:1.2rem; - line-height:1.1rem; margin:20px 0; } @@ -402,6 +457,13 @@ padding-right: 8px; } + #topbar { + display: none; + } + + #topbar-small { + display: inline; + } } @media screen and (min-width: 900px) and (max-width: 1280px) { @@ -424,7 +486,14 @@ } #container { - max-width: 1024px; + max-width: 960px; + } +} + +@media screen and (min-width: 1500px) { + #container { + margin-left: auto; + margin-right: auto; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/development.adoc new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/development.adoc --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/development.adoc 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/development.adoc 2016-02-04 08:00:04.000000000 +0100 @@ -1,14 +1,10 @@ = Development = -`crmsh` is a free software project and is open to contributors. -Patches, comments, documentation, testing and so on are -all very much welcome! - == Tools == ++++ <ul class="nav"> -<li><a href="https://github.com/ClusterLabs/crmsh"><i class="fa fa-archive fa-3x fa-fw"></i> Source Repository</a></li> +<li><a href="https://github.com/ClusterLabs/crmsh"><i class="fa fa-code-fork fa-3x fa-fw"></i> Source Repository</a></li> <li><a href="http://clusterlabs.org/mailman/listinfo/users"><i class="fa fa-envelope fa-3x fa-fw"></i> Mailing List</a></li> <li><a href="https://github.com/ClusterLabs/crmsh/issues"><i class="fa fa-bug fa-3x fa-fw"></i> Issue Tracker</a></li> <li><a href="irc://freenode.net/#clusterlabs"><i class="fa fa-comments fa-3x fa-fw"></i> IRC: #clusterlabs on Freenode</a></li> @@ -16,7 +12,7 @@ </ul> ++++ -== Get the source == +== Source Code == The source code for `crmsh` is kept in a http://git-scm.com/[git] repository @@ -66,8 +62,6 @@ to run after installation, on a system which has both crmsh and pacemaker installed. You will also need to install +pacemaker+ and the +cluster-glue+ development headers. -On SUSE-based systems, these dependencies are packaged as `libglue-devel` and `libpacemaker-devel`. - * link:http://hg.linux-ha.org/glue[cluster-glue] * link:https://github.com/ClusterLabs/pacemaker[pacemaker] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/documentation.adoc new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/documentation.adoc --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/documentation.adoc 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/documentation.adoc 2016-02-04 08:00:04.000000000 +0100 @@ -1,22 +1,20 @@ = Documentation = -`crmsh` begun as a bundled interface to the Pacemaker cluster manager, -but has grown beyond simply configuring Pacemaker to handling many -more aspects of the Linux HA stack. It also serves as the backend for -the Hawk web interface. - The main documentation for `crmsh` comes in the form of the -_manual_, which is the same help as found using the `help` +`manual`, which is the same help as found using the `help` command in the interactive shell. -Beyond this, we've also written a couple of guides and other documents -that will hopefully make using the shell as simple and painless as -possible. +Additionally, there are a couple of guides and other documents +that will hopefully make using the shell as easy as possible. + +== Manual == -== Documents == +* link:/man[Manual (Development)] +* link:/man-2.0[Manual (v2.x)] +* link:/man-1.2[Manual (v1.2.x)] + +== Guides == -* link:/man[Manual (Development)], link:/man-2.0[(Release 2.x)], link:/man-1.2[(Release 1.2)] -* link:/installation[Installation] * link:/start-guide[Getting Started] * link:/history-guide[History Guide] * link:/rsctest-guide[Resource Testing Guide] @@ -40,5 +38,3 @@ For more information on Pacemaker in general, see the http://clusterlabs.org/doc/[Pacemaker documentation] at `clusterlabs.org`. -For details on command line usage, see the link:/man[Manual]. - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/download.adoc new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/download.adoc --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/download.adoc 1970-01-01 01:00:00.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/download.adoc 2016-02-04 08:00:04.000000000 +0100 @@ -0,0 +1,44 @@ += Download = + +The easiest way to install `crmsh` is via the package manager of your distribution. + +== SLES / openSUSE == + +`crmsh` is commercially supported on SLE via the https://www.suse.com/products/highavailability/[SUSE Linux Enterprise High Availability Extension]. It is also available for openSUSE with the package name `crmsh`. Development packages can be downloaded from the OBS: + +* https://build.opensuse.org/package/show/network:ha-clustering:Stable/crmsh[Stable version] +* https://build.opensuse.org/package/show/network:ha-clustering:Factory/crmsh[Development version] + +== Red Hat / Fedora == + +We try to build Red Hat / Fedora-compatible RPM packages on the OBS (see above). + +=== Fedora 22 === + +Download http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/Fedora_22/network:ha-clustering:Stable.repo[network:ha-clustering:Stable.repo] and copy it to the '/etc/yum.repos.d/' directory as `root`. + +Then, run + +---- +yum install crmsh +---- + +== Debian == + +The versions of `crmsh` and `pacemaker` currently available in the latest Debian release are quite old. Newer packages are available via the Debian-HA team https://wiki.debian.org/Debian-HA[wiki] and the distribution packages will hopefully be updated soon. + +== Ubuntu == + +Packages for `crmsh` are available from the https://launchpad.net/ubuntu/+source/crmsh[Launchpad]. + +== Gentoo == + +A fairly up-to-date version is available https://packages.gentoo.org/packages/sys-cluster/crmsh[here]. + +== Arch == + +`crmsh` is available via the https://aur.archlinux.org/packages/ha-pacemaker-crmsh/[AUR]. Unfortunately the package seems somewhat out of date. + +== Source Packages == + +Releases are available as `.tar.gz` or `.zip` archives via https://github.com/ClusterLabs/crmsh/releases[Github]. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/index.adoc new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/index.adoc --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/index.adoc 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/index.adoc 2016-02-04 08:00:04.000000000 +0100 @@ -1,25 +1,23 @@ -Cluster Shell +The CRM Shell ============= ++++ <div class="frontpage-image"> +<br><br> <img src="/img/laptop.png"> +<br><br><br> </div> ++++ -The `crm` cluster management shell is an advanced *command-line -interface* for the Pacemaker High Availability stack in -GNU/Linux. +*`crmsh` is a cluster management shell* for the Pacemaker High Availability stack. -Effortlessly configure, manage and troubleshoot -your clusters from the command line, with full tab completion and -extensive help. `crmsh` provides advanced features like low-level -cluster configuration, cluster scripting, package management, -and history exploration tools giving you a complete insight into what -your cluster is doing. +Configure, manage and troubleshoot clusters from the command line, +with full tab completion and extensive help. `crmsh` also provides +advanced features like low-level cluster configuration, cluster scripting, +package management, and history exploration tools giving you a complete +insight into the state of your cluster. -For more information, see the link:/documentation[Documentation]! - -* https://github.com/ClusterLabs/crmsh/[Get the source] -* http://crmsh.github.io/man-2.0/[Reference Manual (version 2.2.0)] -* https://build.opensuse.org/package/show/network:ha-clustering:Stable/crmsh[RPMs for SUSE / Red Hat] +* https://github.com/ClusterLabs/crmsh/[Source Code] +* http://crmsh.github.io/man-2.0/[Reference Manual (v2.2.0)] +* https://build.opensuse.org/package/show/network:ha-clustering:Stable/crmsh[Packages] +* http://clusterlabs.org[Cluster Labs] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/installation.adoc new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/installation.adoc --- old/crmsh-2.2.0+git.1453451184.2fbd420/doc/website-v1/installation.adoc 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/doc/website-v1/installation.adoc 2016-02-04 08:00:04.000000000 +0100 @@ -1,59 +1,4 @@ Installation ============ -Packages for the *current stable version* for -SLES, openSUSE, CentOS, Fedora and RHEL: - -* https://build.opensuse.org/package/show/network:ha-clustering:Stable/crmsh[OBS Project Page] - -* http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/[Direct package downloads] - -For other distributions, packages may be available in the respective -package repositories. - -== openSUSE - -On openSUSE, you will want to add the -http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/[network:ha-clustering:Stable] repository, to get the latest stable version of the `crm` shell: - -=== Repository links === - -* http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/openSUSE_12.3/[openSUSE 12.3] -* http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/openSUSE_13.1/[openSUSE 13.1] - - -.Adding a repository using zypper: ----- -zypper ar <repository> network:ha-clustering:Stable ----- - -Once added, you can run - ----- -zypper in crmsh ----- - -== Fedora 19 - -Download http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/Fedora_19/network:ha-clustering:Stable.repo[network:ha-clustering:Stable.repo] -and copy it to the '/etc/yum.repos.d/' directory as `root`. - -Then, you can run - ----- -yum install crmsh ----- - -== Debian - -Packages for Debian are provided by the Debian HA maintainers. For more -information, see the Debian packages list: - -- http://packages.debian.org/search?keywords=crmsh - -== Ubuntu - -There are packages that are fairly up-to-date in the more recent -versions of Ubuntu: - -- https://launchpad.net/ubuntu/+source/crmsh +See link:/download[Download]. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/cibconfig.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/cibconfig.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/cibconfig.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/cibconfig.py 2016-02-04 08:00:04.000000000 +0100 @@ -8,29 +8,30 @@ import re import fnmatch import time -from collections import defaultdict +import collections from . import config from . import options from . import constants from . import tmpfiles -from .parse import CliParser from . import clidisplay -from .cibstatus import cib_status from . import idmgmt -from .ra import get_ra, get_properties_list, get_pe_meta from . import schema -from .crm_gv import gv_types +from . import utils +from . import cibverify +from . import parse +from . import ordereddict +from . import orderedset +from . import cibstatus +from . import crm_gv +from .ra import get_ra, get_properties_list, get_pe_meta from .msg import common_warn, common_err, common_debug, common_info, err_buf from .msg import common_error, constraint_norefobj_err, cib_parse_err, no_object_err from .msg import missing_obj_err, common_warning, update_err, unsupported_err, empty_cib_err from .msg import invalid_id_err, cib_ver_unsupported_err -from . import utils from .utils import ext_cmd, safe_open_w, pipe_string, safe_close_w, crm_msec from .utils import ask, lines2cli, olist from .utils import page_string, cibadmin_can_patch, str2tmp from .utils import run_ptest, is_id_valid, edit_file, get_boolean, filter_string -from .ordereddict import odict -from .orderedset import oset from .xmlutil import is_child_rsc, rsc_constraint, sanitize_cib, rename_id, get_interesting_nodes from .xmlutil import is_pref_location, get_topnode, new_cib, get_rscop_defaults_meta_node from .xmlutil import rename_rscref, is_ms, silly_constraint, is_container, fix_comments @@ -47,7 +48,6 @@ from .cliformat import cli_nvpair, cli_acl_rule, rsc_set_constraint, get_kind, head_id_format from .cliformat import cli_operations, simple_rsc_constraint, cli_rule, cli_format from .cliformat import cli_acl_role, cli_acl_permission -from . import cibverify def show_unrecognized_elems(cib_elem): @@ -245,8 +245,8 @@ rc, self.obj_set = cib_factory.mkobj_set(*self.args) self.search_rc = rc self.all_set = cib_factory.get_all_obj_set() - self.obj_ids = oset([o.obj_id for o in self.obj_set]) - self.all_ids = oset([o.obj_id for o in self.all_set]) + self.obj_ids = orderedset.oset([o.obj_id for o in self.obj_set]) + self.all_ids = orderedset.oset([o.obj_id for o in self.all_set]) self.locked_ids = self.all_ids - self.obj_ids def _open_url(self, src): @@ -357,10 +357,10 @@ def _get_gv_obj(self, gtype): if not self.obj_set: return True, None - if gtype not in gv_types: + if gtype not in crm_gv.gv_types: common_err("graphviz type %s is not supported" % gtype) return False, None - gv_obj = gv_types[gtype]() + gv_obj = crm_gv.gv_types[gtype]() set_graph_attrs(gv_obj, ".") return True, gv_obj @@ -403,7 +403,7 @@ def import_file(self, method, fname): ''' - method: update or replace + method: update or replace or push ''' if not cib_factory.is_cib_sane(): return False @@ -413,7 +413,10 @@ s = f.read() if f != sys.stdin: f.close() - return self.save(s, no_remove=True, method=method) + if method == 'push': + return self.save(s, remove=True, method='update') + else: + return self.save(s, remove=False, method=method) def repr(self, format=format): ''' @@ -422,7 +425,7 @@ ''' return '' - def save(self, s, no_remove=False, method='replace'): + def save(self, s, remove=True, method='replace'): ''' For each object: - try to find a corresponding object in obj_set @@ -469,7 +472,7 @@ if o.obj_type == "primitive"]) if not check_set: return 0 - clash_dict = defaultdict(list) + clash_dict = collections.defaultdict(list) for obj in set_obj_all.obj_set: node = obj.node if is_primitive(node): @@ -538,7 +541,7 @@ return node[0].get('id') return node.get('id') - def save(self, s, no_remove=False, method='replace'): + def save(self, s, remove=True, method='replace'): ''' Save a user supplied cli format configuration. On errors user is typically asked to review the @@ -551,7 +554,7 @@ diff = CibDiff(self) rc = True err_buf.start_tmp_lineno() - cp = CliParser() + cp = parse.CliParser() for cli_text in lines2cli(s): err_buf.incr_lineno() node = cp.parse(cli_text) @@ -566,7 +569,7 @@ if not rc: return rc - rc = diff.apply(cib_factory, mode='cli', no_remove=no_remove, method=method) + rc = diff.apply(cib_factory, mode='cli', remove=remove, method=method) if not rc: self._initialize() return rc @@ -590,7 +593,7 @@ return "fencing_topology" return node.get("id") - def save(self, s, no_remove=False, method='replace'): + def save(self, s, remove=True, method='replace'): try: cib_elem = etree.fromstring(s) except etree.ParseError, msg: @@ -605,7 +608,7 @@ rc = diff.add(node) if not rc: return rc - rc = diff.apply(cib_factory, mode='xml', no_remove=no_remove, method=method) + rc = diff.apply(cib_factory, mode='xml', remove=remove, method=method) if not rc: self._initialize() return rc @@ -625,7 +628,7 @@ if not cib_factory.is_cib_sane(): return False cib_elem = cib_factory.obj_set2cib(self.obj_set) - status = cib_status.get_status() + status = cibstatus.cib_status.get_status() if status is None: common_err("no status section found") return False @@ -792,7 +795,7 @@ input: CLI text output: XML, obj_type, obj_id """ - parser = CliParser() + parser = parse.CliParser() if validation is not None: for p in parser.parsers.values(): p.validation = validation @@ -1261,7 +1264,7 @@ def __init__(self, op_name, prim, node=None): self.prim = prim self.node = node - self.attr_d = odict() + self.attr_d = ordereddict.odict() self.attr_d["name"] = op_name if self.node is not None: self.xml2dict() @@ -1918,7 +1921,7 @@ def _repr_cli_head(self, format): s = clidisplay.keyword(self.obj_type) - d = odict() + d = ordereddict.odict() for c in self.node.iterchildren("fencing-level"): if "target-attribute" in c.attrib: target = (c.get("target-attribute"), c.get("target-value")) @@ -1927,7 +1930,7 @@ if target not in d: d[target] = {} d[target][c.get("index")] = c.get("devices") - dd = odict() + dd = ordereddict.odict() for target in d.keys(): sorted_keys = sorted([int(i) for i in d[target].keys()]) dd[target] = [d[target][str(x)] for x in sorted_keys] @@ -2064,7 +2067,7 @@ # generate a translation cli -> tag -backtrans = odict((item[0], key) for key, item in cib_object_map.iteritems()) +backtrans = ordereddict.odict((item[0], key) for key, item in cib_object_map.iteritems()) def default_id_for_tag(tag): @@ -2094,9 +2097,9 @@ ''' def __init__(self, objset): self.objset = objset - self._node_set = oset() + self._node_set = orderedset.oset() self._nodes = {} - self._rsc_set = oset() + self._rsc_set = orderedset.oset() self._resources = {} def add(self, item): @@ -2139,12 +2142,12 @@ return False def _obj_nodes(self): - return oset([n for n in self.objset.obj_ids - if self._is_node(n)]) + return orderedset.oset([n for n in self.objset.obj_ids + if self._is_node(n)]) def _obj_resources(self): - return oset([n for n in self.objset.obj_ids - if self._is_resource(n)]) + return orderedset.oset([n for n in self.objset.obj_ids + if self._is_resource(n)]) def _is_edit_valid(self, id_set, existing): ''' @@ -2168,7 +2171,7 @@ rc = False return rc - def apply(self, factory, mode='cli', no_remove=False, method='replace'): + def apply(self, factory, mode='cli', remove=True, method='replace'): rc = True edited_nodes = self._nodes.copy() @@ -2176,11 +2179,11 @@ def calc_sets(input_set, existing): rc = True - if not no_remove: + if remove: rc = self._is_edit_valid(input_set, existing) del_set = existing - (input_set) else: - del_set = oset() + del_set = orderedset.oset() mk_set = (input_set) - existing upd_set = (input_set) & existing return rc, mk_set, upd_set, del_set @@ -2997,33 +3000,69 @@ ret += [m for m in matches if m is not None] return ret - def mkobj_set(self, *args): - if not args: + def filter_objects(self, filters): + """ + Filter out a set of objects given a list of filters. + + Complication: We want to refine selections, for example + type:primitive tag:foo should give all primitives tagged foo, + or type:node boo should give the node boo, but not the primitive boo. + + Add keywords and|or to influence selection? + Default to "or" between matches (like now) + + type:primitive or type:group = all primitives and groups + type:primitive and foo = primitives with id foo + type:primitive and foo* = primitives that start with id foo + type:primitive or foo* = all that start with id foo plus all primitives + type:primitive and tag:foo + + Returns: + True, set() on success + false, err on failure + """ + if len(filters) == 0: return True, copy.copy(self.cib_objects) - if args[0] == "NOOBJ": - return True, [] - rc = True - obj_set = oset([]) - for spec in args: + if filters[0] == 'NOOBJ': + return True, orderedset.oset([]) + obj_set = orderedset.oset([]) + and_filter, and_set = False, None + for spec in filters: + if spec == "or": + continue + elif spec == "and": + and_filter, and_set = True, obj_set + obj_set = orderedset.oset([]) + continue if spec == "changed": - obj_set |= oset(self.modified_elems()) + obj_set |= orderedset.oset(self.modified_elems()) elif spec.startswith("type:"): - obj_set |= oset(self.get_elems_on_type(spec)) + obj_set |= orderedset.oset(self.get_elems_on_type(spec)) elif spec.startswith("tag:"): - obj_set |= oset(self.get_elems_on_tag(spec)) + obj_set |= orderedset.oset(self.get_elems_on_tag(spec)) elif spec.startswith("related:"): name = spec[len("related:"):] - obj_set |= oset(self.find_objects(name) or []) + obj_set |= orderedset.oset(self.find_objects(name) or []) obj = self.find_object(name) if obj is not None: - obj_set |= oset(self.related_elements(obj)) + obj_set |= orderedset.oset(self.related_elements(obj)) else: objs = self.find_objects(spec) or [] for obj in objs: obj_set.add(obj) if len(objs) == 0: - no_object_err(spec) - rc = False + return False, spec + if and_filter is True: + and_filter, obj_set = False, obj_set.intersection(and_set) + if and_filter is True: + and_filter, obj_set = False, and_set + return True, obj_set + + def mkobj_set(self, *args): + rc, obj_set = self.filter_objects(args) + if rc is False: + no_object_err(obj_set) + return False, orderedset.oset([]) return rc, obj_set def get_all_obj_set(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/command.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/command.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/command.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/command.py 2016-02-04 08:00:04.000000000 +0100 @@ -379,7 +379,11 @@ If none is found, a fuzzy matcher is used to pick a close match ''' - return fuzzy_get(self._children, child) + from . import options + if options.shell_completion: + return self._children.get(child) + else: + return fuzzy_get(self._children, child) def is_sublevel(self, child): ''' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/constants.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/constants.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/constants.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/constants.py 2016-02-04 08:00:04.000000000 +0100 @@ -212,6 +212,7 @@ clone_meta_attributes = ( "ordered", "notify", "interleave", "globally-unique", "clone-max", "clone-node-max", "clone-state", "description", + "clone-min", ) ms_meta_attributes = ( "master-max", "master-node-max", "description", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/corosync.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/corosync.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/corosync.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/corosync.py 2016-02-04 08:00:04.000000000 +0100 @@ -368,35 +368,45 @@ f.close() -def add_node(name): +def add_node(addr, name=None): ''' Add node to corosync.conf ''' coronodes = None nodes = None + nodenames = None coronodes = utils.list_corosync_nodes() + nodenames = utils.list_corosync_node_names() try: nodes = utils.list_cluster_nodes() except Exception: nodes = [] - ipaddr = get_ip(name) - if name in coronodes or (ipaddr and ipaddr in coronodes): + ipaddr = get_ip(addr) + if addr in nodenames + coronodes or (ipaddr and ipaddr in coronodes): + err_buf.warning("%s already in corosync.conf" % (addr)) + return + if name and name in nodenames + coronodes: err_buf.warning("%s already in corosync.conf" % (name)) return - if name in nodes: + if addr in nodes: + err_buf.warning("%s already in configuration" % (addr)) + return + if name and name in nodes: err_buf.warning("%s already in configuration" % (name)) return f = open(conf()).read() p = Parser(f) - node_addr = name + node_addr = addr node_id = next_nodeid(p) + node_name = name + node_value = (make_value('nodelist.node.ring0_addr', node_addr) + + make_value('nodelist.node.nodeid', str(node_id))) + if node_name: + node_value += make_value('nodelist.node.name', node_name) - p.add('nodelist', - make_section('nodelist.node', - make_value('nodelist.node.ring0_addr', node_addr) + - make_value('nodelist.node.nodeid', str(node_id)))) + p.add('nodelist', make_section('nodelist.node', node_value)) num_nodes = p.count('nodelist.node') if num_nodes > 2: @@ -414,6 +424,10 @@ utils.ext_cmd(["corosync-cmapctl", "-s", "nodelist.node.%s.ring0_addr" % (num_nodes - 1), "str", node_addr], shell=False) + if node_name: + utils.ext_cmd(["corosync-cmapctl", + "-s", "nodelist.node.%s.name" % (num_nodes - 1), + "str", node_name], shell=False) def del_node(addr): @@ -443,3 +457,5 @@ shell=False) utils.ext_cmd(["corosync-cmapctl", "-D", "nodelist.node.%s.ring0_addr" % (nth)], shell=False) + utils.ext_cmd(["corosync-cmapctl", "-D", "nodelist.node.%s.name" % (nth)], + shell=False) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/log_patterns_118.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/log_patterns_118.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/log_patterns_118.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/log_patterns_118.py 2016-02-04 08:00:04.000000000 +0100 @@ -25,12 +25,17 @@ ( # detail 0 "crmd.*Initiating.*%%_(?:start|stop|promote|demote|migrate)_", "lrmd.*operation_finished: %%_", + "lrmd.*executing - rsc:%% action:(?:start|stop|promote|demote|migrate)", + "lrmd.*finished - rsc:%% action:(?:start|stop|promote|demote|migrate)", + "crmd.*LRM operation %%_(?:start|stop|promote|demote|migrate)_.*confirmed=true", "crmd.*LRM operation %%_.*Timed Out", "[(]%%[)][[]", ), ( # detail 1 - "crmd.*Initiating%%_(?:monitor_0|notify)", + "crmd.*Initiating.*%%_(?:monitor_0|notify)", + "lrmd.*executing - rsc:%% action:(?:monitor_0|notify)", + "lrmd.*finished - rsc:%% action:(?:monitor_0|notify)", ), ), "node": ( @@ -74,3 +79,5 @@ ), ), } + +# vim:ts=4:sw=4:et: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/orderedset.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/orderedset.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/orderedset.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/orderedset.py 2016-02-04 08:00:04.000000000 +0100 @@ -75,6 +75,10 @@ self.discard(key) return key + def intersection(self, other): + # return set with all objects in self that are in other + return OrderedSet([x for x in self if x in other]) + def __repr__(self): if not self: return '%s()' % (self.__class__.__name__,) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/ui_configure.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/ui_configure.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/ui_configure.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/ui_configure.py 2016-02-04 08:00:04.000000000 +0100 @@ -87,7 +87,7 @@ def _load_2nd_completer(args): if args[1] == 'xml': - return ['replace', 'update'] + return ['replace', 'update', 'push'] return [] @@ -491,9 +491,9 @@ return set_obj.save_to_file(filename) @command.skill_level('administrator') - @command.completers(compl.choice(['xml', 'replace', 'update']), _load_2nd_completer) + @command.completers(compl.choice(['xml', 'replace', 'update', 'push']), _load_2nd_completer) def do_load(self, context, *args): - "usage: load [xml] {replace|update} {<url>|<path>}" + "usage: load [xml] {replace|update|push} {<url>|<path>}" if len(args) < 2: context.fatal_error("Expected 2 arguments (0 given)") if args[0] == "xml": @@ -508,7 +508,7 @@ url = args[1] method = args[0] xml = False - if method not in ("replace", "update"): + if method not in ("replace", "update", "push"): context.fatal_error("Unknown method %s" % method) if method == "replace": if options.interactive and cib_factory.has_cib_changed(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/ui_corosync.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/ui_corosync.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/ui_corosync.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/ui_corosync.py 2016-02-04 08:00:04.000000000 +0100 @@ -120,9 +120,9 @@ @command.name('add-node') @command.alias('add_node') @command.skill_level('administrator') - def do_addnode(self, context, name): + def do_addnode(self, context, addr, name=None): "Add a node to the corosync nodelist" - corosync.add_node(name) + corosync.add_node(addr, name) @command.name('del-node') @command.alias('del_node') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/ui_maintenance.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/ui_maintenance.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/ui_maintenance.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/ui_maintenance.py 2016-02-04 08:00:04.000000000 +0100 @@ -3,6 +3,7 @@ from . import command from . import completers as compl +from . import config from .cibconfig import cib_factory from . import utils from . import xmlutil @@ -71,7 +72,7 @@ context.fatal_error("Resource not found: %s" % (resource)) if not xmlutil.is_resource(obj.node): context.fatal_error("Not a resource: %s" % (resource)) - if not self._in_maintenance_mode(obj): + if not config.core.force and not self._in_maintenance_mode(obj): context.fatal_error("Not in maintenance mode.") if ssh is None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/modules/utils.py new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/utils.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/modules/utils.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/modules/utils.py 2016-02-04 08:00:04.000000000 +0100 @@ -1337,6 +1337,25 @@ return True, None +def list_corosync_node_names(): + ''' + Returns list of nodes configured + in corosync.conf + ''' + try: + cfg = os.getenv('COROSYNC_MAIN_CONFIG_FILE', '/etc/corosync/corosync.conf') + lines = open(cfg).read().split('\n') + name_re = re.compile(r'\s*name:\s+(.*)') + names = [] + for line in lines: + name = name_re.match(line) + if name: + names.append(name.group(1)) + return names + except Exception: + return [] + + def list_corosync_nodes(): ''' Returns list of nodes configured diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/test/testcases/newfeatures new/crmsh-2.2.0+git.1454489864.2aa76e4/test/testcases/newfeatures --- old/crmsh-2.2.0+git.1453451184.2fbd420/test/testcases/newfeatures 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/test/testcases/newfeatures 2016-02-04 08:00:04.000000000 +0100 @@ -20,6 +20,9 @@ tag tag2 p0 p1 p2 location l1 { p0 p1 p2 } inf: node1 primitive node1 Dummy +tag ones l1 p1 +show tag:ones and type:location +show tag:ones and p1 show _test verify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/test/testcases/newfeatures.exp new/crmsh-2.2.0+git.1454489864.2aa76e4/test/testcases/newfeatures.exp --- old/crmsh-2.2.0+git.1453451184.2fbd420/test/testcases/newfeatures.exp 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/test/testcases/newfeatures.exp 2016-02-04 08:00:04.000000000 +0100 @@ -14,6 +14,12 @@ .INP: tag tag2 p0 p1 p2 .INP: location l1 { p0 p1 p2 } inf: node1 .INP: primitive node1 Dummy +.INP: tag ones l1 p1 +.INP: show tag:ones and type:location +location l1 { p0 p1 p2 } inf: node1 +.INP: show tag:ones and p1 +primitive p1 Dummy \ + params rule $role=Started date in start=2009-05-26 end=2010-05-26 or date gt 2014-01-01 state=2 .INP: show node node1 primitive node1 Dummy @@ -28,6 +34,7 @@ meta target-role=Started \ op start requires=nothing timeout=60s interval=0 \ op monitor interval=60m timeout=60s +tag ones l1 p1 tag tag1 p0 p1 p2 tag tag2 p0 p1 p2 location l1 { p0 p1 p2 } inf: node1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/test/testcases/scripts.exp new/crmsh-2.2.0+git.1454489864.2aa76e4/test/testcases/scripts.exp --- old/crmsh-2.2.0+git.1453451184.2fbd420/test/testcases/scripts.exp 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/test/testcases/scripts.exp 2016-02-04 08:00:04.000000000 +0100 @@ -32,6 +32,7 @@ filesystem Filesystem (mount point) gfs2 gfs2 filesystem (cloned) gfs2-base gfs2 filesystem base (cloned) +lvm-drbd LVM Group on DRBD ocfs2 OCFS2 Filesystem raid-lvm RAID hosting LVM @@ -48,6 +49,7 @@ apache Apache Webserver exportfs NFS Exported File System nfsserver NFS Server +nfsserver-lvm-drbd NFS Server on LVM and DRBD Stonith: @@ -77,6 +79,7 @@ filesystem Filesystem (mount point) gfs2 gfs2 filesystem (cloned) gfs2-base gfs2 filesystem base (cloned) +lvm-drbd LVM Group on DRBD ocfs2 OCFS2 Filesystem raid-lvm RAID hosting LVM @@ -105,6 +108,7 @@ apache Apache Webserver exportfs NFS Exported File System nfsserver NFS Server +nfsserver-lvm-drbd NFS Server on LVM and DRBD Stonith: @@ -131,8 +135,10 @@ init libvirt lvm +lvm-drbd mailto nfsserver +nfsserver-lvm-drbd ocfs2 oracle raid-lvm @@ -166,8 +172,10 @@ init libvirt lvm +lvm-drbd mailto nfsserver +nfsserver-lvm-drbd ocfs2 oracle raid-lvm @@ -201,8 +209,10 @@ init libvirt lvm +lvm-drbd mailto nfsserver +nfsserver-lvm-drbd ocfs2 oracle raid-lvm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-2.2.0+git.1453451184.2fbd420/test/unittests/test_bugs.py new/crmsh-2.2.0+git.1454489864.2aa76e4/test/unittests/test_bugs.py --- old/crmsh-2.2.0+git.1453451184.2fbd420/test/unittests/test_bugs.py 2016-01-22 09:27:54.000000000 +0100 +++ new/crmsh-2.2.0+git.1454489864.2aa76e4/test/unittests/test_bugs.py 2016-02-04 08:00:04.000000000 +0100 @@ -700,14 +700,14 @@ obj = cibconfig.mkset_obj() assert obj is not None ok = obj.save("""primitive node1 Dummy params fake=something-else - """, no_remove=True, method='update') + """, remove=False, method='update') assert ok print "** end" obj = cibconfig.mkset_obj() assert obj is not None - ok = obj.save(original_cib, no_remove=False, method='replace') + ok = obj.save(original_cib, remove=True, method='replace') assert ok obj = cibconfig.mkset_obj() with clidisplay.nopretty():
