RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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 ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
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:
Environment:
Last Closed: 2016-11-03 20:59:22 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2596 0 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
    quorumd
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 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ý [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:
s/cluster_pcs_1_2/cluster_pcs_flatiron/

Comment 7 Ivan Devat 2016-07-28 14:14:05 UTC
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 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
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 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.

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.