Bug 1300050
| Summary: | clufter: validation failure in ccs2pcs ([64:0] Type ID doesn't allow value '-OP-monitor') | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Miroslav Lisik <mlisik> | 
| Component: | clufter | Assignee: | Jan Pokorný [poki] <jpokorny> | 
| Status: | CLOSED CURRENTRELEASE | QA Contact: | cluster-qe <cluster-qe> | 
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.8 | CC: | salmy, slevine | 
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 15:47:34 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: | 1269964, 1343661 | ||
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]. This is already fixed in clufter-0.56.0-1.el6+. 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 "/etc/httpd""/>
            <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>
    Note this is addressed in RHEL 7.3 through rebase ([bug 1343661]). Note this is, even earlier, addressed in RHEL 6.8 through rebase ([bug 1269964], as mentioned in [comment 1]).  | 
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'