Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357945 - [clufter integration] clufter is distribution-sensitive wrt. new features so pass the current one on cluster.conf/corosync.conf match and allow user's override
Summary: [clufter integration] clufter is distribution-sensitive wrt. new features so ...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact:
Depends On:
Blocks: 1343661
TreeView+ depends on / blocked
Reported: 2016-07-19 16:08 UTC by Jan Pokorný [poki]
Modified: 2016-11-03 20:59 UTC (History)
6 users (show)

Fixed In Version: pcs-0.9.152-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-11-03 20:59:22 UTC
Target Upstream Version:

Attachments (Terms of Use)
proposed fix (deleted)
2016-07-20 14:45 UTC, Tomas Jelinek
no flags Details | Diff
documentation fixes (deleted)
2016-08-03 13:33 UTC, Tomas Jelinek
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2596 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2016-11-03 12:11:34 UTC

Description Jan Pokorný [poki] 2016-07-19 16:08:52 UTC
This is to allow smooth integration with clufter that intends to no
longer "cater all" (at the expense of output complexity) but rather
to provide a customized, distro-fitting sequence of commands.

For this to be possible, following should be implemented:

0. implement --dist switch to the commands discussed below, with
   the purpose of passing the provided value down to clufter
   as eponymous argument; for guidance, see man clufter:

> --dist=DIST                                                                    
>        override autodetected target distro (for SYS ~ linux)
>        [redhat,7.2,Maipo]

   + don't forget to always pass "linux" as "sys" argument
   + expose --dist equivalent in the help, etc.

1. for "config export pcs-commands", unless overridden per 0., pass
   "dist" argument matching the current
   "platform.linux_distribution(full_distribution_name=0)" result

2. for "config import-cman" for output-format={cluster,corosync}.conf
2a. if pcs is run on RHEL 6/7 and output-format=cluster/corosync.conf
    respectively (i.e., a match there on major distro), ditto 1.
2b. if no match, use current defaults (and raise a warning that
    if the target is newer, one may newer distro specification
    through --dist, and obtain perhaps more suitable results

3. for "config import-cman" for output-format=pcs-commands{,-verbose}
3a. distinguish ccs2pcscmd_{flatiron,needle} per is_rhel6() as the
    the output may differ in the future, also due to differences
    imposed by availability of qdevice when converting from cman-ish
3b+c. see 2a+b.

Comment 1 Jan Pokorný [poki] 2016-07-19 16:13:32 UTC
re [comment 0]:

2b. ... one may _pass_ newer distro specification ...

Comment 2 Jan Pokorný [poki] 2016-07-20 06:45:44 UTC
Clarification re 0:

- with "--dist switch", I mean a respective equivalent of this in clufter
  executable that fits naturally to the command syntax of pcs;
  to ease the use, I can imagine a split between distro and version
  like this:

> pcs config export pcs-commands dist=<DIST> \
>   distver=<VER>

(where, apparently, dist and distver must be provided both or none)

with some currently supported pairs (see clufter/

rhel    6.8
centos  7.2
redhat  7.3
debian  7
ubuntu  trusty

Then, pcs should pass "linux" as "sys" parameter (to repeat that), and
a string "<DIST>,<DISTVER>" (borrowing the above notions) as "dist".

Comment 3 Jan Pokorný [poki] 2016-07-20 07:04:13 UTC
Plus a minor request: please make "output=<filename>" for "config export
pcs-commands{,-verbose}" optional, defaulting to stdout (warning content
coming from clufter is emitted at stderr so it should be all fine).

In the future, I plan to nicely colorize the pcs syntax in the emitted
commands and this will only work when outputting to terminal...

Comment 4 Jan Pokorný [poki] 2016-07-20 10:02:06 UTC
Clarification re 2a + 3a:

- thinking about it, is_rhel6() usage should be avoided in favor of
  of clufter's opinion expressed as facts.cluster_pcs_1_2(sys, dist-tuple)
  (where pcs means pacemaker configuration system, not pcs tool)

Comment 5 Tomas Jelinek 2016-07-20 14:45:43 UTC
Created attachment 1182136 [details]
proposed fix

Comment 6 Jan Pokorný [poki] 2016-07-20 16:59:54 UTC
re [comment 4]:

There was several out-of-band clarifications, including:

Comment 7 Ivan Devat 2016-07-28 14:14:05 UTC
Before Fix:
[vm-rhel72-1 ~] $ rpm -q pcs                                                                      
[vm-rhel72-1 ~] $ pcs config export pcs-commands dist=redhat,7.3

Usage: pcs config export...
    export pcs-commands|pcs-commands-verbose output=<filename>
        Creates a list of pcs commands which upon execution recreates
        the current cluster running on this node.  Commands will be saved
        to 'output' file.  Use pcs-commands to get a simple list of commands,
        whereas pcs-commands-verbose creates a list including comments and debug

After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
[vm-rhel72-1 ~] $ pcs config export pcs-commands dist=redhat,7.3
[needlexml2pcscmd       ] xslt: NOTE: cluster infrastructure services not enabled at this point, which can be changed any time by issuing `pcs cluster enable --all`
[cib2pcscmd             ] xslt: WARNING: dropping non-whitelisted cluster property: `have-watchdog`
[cib2pcscmd             ] xslt: WARNING: dropping non-whitelisted cluster property: `dc-version`
[cib2pcscmd             ] xslt: WARNING: dropping non-whitelisted cluster property: `cluster-infrastructure`
[cib2pcscmd             ] xslt: WARNING: dropping non-whitelisted cluster property: `cluster-name`

Comment 9 Tomas Jelinek 2016-08-03 13:33:14 UTC
Created attachment 1187088 [details]
documentation fixes

Comment 10 Ivan Devat 2016-08-05 15:03:29 UTC
Before Fix:
[vm-rhel72-1 ~] $ rpm -q pcs

Look of unmanaged resources do not differ from managed.

After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs

Unamanaged resources are shown correctly with status 'unamanaged'. Also there are new buttons for manage/unmanage resource.

Comment 11 Ivan Devat 2016-08-05 15:05:58 UTC
Content of previous comment10 was mistake (it belong to another bugzilla). Please ignore it.

Comment 15 errata-xmlrpc 2016-11-03 20:59:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Note You need to log in before you can comment on or make changes to this bug.