Bug 1272592

Summary: clufter add extra internal attribute into resulting cib.xml when converting vm resource
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Lisik <mlisik>
Component: clufterAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED UPSTREAM QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: slevine
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
ccs2pcs conversion now does not take undeployed (contained in <resources> and not referenced elsewhere) into account and is more careful about carrying about parent service group auxiliary reference for further processing.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-10 12:41:24 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    
Attachments:
Description Flags
configuration file cluster.conf with vm resource none

Description Miroslav Lisik 2015-10-16 20:11:45 UTC
Created attachment 1083801 [details]
configuration file cluster.conf with vm resource

Description of problem:
clufter add extra internal attribute into resulting cib.xml when converting vm resource

Version-Release number of selected component (if applicable):
clufter-cli-0.50.4-1.el7

How reproducible:
always

Steps to Reproduce:

1. Convert attached configuration file with vm resource using clufter.
2. Check the meta attribute of the converted vm resource.

Actual results:

The meta attribute of name 'rgmanager-service' is present in resulting cib.xml
<meta_attributes id="RESOURCE-vm-lxc-01-META">
          <nvpair id="RESOURCE-vm-lxc-01-META-service" name="rgmanager-service" value="RM-"/>
</meta_attributes>

Expected results:

The metta attribude of name 'rgmanager-service' is not present in resulting cib.xml.

Comment 1 Jan Pokorný [poki] 2016-10-10 12:41:24 UTC
Thanks for the report.

Should be fixed upstream as of:
https://pagure.io/clufter/c/ff356d31e26c1965e3a09efac45f20b1cf48ec52

Comment 2 Jan Pokorný [poki] 2016-10-10 13:14:43 UTC
Note this is addressed in RHEL 7.3 through rebase ([bug 1343661]).

Comment 3 Jan Pokorný [poki] 2016-10-10 13:22:18 UTC
Note this is, even earlier, addressed in RHEL 6.8 through rebase
([bug 1269964]).

Comment 4 Miroslav Lisik 2016-10-10 15:58:19 UTC
[root@virt-101 ~]# rpm -q clufter-cli
clufter-cli-0.59.5-2.el7.noarch
[root@virt-101 ~]# cat cluster.conf 
<?xml version="1.0"?>
<cluster name="test" config_version="1">

  <clusternodes>
  </clusternodes>

  <fencedevices>
  </fencedevices>

  <rm>
    <failoverdomains/>
    <vm autostart="1" hypervisor_uri="lxc:///" name="lxc-01" path="/etc/libvirt/lxc" recovery="restart" xmlfile="/etc/libvirt/lxc/lxc-01.xml"/>
  </rm>
</cluster>
[root@virt-101 ~]# clufter ccs2pcs-flatiron --input=cluster.conf --cib=cib.xml
[ccs-version-bump     ] output: cluster-f799f74b.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.xml
[root@virt-101 ~]# sed -n "/<meta_attributes/,/<\/meta_attributes>/p" cib.xml

> There is no meta attribute of name 'rgmanager-service' present in resulting cib.xml


Resulting cib file:

[root@virt-101 ~]# cat cib.xml 
<cib validate-with="pacemaker-1.2" admin_epoch="0" epoch="0" num_updates="0" update-client="clufter 0.59.5">
  <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 -->
      <primitive id="RESOURCE-vm-lxc_01" description="natively converted from vm RA" class="ocf" provider="heartbeat" type="VirtualDomain">
        <instance_attributes id="RESOURCE-vm-lxc_01-ATTRS">
          <nvpair id="RESOURCE-vm-lxc_01-ATTRS-config" name="config" value="/etc/libvirt/lxc/lxc-01.xml"/>
          <nvpair id="RESOURCE-vm-lxc_01-ATTRS-hypervisor" name="hypervisor" value="lxc:///"/>
        </instance_attributes>
        <operations>
          <op id="RESOURCE-vm-lxc_01-OP-stop" name="stop" interval="0" timeout="120s"/>
          <op id="RESOURCE-vm-lxc_01-OP-monitor" name="monitor" interval="30s"/>
        </operations>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
  <status/>
</cib>

Comment 5 Miroslav Lisik 2016-10-10 16:12:29 UTC
The same result for ccs2pcs-needle variant of command.