Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
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
[clufter integration] clufter is distribution-sensitive wrt. new features so ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs (Show other bugs)
7.1
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Tomas Jelinek
cluster-qe@redhat.com
:
Depends On:
Blocks: 1343661
  Show dependency treegraph
 
Reported: 2016-07-19 12:08 EDT by Jan Pokorný
Modified: 2016-11-03 16:59 EDT (History)
6 users (show)

See Also:
Fixed In Version: pcs-0.9.152-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 16:59:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed fix (12.23 KB, patch)
2016-07-20 10:45 EDT, Tomas Jelinek
no flags Details | Diff
documentation fixes (6.98 KB, patch)
2016-08-03 09:33 EDT, Tomas Jelinek
no flags Details | Diff


External Trackers
Tracker 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 08:11:34 EDT

  None (edit)
Description Jan Pokorný 2016-07-19 12:08:52 EDT
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
    quorumd
3b+c. see 2a+b.
Comment 1 Jan Pokorný 2016-07-19 12:13:32 EDT
re [comment 0]:

2b. ... one may _pass_ newer distro specification ...
Comment 2 Jan Pokorný 2016-07-20 02:45:44 EDT
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 output=review-me.sh dist=<DIST> \
>   distver=<VER>

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

with some currently supported pairs (see clufter/facts.py):

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ý 2016-07-20 03:04:13 EDT
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ý 2016-07-20 06:02:06 EDT
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 10:45 EDT
Created attachment 1182136 [details]
proposed fix
Comment 6 Jan Pokorný 2016-07-20 12:59:54 EDT
re [comment 4]:

There was several out-of-band clarifications, including:
s/cluster_pcs_1_2/cluster_pcs_flatiron/
Comment 7 Ivan Devat 2016-07-28 10:14:05 EDT
Before Fix:
[vm-rhel72-1 ~] $ rpm -q pcs                                                                      
pcs-0.9.152-4.el7.x86_64
[vm-rhel72-1 ~] $ pcs config export pcs-commands output=review-me.sh 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
        messages.


After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.152-5.el7.x86_64
[vm-rhel72-1 ~] $ pcs config export pcs-commands output=review-me.sh 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 09:33 EDT
Created attachment 1187088 [details]
documentation fixes
Comment 10 Ivan Devat 2016-08-05 11:03:29 EDT
Before Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.152-5.el7.x86_64

Look of unmanaged resources do not differ from managed.

After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.152-6.el7.x86_64

Unamanaged resources are shown correctly with status 'unamanaged'. Also there are new buttons for manage/unmanage resource.
Comment 11 Ivan Devat 2016-08-05 11:05:58 EDT
Content of previous comment10 was mistake (it belong to another bugzilla). Please ignore it.
Comment 15 errata-xmlrpc 2016-11-03 16:59:22 EDT
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.

https://rhn.redhat.com/errata/RHSA-2016-2596.html

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