[Linux-HA] target-role does not exist with crm_resource

Steinhauer Juergen gawith at gmx.de
Thu Jul 9 05:03:58 MDT 2009


Hi,

I've set up a mini test config:

<cib epoch="5" num_updates="3" admin_epoch="0"
validate-with="pacemaker-1.0" crm_feature_set="3.0.1" have-quorum="1"
dc-uuid="02144feb-7456-4cc3-a5e6-a679ca251829">
  <configuration>
    <crm_config>
      <cluster_property_set id="cib-bootstrap-options">
        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
value="1.0.3-b133b3f19797c00f9189f4b66b513963f9d25db9"/>
      </cluster_property_set>
    </crm_config>
    <nodes>
      <node id="02144feb-7456-4cc3-a5e6-a679ca251829" uname="pcscf2"
type="normal"/>
    </nodes>
    <resources>
      <primitive class="ocf" id="test_ip" provider="heartbeat"
type="IPaddr2">
        <meta_attributes id="test_ip-meta_attributes">
          <nvpair id="test_ip-meta_attributes-target-role"
name="target-role" value="Started"/>
        </meta_attributes>
        <instance_attributes id="test_ip-instance_attributes">
          <nvpair id="test_ip-instance_attributes-ip" name="ip"
value="10.10.10.10"/>
        </instance_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
  <status>
    <node_state id="02144feb-7456-4cc3-a5e6-a679ca251829" uname="pcscf2"
ha="active" in_ccm="true" crmd="online" join="member" expected="member"
crm-debug-origin="do_update_resource" shutdown="0">
      <lrm id="02144feb-7456-4cc3-a5e6-a679ca251829">
        <lrm_resources>
          <lrm_resource id="test_ip" type="IPaddr2" class="ocf"
provider="heartbeat">
            <lrm_rsc_op id="test_ip_monitor_0" operation="monitor"
crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
transition-key="4:1:7:d4e851ea-a5ee-46a9-8d38-9ff0eed395a5"
transition-magic="0:7;4:1:7:d4e851ea-a5ee-46a9-8d38-9ff0eed395a5"
call-id="2" rc-code="7" op-status="0" interval="0" last-run="1247137118"
last-rc-change="1247137118" exec-time="40" queue-time="0"
op-digest="0cf942334efe7201c5e3543460e2f3a3"/>
            <lrm_rsc_op id="test_ip_start_0" operation="start"
crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
transition-key="5:1:0:d4e851ea-a5ee-46a9-8d38-9ff0eed395a5"
transition-magic="0:0;5:1:0:d4e851ea-a5ee-46a9-8d38-9ff0eed395a5"
call-id="3" rc-code="0" op-status="0" interval="0" last-run="1247137118"
last-rc-change="1247137118" exec-time="30" queue-time="0"
op-digest="0cf942334efe7201c5e3543460e2f3a3"/>
          </lrm_resource>
        </lrm_resources>
      </lrm>
      <transient_attributes id="02144feb-7456-4cc3-a5e6-a679ca251829">
        <instance_attributes
id="status-02144feb-7456-4cc3-a5e6-a679ca251829">
          <nvpair
id="status-02144feb-7456-4cc3-a5e6-a679ca251829-probe_complete"
name="probe_complete" value="true"/>
        </instance_attributes>
      </transient_attributes>
    </node_state>
  </status>
</cib>


crm_resource -r test_ip -q
test_ip	(ocf::heartbeat:IPaddr2):	Started pcscf2
raw xml:
<primitive class="ocf" id="test_ip" provider="heartbeat" type="IPaddr2">
  <meta_attributes id="test_ip-meta_attributes">
    <nvpair id="test_ip-meta_attributes-target-role" name="target-role"
value="Started"/>
  </meta_attributes>
  <instance_attributes id="test_ip-instance_attributes">
    <nvpair id="test_ip-instance_attributes-ip" name="ip"
value="62.180.193.70"/>
  </instance_attributes>
</primitive>

Both crm_resource commands fail:
# crm_resource -r test_ip -g target-role
Error performing operation: The object/attribute does not exist
# crm_resource -r test_ip -g target-role --meta
Error performing operation: The object/attribute does not exist

Currently, I'm using pacemaker-1.0.3-2.2 and heartbeat-2.99.2-8.1 for
CentOS5.

Regards.


Dejan Muhamedagic schrieb:
> Hi,
> 
> On Wed, Jul 08, 2009 at 01:50:53PM +0200, Steinhauer Juergen wrote:
>> Hi guys!
>>
>> I've experienced for several times, that I'm not able to query the
>> resource status with crm_resource:
>>
>> crm_resource -r app -g target-role --meta
>> Error performing operation: The object/attribute does not exist
>>
>> But the meta-attribute is there...
>>
>> <primitive class="ocf" id="app" provider="me" type="myapp">
>>   <meta_attributes id="app-meta_attributes">
>>     <nvpair id="app-meta_attributes-target-role" name="target-role"
>> value="started"/>
>>     <nvpair id="app-meta_attributes-migration-threshold"
>> name="migration-threshold" value="1"/>
>>   </meta_attributes>
>> </primitive>
>>
>> It worked with pacemaker 0.6 (without the "--meta") and works sometimes
>> with pacemaker 1.0.3.
>>
>> Am I doing something wrong? Is this way to query the app's status not
>> supported anymore?
> 
> I can't reproduce this with 1.0.4. Which version do you run? Can
> you also post the whole CIB?
> 
> Thanks,
> 
> Dejan
> 
>> Thanks in advance.
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA at lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems



More information about the Linux-HA mailing list