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

Reply via email to