[Pacemaker] crmd-transition-delay does not work

Kazunori INOUE kazunori.inoue3 at gmail.com
Fri May 2 04:26:31 EDT 2014


2014-05-02 13:43 GMT+09:00 Andrew Beekhof <andrew at beekhof.net>:
> This should do it:

Since issue was not fixed by this, I wrote the patch using this as reference.
https://github.com/ClusterLabs/pacemaker/pull/509

Regards,

>
> diff --git a/crmd/cib.c b/crmd/cib.c
> index 77fa849..50526ca 100644
> --- a/crmd/cib.c
> +++ b/crmd/cib.c
> @@ -55,6 +55,7 @@ static void
>  do_cib_updated(const char *event, xmlNode * msg)
>  {
>      int rc = -1;
> +    xmlXPathObjectPtr xpathObj = NULL;
>
>      CRM_CHECK(msg != NULL, return);
>      crm_element_value_int(msg, F_CIB_RC, &rc);
> @@ -63,11 +64,11 @@ do_cib_updated(const char *event, xmlNode * msg)
>          return;
>      }
>
> -    if (get_xpath_object
> -        ("//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED "//" XML_CIB_TAG_CRMCONFIG, msg,
> -         LOG_TRACE) != NULL) {
> +    xpathObj = xpath_search(msg, "//" XML_CIB_TAG_CRMCONFIG);
> +    if(numXpathResults(xpathObj) > 0) {
>          mainloop_set_trigger(config_read);
>      }
> +    freeXpathObject(xpathObj);
>  }
>
>  static void
>
>
> On 25 Apr 2014, at 7:08 pm, Kazunori INOUE <kazunori.inoue3 at gmail.com> wrote:
>
>> Hi,
>>
>> 'crmd-transition-delay' of cib which I loaded does not work.
>> this log is not output :
>> info: crm_timer_popped: New Transition Timer (I_PE_CALC) just popped (2000ms)
>>
>> Although I noticed in the latest master branch (830af67), I think that
>> 'cib-performance' is probably the cause.
>>
>> steps to reproduce :
>> $ rm -f /var/lib/pacemaker/cib/*
>> $ initctl start pacemaker.combined
>> $ crm configure load update test.cli
>>
>> log at the time of load :
>> crmd: (       xml.c:5940  )   trace: get_xpath_object:      No match
>> for //cib_update_result//diff-added//crm_config in /notify
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input   <notify t="cib_notify" subt="cib_diff_notify"
>> cib_op="cib_apply_diff" cib_rc="0" cib_object_type="diff">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input     <cib_generation>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input       <generation_tuple epoch="4" num_updates="0"
>> admin_epoch="0" validate-with="pacemaker-1.3" crm_feature_set="3.0.9"
>> cib-last-written="Fri Apr 25 16:40:02 2014" have-quorum="1"
>> dc-uuid="3232261535"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input     </cib_generation>
>> ...snip...
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input     <cib_update_result>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input       <diff format="2">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <version>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <source admin_epoch="0" epoch="2" num_updates="6"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <target admin_epoch="0" epoch="4" num_updates="0"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </version>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <change operation="modify" path="/cib">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <change-list>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input             <change-attr name="epoch" operation="set"
>> value="4"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input             <change-attr name="num_updates" operation="set"
>> value="0"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           </change-list>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <change-result>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input             <cib epoch="4" num_updates="0" admin_epoch="0"
>> validate-with="pacemaker-1.3" crm_feature_set="3.0.9"
>> cib-last-written="Fri Apr 25 16:38:58 2014" have-quorum="1"
>> dc-uuid="3232261535"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           </change-result>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </change>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <change operation="create"
>> path="/cib/configuration/crm_config/cluster_property_set[@id='cib-bootstrap-options']"
>> position="2">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <nvpair name="no-quorum-policy" value="ignore"
>> id="cib-bootstrap-options-no-quorum-policy"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </change>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <change operation="create"
>> path="/cib/configuration/crm_config/cluster_property_set[@id='cib-bootstrap-options']"
>> position="3">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <nvpair name="stonith-enabled" value="false"
>> id="cib-bootstrap-options-stonith-enabled"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </change>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <change operation="create"
>> path="/cib/configuration/crm_config/cluster_property_set[@id='cib-bootstrap-options']"
>> position="4">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <nvpair name="startup-fencing" value="false"
>> id="cib-bootstrap-options-startup-fencing"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </change>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <change operation="create"
>> path="/cib/configuration/crm_config/cluster_property_set[@id='cib-bootstrap-options']"
>> position="5">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <nvpair name="stonith-timeout" value="60s"
>> id="cib-bootstrap-options-stonith-timeout"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </change>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         <change operation="create"
>> path="/cib/configuration/crm_config/cluster_property_set[@id='cib-bootstrap-options']"
>> position="6">
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input           <nvpair name="crmd-transition-delay" value="2s"
>> id="cib-bootstrap-options-crmd-transition-delay"/>
>> crmd: (       xml.c:5941  )   trace: get_xpath_object:      Unexpected
>> Input         </change>
>>
>> Change of 'cluster_property_set' has not been applied to crmd..
>>
>> Regards,
>> Kazunori INOUE
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at 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://bugs.clusterlabs.org
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://bugs.clusterlabs.org




More information about the Pacemaker mailing list