Re: [Pacemaker] using xml for rules
On 15 November 2010 08:14, Andrew Beekhof and...@beekhof.net wrote: On Thu, Nov 11, 2010 at 2:10 PM, Pavlos Parissis pavlos.paris...@gmail.com wrote: I removed score=2 from rule id=working-hours-rule boolean_op=or score=2 Have a look at the schema file: http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/pacemaker.rng.in http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/rule.rng.in For starters: s/boolean_op/boolean-op/ that was it! thanks a lot, now I have to see if it is works as expected. BTW, any suggestion for a good xml editor which I can use to validate configuration? Thanks again, Pavlos ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
Re: [Pacemaker] using xml for rules
Pavlos Parissis wrote: On 15 November 2010 08:14, Andrew Beekhof and...@beekhof.net wrote: On Thu, Nov 11, 2010 at 2:10 PM, Pavlos Parissis pavlos.paris...@gmail.com wrote: I removed score=2 from rule id=working-hours-rule boolean_op=or score=2 Have a look at the schema file: http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/pacemaker.rng.in http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/rule.rng.in For starters: s/boolean_op/boolean-op/ that was it! thanks a lot, now I have to see if it is works as expected. BTW, any suggestion for a good xml editor which I can use to validate configuration? The crm shell? :) Thanks again, Pavlos ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker -- Dan FRINCU Systems Engineer CCNA, RHCE Streamwide Romania ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
Re: [Pacemaker] using xml for rules
On 15 November 2010 14:18, Dan Frincu dfri...@streamwide.ro wrote: Pavlos Parissis wrote: On 15 November 2010 08:14, Andrew Beekhof and...@beekhof.net wrote: On Thu, Nov 11, 2010 at 2:10 PM, Pavlos Parissis pavlos.paris...@gmail.com wrote: I removed score=2 from rule id=working-hours-rule boolean_op=or score=2 Have a look at the schema file: http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/pacemaker.rng.in http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/rule.rng.in For starters: s/boolean_op/boolean-op/ that was it! thanks a lot, now I have to see if it is works as expected. BTW, any suggestion for a good xml editor which I can use to validate configuration? The crm shell? :) :-) Let me refresh my question Does anyone know any GUI based editor which will validate the conf and inform for the correct syntax in a case of syntax error? :=) Cheers, Pavlos ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
Re: [Pacemaker] using xml for rules
On Thu, Nov 11, 2010 at 2:10 PM, Pavlos Parissis pavlos.paris...@gmail.com wrote: I removed score=2 from rule id=working-hours-rule boolean_op=or score=2 Have a look at the schema file: http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/pacemaker.rng.in http://hg.clusterlabs.org/pacemaker/stable-1.0/raw-file/tip/xml/rule.rng.in For starters: s/boolean_op/boolean-op/ 245 rsc_defaults 246 meta_attributes id=working-hours 247 rule id=working-hours-rule boolean_op=or 248 date_expression id=six-to-eleven operation=date_spec 249 date_spec id=six-to-elevene-Mon-Fri-spec hours=6-23 weekdays=1-5/ 250 /date_expression 251 date_expression id=eight-six operation=date_spec 252 date_spec id=eight-six-Sat-Sun-spec hours=8-16 weekdays=6-7/ 253 /date_expression 254 /rule 255 nvpair id=working-hours-stickiness name=resource-stickiness value=INFINITY/ 256 /meta_attributes 257 meta_attributes id=after-hours score=1 258 nvpair id=after-hours-stickiness name=resource-stickiness value=0/ 259 /meta_attributes 260 /rsc_defaults and now I only get, from these I can't figure out where exactly is my mistake on the rules, coffee didn't help that much Relax-NG validity error : Extra element rsc_defaults in interleave /var/run/crm/cib-invalid.9yBICJ:245: element rsc_defaults: Relax-NG validity error : Element configuration failed to validate content /var/run/crm/cib-invalid.9yBICJ:1: element cib: Relax-NG validity error : Element cib failed to validate content cibadmin[9627]: 2010/11/11_14:07:26 ERROR: main: Call failed: Update does not conform to the configured schema/DTD Call failed: Update does not conform to the configured schema/DTD ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
Re: [Pacemaker] using xml for rules
On Sun, Oct 17, 2010 at 7:26 PM, Pavlos Parissis pavlos.paris...@gmail.com wrote: Hi, I am trying to make a rule to control the failback on the resources. I want during working days from 06:00 to 23:00 and on weekend from 08:00 to 16:00 to have resource-stickiness 1000 and on the left hours zero, so cluster can perform failback any resource which failed over during the working hours. I wrote the following but I also get error [1]. I am not xml guru so I must have done some stupid mistake here. Any hints? version? newer ones should be displaying the relax-ng errors. otherwise, use crm_shadow before running the update - that should get you the actual errors rsc_defaults meta_attributes id=working-hours rule id=working-hours-rule boolean_op=or score=2 date_expression id=six-to-eleven operation=date_spec date_spec id=six-to-elevene-Mon-Fri-spec hours=6-23 weekdays=1-5/ /date_expression date_expression id=eight-six operation=date_spec date_spec id=eight-six-Sat-Sun-spec hours=8-16 weekdays=6-7/ /date_expression /rule nvpair id=working-hours-stickiness name=resource-stickiness value=INFINITY/ /meta_attributes meta_attributes id=after-hours score=1 nvpair id=after-hours-stickiness name=resource-stickiness value=0/ /meta_attributes /rsc_defaults [1] cibadmin -V --replace --obj_type rsc_defaults --xml-file tmp.xml Call cib_replace failed (-47): Update does not conform to the configured schema/DTD ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker ___ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker