Hi Dejan,

Thanks for your help!

I've tried to add the monitor operation as you explained, but got the 
following error:

1) cibadmin -Q -o resources > rsc.xml

s0580crmdb2pr1:~ # cat rsc.xml
 <resources>
   <group ordered="true" description="Grupo de recursos db2pr1" 
restart_type="ignore" resource_stickiness="0" is_managed="default" 
collocated="true" multiple_active="stop_start" id="group_db2pr1">
     <primitive id="IP_db2pr1" class="ocf" type="IPaddr" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" description="IP utilizado pelo dbpr1" 
multiple_active="stop_start">
       <instance_attributes id="IP_db2pr1_instance_attrs">
         <attributes>
           <nvpair id="eb355e01-1f73-4ce7-9d43-edf0f160d77d" name="ip" 
value="10.226.13.12"/>
           <nvpair id="IP_db2pr1_target_role" name="target_role" 
value="started"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd0" class="heartbeat" type="drbddisk" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd0_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd0_target_role" name="target_role" 
value="started"/>
           <nvpair id="add7aa21-a89a-40a1-ab34-6c626d336629" name="1" 
value="rmpath0-part1"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd1" class="heartbeat" type="drbddisk" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd1_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd1_target_role" name="target_role" 
value="started"/>
           <nvpair id="59672e78-5be2-479b-aee9-e1ebee042022" name="1" 
value="rmpath1-part1"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd2" class="heartbeat" type="drbddisk" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd2_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd2_target_role" name="target_role" 
value="started"/>
           <nvpair id="cf0e6792-e667-47f0-9dc4-784b6e8f98a7" name="1" 
value="rmpath2-part1"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd3" class="heartbeat" type="drbddisk" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd3_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd3_target_role" name="target_role" 
value="started"/>
           <nvpair id="418e16c6-c5a3-4dd8-8534-727c10bd182c" name="1" 
value="rmpath2-part2"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd4" class="heartbeat" type="drbddisk" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd4_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd4_target_role" name="target_role" 
value="started"/>
           <nvpair id="f57c70ac-939a-43e6-90ea-c62fdcd7af45" name="1" 
value="rmpath2-part3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd5" class="heartbeat" type="drbddisk" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd5_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd5_target_role" name="target_role" 
value="started"/>
           <nvpair id="58ee07c6-a51b-422e-83fc-d08c9f5c0bad" name="1" 
value="rmpath2-part5"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd0_fs" class="ocf" type="Filesystem" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd0_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd0_fs_target_role" name="target_role" 
value="started"/>
           <nvpair id="3b4e294c-7521-46a6-b3d3-9c3df991e4d0" name="device" 
value="/dev/drbd0"/>
           <nvpair id="cfd540a4-989f-4a5f-a9a0-90f95d77bb20" 
name="directory" value="/dbtbs"/>
           <nvpair id="c9788a08-5070-45a0-beab-33b34cc6e2b2" name="fstype" 
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd1_fs" class="ocf" type="Filesystem" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd1_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd1_fs_target_role" name="target_role" 
value="started"/>
           <nvpair id="ad6d9329-94ed-4d91-b72c-0e32a978de37" name="device" 
value="/dev/drbd1"/>
           <nvpair id="a7dc2e3e-d520-404b-9f41-d128e14ec6b9" 
name="directory" value="/dbtbs2"/>
           <nvpair id="14c454de-8310-42ab-9a3f-5ff303ed007f" name="fstype" 
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd2_fs" class="ocf" type="Filesystem" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd2_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd2_fs_target_role" name="target_role" 
value="started"/>
           <nvpair id="343f1b2c-9f16-4aa1-8456-18c098ecc147" name="device" 
value="/dev/drbd2"/>
           <nvpair id="d6fea532-33ad-4574-a580-e0f6f358b691" 
name="directory" value="/dbtemp"/>
           <nvpair id="45441dad-ca3b-47a5-ae86-d10e5e636a2e" name="fstype" 
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd3_fs" class="ocf" type="Filesystem" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd3_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd3_fs_target_role" name="target_role" 
value="started"/>
           <nvpair id="a9a70879-a902-479f-a148-359b13b9ffe6" name="device" 
value="/dev/drbd3"/>
           <nvpair id="0479c1c6-3d70-4b12-a9d9-6b9328f208f8" 
name="directory" value="/dblog"/>
           <nvpair id="98451c5d-29bf-4469-8a7d-c22798020d6f" name="fstype" 
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd4_fs" class="ocf" type="Filesystem" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd4_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd4_fs_target_role" name="target_role" 
value="started"/>
           <nvpair id="668f388b-ff1a-46ac-a654-80ee5e87bd3f" name="device" 
value="/dev/drbd4"/>
           <nvpair id="fb2fc607-1eec-48ad-ae1e-d0ba06208f0f" 
name="directory" value="/dbnfs"/>
           <nvpair id="728c403d-cea9-43b5-a122-6dd5aa3c9304" name="fstype" 
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd5_fs" class="ocf" type="Filesystem" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd5_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd5_fs_target_role" name="target_role" 
value="started"/>
           <nvpair id="57c1ede1-136a-4b48-9cc6-4006214a72e5" name="device" 
value="/dev/drbd5"/>
           <nvpair id="9fe0b2ee-6e6e-424f-90ea-a66273ed1d8d" 
name="directory" value="/db"/>
           <nvpair id="4d5e056e-fec2-4d5c-b41e-76976ea4fb31" name="fstype" 
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_db2_prod" class="ocf" type="db2" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" description="DB2 Producao" 
multiple_active="stop_start">
       <instance_attributes id="resource_db2_prod_instance_attrs">
         <attributes>
           <nvpair id="resource_db2_prod_target_role" name="target_role" 
value="started"/>
           <nvpair id="94c70633-51d4-4cd8-90d2-4e691be4f44f" 
name="instance" value="db2admin"/>
         </attributes>
       </instance_attributes>
     </primitive>
   </group>
 </resources>

2) Edit rsc.xml and insert the monitor operation:

I've changed just the db2 primitive:

     <primitive id="resource_db2_prod" class="ocf" type="db2" 
provider="heartbeat" restart_type="ignore" is_managed="default" 
resource_stickiness="0" description="DB2 Producao" 
multiple_active="stop_start">
       <instance_attributes id="resource_db2_prod_instance_attrs">
         <attributes>
           <nvpair id="resource_db2_prod_target_role" name="target_role" 
value="started"/>
           <nvpair id="94c70633-51d4-4cd8-90d2-4e691be4f44f" 
name="instance" value="db2admin"/>
         </attributes>
       </instance_attributes>
       <operations>
        <op id="1731be32-9ee7-4cad-b13b-548016228d38" name="monitor" 
interval="120s" timeout="60s" start_delay="120s" />
       </operations>
     </primitive>
   </group>
 </resources>

3) Update resources:

s0580crmdb2pr1:~ # cibadmin -U -x rsc.xml
Call cib_modify failed (-23): Activation Failed
<null>

The /var/log/ha-log do not log any message when I do it.

Any idea?

Best Regards,

Fábio Martins
Mailto: [EMAIL PROTECTED] 
Visit us: www.ibm.com.br



[EMAIL PROTECTED] wrote on 23/05/2007 10:08:38:

> On Tue, May 22, 2007 at 04:43:49PM -0300, [EMAIL PROTECTED] wrote:
> > Hi Everyone,
> > 
> > I'm trying to add monitor operations for some resources I've 
configured in 
> > the cib.xml, but when I try to do it using the GUI, I'm getting some 
> > errors:
> > 
> > mgmtd[7444]: 2007/05/22_15:14:02 info: xml:<group 
> > id="group_db2pr1"><primitive 
id="resource_db2_prod"><instance_attributes 
> > id="resource_db2_prod_instance_attrs"><attributes><nvpair 
> > id="resource_db2_prod_target_role" name="target_role" 
> > 
value="started"/></attributes></instance_attributes></primitive></group>
> > cib[7439]: 2007/05/22_15:14:02 info: cib_diff_notify:notify.c Update 
> > (client: 7444, call:78): 0.50.2102 -> 0.50.2103 (ok)
> > tengine[7566]: 2007/05/22_15:14:02 info: te_update_diff:callbacks.c 
> > Processing diff (cib_update): 0.50.2102 -> 0.50.2103
> > cib[11932]: 2007/05/22_15:14:03 info: write_cib_contents:io.c Wrote 
> > version 0.50.2103 of the CIB to disk (digest: 
> > 789c15bbc0135d47631abb9f7cc0e4f6)
> > mgmtd[7444]: 2007/05/22_15:14:03 info: xml:<group 
> > id="group_db2pr1"><primitive 
id="resource_db2_prod"><instance_attributes 
> > id="resource_db2_prod_instance_attrs"><attributes><nvpair 
> > id="94c70633-51d4-4cd8-90d2-4e691be4f44f" name="instance" 
> > 
value="db2admin"/></attributes></instance_attributes></primitive></group>
> > cib[7439]: 2007/05/22_15:14:03 info: cib_diff_notify:notify.c Update 
> > (client: 7444, call:80): 0.50.2103 -> 0.50.2104 (ok)
> > tengine[7566]: 2007/05/22_15:14:03 info: te_update_diff:callbacks.c 
> > Processing diff (cib_update): 0.50.2103 -> 0.50.2104
> > cib[11933]: 2007/05/22_15:14:03 info: write_cib_contents:io.c Wrote 
> > version 0.50.2104 of the CIB to disk (digest: 
> > 374a5221c4e4f35156c5b8035a553971)
> > cib[7439]: 2007/05/22_15:14:03 ERROR: Element primitive content does 
not 
> > follow the DTD, expecting (operations? , meta_attributes* , 
> > instance_attributes*), got (instance_attributes operations )
> 
> Old story, I'm afraid. The CIB is actually OK, because the order
> doesn't matter, but it doesn't verify against the DTD. I guess
> that the only solution is for the cib to ignore this particular
> error. No idea if that's possible. Andrew?
> 
> > cib[7439]: 2007/05/22_15:14:03 ERROR: validate_with_dtd:xml.c CIB does 
not 
> > validate against /usr/lib64/heartbeat/crm.dtd
> > cib[7439]: 2007/05/22_15:14:03 ERROR: activateCibXml:io.c Ignoring 
invalid 
> > CIB
> > cib[7439]: 2007/05/22_15:14:03 WARN: activateCibXml:io.c Reverting to 
last 
> > known CIB
> > cib[7439]: 2007/05/22_15:14:03 WARN: cib_process_command:callbacks.c 
> > Activation failed
> > cib[7439]: 2007/05/22_15:14:03 WARN: do_cib_notify:notify.c cib_update 
of 
> > <resources > FAILED: Activation Failed
> > cib[7439]: 2007/05/22_15:14:03 WARN: cib_diff_notify:notify.c Update 
> > (client: 7444, call:82): 0.50.2104 -> 0.50.2105 (Activation Failed)
> > cib[7439]: 2007/05/22_15:14:03 WARN: do_cib_notify:notify.c cib_update 
of 
> > <resources > FAILED: Activation Failed
> > cib[7439]: 2007/05/22_15:14:03 ERROR: cib_process_request:callbacks.c 
> > cib_update operation failed: Activation Failed
> > cib[7439]: 2007/05/22_15:14:03 info: #========= Input message message 
> > start ==========#
> > cib[7439]: 2007/05/22_15:14:03 info: MSG: Dumping message with 8 
fields
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[0] : [t=cib]
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[1] : [cib_op=cib_update]
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[2] : [cib_section=resources]
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[3] : [cib_callid=82]
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[4] : [cib_callopt=4096]
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[5] : 
> > [(5)cib_calldata=0x84cf28(748 952)]
> > cib[7439]: 2007/05/22_15:14:03 info:  <cib generated="true" 
> > crm-debug-origin="on_update_rsc_ops">
> > cib[7439]: 2007/05/22_15:14:03 info:    <configuration>
> > cib[7439]: 2007/05/22_15:14:03 info:      <crm_config/>
> > cib[7439]: 2007/05/22_15:14:03 info:      <nodes/>
> > cib[7439]: 2007/05/22_15:14:03 info:      <resources>
> > cib[7439]: 2007/05/22_15:14:03 info:        <group id="group_db2pr1">
> > cib[7439]: 2007/05/22_15:14:03 info:          <primitive 
> > id="resource_db2_prod">
> > cib[7439]: 2007/05/22_15:14:03 info:            <operations>
> > cib[7439]: 2007/05/22_15:14:03 info:              <op 
> > id="60298437-0a62-48ac-b48b-ed7b748f6643" name="monitor" 
interval="120s" 
> > timeout="60s"/>
> > cib[7439]: 2007/05/22_15:14:03 info:            </operations>
> > cib[7439]: 2007/05/22_15:14:03 info:          </primitive>
> > cib[7439]: 2007/05/22_15:14:03 info:        </group>
> > cib[7439]: 2007/05/22_15:14:03 info:      </resources>
> > cib[7439]: 2007/05/22_15:14:03 info:      <constraints/>
> > cib[7439]: 2007/05/22_15:14:03 info:    </configuration>
> > cib[7439]: 2007/05/22_15:14:03 info:    <status/>
> > cib[7439]: 2007/05/22_15:14:03 info:  </cib>
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[6] : 
> > [cib_clientid=b2357607-030f-415e-8949-cb83bc8430c6]
> > cib[7439]: 2007/05/22_15:14:03 info: MSG[7] : [cib_clientname=7444]
> > cib[7439]: 2007/05/22_15:14:03 WARN: cib_process_request:callbacks.c 
> > Request not broadcast: call failed: Activation Failed
> > mgmtd[7444]: 2007/05/22_15:14:03 ERROR: 
cib_native_perform_op:cib_native.c 
> > Call failed: Activation Failed
> > mgmtd[7444]: 2007/05/22_15:15:55 info: xml:<group 
> > id="group_db2pr1"><primitive id="resource_db2_prod" 
> > restart_type="ignore"/></group>
> > 
> > Is there a way for adding it by command line? I've tryied to find it 
in 
> > the "man cibadmin" but couldn't find something specific for that..
> 
> Use cibadmin to dump resources:
> 
> cibadmin -Q -o resources > rsc.xml
> 
> Edit rsc.xml and insert the monitor operation, such as this one:
> 
> <operations>
>  <op id="apache_4_mon" interval="120s" name="monitor" timeout="60s"/>
> </operations>
> 
> Update resources:
> 
> cibadmin -U -x rsc.xml
> 
> Perhaps there's a more elegant way, but this will work.
> 
> The man page seems to be slightly outdated: --id is not
> recognized.
> 
> > 
> > Best Regards,
> > 
> > F?bio Martins
> > Mailto: [EMAIL PROTECTED] 
> > Visit us: www.ibm.com.br
> > 
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> 
> -- 
> Dejan
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to