Bug 1171312

Summary: [RFE] pcs should be able to import cluster.conf and convert it into a pacemaker configuration/sequence of PCS commands
Product: Red Hat Enterprise Linux 6 Reporter: Jan Pokorný [poki] <jpokorny>
Component: pcsAssignee: Chris Feist <cfeist>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact: Steven J. Levine <slevine>
Priority: medium    
Version: 6.5CC: cluster-maint, cluster-qe, djansa, fdinitto, jharriga, jpokorny, jruemker, lmiccini, rsteiger, sbradley, tlavigne, tojeline
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.139-8.el6 Doc Type: Enhancement
Doc Text:
New package: clufter The clufter package is now installed as a pcs dependency. With clufter installed, pcs is able to import CMAN configuration from the cluster.conf file and convert it into Pacemaker configuration. This package is currently available only as a Technology Preview.
Story Points: ---
Clone Of: 1133897 Environment:
Last Closed: 2015-07-22 06:15:49 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: 1111368, 1133897, 1182358    
Bug Blocks:    
Attachments:
Description Flags
proposed fix for hacluster issue
none
proposed fix for the duplicated nodes issue none

Description Jan Pokorný [poki] 2014-12-05 21:27:38 UTC
Separate "clufter" [1] package to be requested for distro inclusion.

[1] https://github.com/jnpkrn/clufter

+++ This bug was initially created as a clone of Bug #1133897 +++

There is an utility for this in the works, it should be integrated
to the pcs "suite".

Comment 2 Chris Feist 2015-03-04 17:13:35 UTC
Before Fix:

No python-clufter package

After Fix:

python-clufter package exists!

Comment 3 Tomas Jelinek 2015-03-13 15:34:39 UTC
Before fix:
pcs does not require python-clufter package

After fix:
pcs requires python-clufter package

Note:
python-clufter have been moved to its own component so pcs does not provide python-clufter package any longer.

Comment 6 Tomas Jelinek 2015-04-01 15:23:50 UTC
Created attachment 1009726 [details]
proposed fix for hacluster issue

Comment 9 Tomas Jelinek 2015-04-03 08:42:56 UTC
Created attachment 1010541 [details]
proposed fix for the duplicated nodes issue

requires python-clufter-0.10.4-0.1.a_ff7ec7f or newer

Comment 10 Tomas Jelinek 2015-04-03 08:45:07 UTC
Moving back to ON_QA because of one more fix.

Comment 13 Jan Pokorný [poki] 2015-04-17 15:22:34 UTC
Note that "convert it into a sequence of PCS commands" part of the
assingment is currently fulfilled on the level of direct usage of
"clufter" command provided by clufter-cli (sub)package:

$ clufter -l | sed -n ':s;/.*pcscmd/{p;n;/^   /p;bs}'
>  ccs2pcscmd-flatiron  (CMAN,rgmanager) cluster cfg. -> equivalent in pcs
>                       commands
>  ccs2pcscmd-needle    [COMMAND CURRENTLY UNAVAILABLE]
>  pcs2pcscmd-flatiron  (Corosync/CMAN,Pacemaker) cluster cfg. -> reinstating
>                       pcs commands
>  pcs2pcscmd-needle    [COMMAND CURRENTLY UNAVAILABLE]
>  ccs2pcscmd           alias for ccs2pcscmd-flatiron
>  pcs2pcscmd           alias for pcs2pcscmd-flatiron

(NOTE: the -needle variants are not implemented yet, but it's not a big
       issue since we are talking about RHEL 6, i.e., flatiron variants
       as per respective corosync major version code names)

Example:

$ ./run-dev ccs2pcscmd-flatiron - <<-EOF
	<?xml version="1.0"?>
	<cluster name="clu" config_version="1">
	  <clusternodes>
	    <clusternode nodeid="1" name="a" />
	    <clusternode nodeid="2" name="b" />
	  </clusternodes>
	  <cman two_node="1"/>
	  <totem consensus="200" join="100" token="5000"
	         token_retransmits_before_loss_const="4">
	    <interface ttl="3"/>
	  </totem>
	  <rm>
	    <failoverdomains/>
	    <resources/>
	  </rm>
	</cluster>
EOF
> [cibcompact2cib     ] XSLT: NOTE: no fencing is configured hence stonith
>                       is disabled; please note, however, that this is
>                       suboptimal, especially in shared storage scenarios
> pcs cluster setup --name clu a b --consensus 200 --join 100 --token 5000
> pcs property set 'stonith-enabled=false'
> [stringiter-combine2] output file: <stdout>

Comment 20 errata-xmlrpc 2015-07-22 06:15:49 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/RHBA-2015-1446.html