Bug 1357945
| Summary: | [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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Pokorný [poki] <jpokorny> | ||||||
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.1 | CC: | cfeist, cluster-maint, idevat, mlisik, omular, tojeline | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| 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 20:59:22 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1343661 | ||||||||
| Attachments: |
|
||||||||
re [comment 0]: 2b. ... one may _pass_ newer distro specification ... 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".
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...
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) Created attachment 1182136 [details]
proposed fix
re [comment 4]: There was several out-of-band clarifications, including: s/cluster_pcs_1_2/cluster_pcs_flatiron/ 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`
Created attachment 1187088 [details]
documentation fixes
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. Content of previous comment10 was mistake (it belong to another bugzilla). Please ignore it. 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 |
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.