Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1300050 - clufter: validation failure in ccs2pcs ([64:0] Type ID doesn't allow value '-OP-monitor')
Summary: clufter: validation failure in ccs2pcs ([64:0] Type ID doesn't allow value '-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: clufter
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Pokorný [poki]
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1269964 1343661
TreeView+ depends on / blocked
 
Reported: 2016-01-19 20:24 UTC by Miroslav Lisik
Modified: 2016-10-11 19:38 UTC (History)
2 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-03-16 15:47:34 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Miroslav Lisik 2016-01-19 20:24:54 UTC
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ý [poki] 2016-01-21 17:41:01 UTC
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ý [poki] 2016-03-16 15:47:34 UTC
This is already fixed in clufter-0.56.0-1.el6+.

Comment 4 Miroslav Lisik 2016-03-16 16:12:56 UTC
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ý [poki] 2016-10-10 13:04:16 UTC
Note this is addressed in RHEL 7.3 through rebase ([bug 1343661]).

Comment 6 Jan Pokorný [poki] 2016-10-10 13:39:47 UTC
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.