Bug 1300050 - clufter: validation failure in ccs2pcs ([64:0] Type ID doesn't allow value '-OP-monitor')
clufter: validation failure in ccs2pcs ([64:0] Type ID doesn't allow value '-...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: clufter (Show other bugs)
6.8
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jan Pokorný
cluster-qe@redhat.com
:
Depends On:
Blocks: 1269964 1343661
  Show dependency treegraph
 
Reported: 2016-01-19 15:24 EST by Miroslav Lisik
Modified: 2016-10-11 15:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
ccs2pcs* commands no longer generate accidentally broken values of attributes marked as having an ID type in the schema.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-16 11:47:34 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)

  None (edit)
Description Miroslav Lisik 2016-01-19 15:24:54 EST
Description of problem:

Validation failure in `clufter ccs2pcs` command in cibcompact2cib filter.

Version-Release number of selected component (if applicable):

python-clufter-0.55.0-3.el6.x86_64
clufter-cli-0.55.0-3.el6.noarch

How reproducible:
always

Steps to Reproduce:

1. Create a configurate file `cluster.conf` with a resource whose attribute has mapping to pacemaker operations (e.g. apache has shutdown_wait attribute which is mapped to pacemaker stop operation).

[root@virt-176 ~]# cat cluster.conf
<?xml version="1.0"?>
<cluster config_version="1" name="clustername">
        <cman/>
        <clusternodes>
        </clusternodes>
        <fencedevices>
        </fencedevices>
        <rm>
                <service autostart="0" name="apache">
                        <apache config_file="/etc/httpd/conf/httpd.conf" httpd="/usr/sbin/httpd" name="webserver"/>
                </service>
        </rm>
</cluster>


2. Try to convert `cluster.conf` to `cib.xml` by clufter-cli

[root@virt-176 ~]# clufter ccs2pcs --input="/etc/cluster/cluster.conf" --batch
[ccs-version-bump     ] output: cluster-eb2d904e.conf
WARNING:clufter.format:Invalid as per RNG file `/usr/lib/python2.6/site-packages/clufter/formats/cib/pacemaker-1.2.rng'
WARNING:clufter.format:None of the validation attempts succeeded with validator spec `('/usr/lib/python2.6/site-packages/clufter/formats/cib/pacemaker-1.2.rng',)' 
FAILED filter: cibcompact2cib
[root@virt-176 ~]# echo $?
1

Actual results:
Clufter exited with failure and didn't produce cib.xml file.

Expected results:
Clufter exited without failure and produced cib.xml file


Additional info:

Hint from clufter's interactive mode:
[64:0] Type ID doesn't allow value '-OP-monitor'
Comment 1 Jan Pokorný 2016-01-21 12:41:01 EST
Fixed upstream with
https://pagure.io/clufter/9d05be31568d8e2c7f3d48b9d8b5914742cd363a

This will be propagated to new proper upstream release soon and new
rebase will be done as a matter of [bug 1269964].
Comment 3 Jan Pokorný 2016-03-16 11:47:34 EDT
This is already fixed in clufter-0.56.0-1.el6+.
Comment 4 Miroslav Lisik 2016-03-16 12:12:56 EDT
Tested with clufter-0.56.1-1.el6.

[root@virt-010 clufter-1300050]# cat cluster.conf 
<?xml version="1.0"?>
<cluster config_version="1" name="clustername">
        <cman/>
        <clusternodes>
        </clusternodes>
        <fencedevices>
        </fencedevices>
        <rm>
                <service autostart="0" name="apache">
                        <apache config_file="/etc/httpd/conf/httpd.conf" httpd="/usr/sbin/httpd" name="webserver"/>
                </service>
        </rm>
</cluster>
[root@virt-010 clufter-1300050]# clufter ccs2pcs --input=cluster.conf
[ccs-version-bump     ] output: cluster-9173d503.conf
[cibcompact2cib       ] xslt: NOTE: no fencing is configured hence stonith is disabled; please note, however, that this is suboptimal, especially in shared storage scenarios
[cib2cibfinal         ] output: cib-9173d503.xml
[root@virt-010 clufter-1300050]# echo $?
0

> Configuration files is produced and exit status is 0 as expected.

[root@virt-010 clufter-1300050]# cat cib-9173d503.xml
<cib validate-with="pacemaker-1.2" admin_epoch="0" epoch="0" num_updates="0" update-client="clufter 0.56.1">
  <configuration>
    <crm_config>
      <!-- NOTE: no fencing is configured hence stonith is disabled; please note, however, that this is suboptimal, especially in shared storage scenarios -->
      <cluster_property_set id="CRMCONFIG-bootstrap">
        <nvpair id="CRMCONFIG-bootstrap-STONITH-ENABLED" name="stonith-enabled" value="false"/>
      </cluster_property_set>
    </crm_config>
    <nodes/>
    <resources>
      <!-- FENCING/STONITH (+ POSSIBLY TOPOLOGY BELOW) -->
      <!-- RESOURCES+ARRANGEMENT -->
      <group id="SERVICE-apache-GROUP">
        <primitive id="RESOURCE-apache-webserver" description="natively converted from apache RA" class="ocf" provider="heartbeat" type="apache">
          <instance_attributes id="RESOURCE-apache-webserver-ATTRS">
            <nvpair id="RESOURCE-apache-webserver-ATTRS-configfile" name="configfile" value="/etc/httpd/conf/httpd.conf"/>
            <nvpair id="RESOURCE-apache-webserver-ATTRS-options" name="options" value=" -Dwebserver -d &quot;/etc/httpd&quot;"/>
            <nvpair id="RESOURCE-apache-webserver-ATTRS-httpd" name="httpd" value="/usr/sbin/httpd"/>
          </instance_attributes>
          <operations>
            <op id="RESOURCE-apache-webserver-OP-monitor" name="monitor" interval="60s"/>
          </operations>
        </primitive>
        <!-- mimic no-autostart resource group (SERVICE-apache)-->
        <meta_attributes id="SERVICE-apache-META-ATTRS-autostart">
          <nvpair id="SERVICE-apache-META-is-managed" name="is-managed" value="false"/>
        </meta_attributes>
      </group>
    </resources>
    <constraints/>
  </configuration>
  <status/>
</cib>

[root@virt-010 clufter-1300050]# cat cluster-9173d503.conf
<cluster config_version="2" name="clustername">
  <cman/>
  <clusternodes>
        </clusternodes>
  <fencedevices>
    <fencedevice agent="fence_pcmk" name="pcmk-redirect"/>
  </fencedevices>
  <rm disabled="1"/>
</cluster>
Comment 5 Jan Pokorný 2016-10-10 09:04:16 EDT
Note this is addressed in RHEL 7.3 through rebase ([bug 1343661]).
Comment 6 Jan Pokorný 2016-10-10 09:39:47 EDT
Note this is, even earlier, addressed in RHEL 6.8 through rebase
([bug 1269964], as mentioned in [comment 1]).

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