[Pacemaker] [Problem] The "dampen" parameter of the attrd_updater command is ignored, and an attribute is updated.

renayama19661014 at ybb.ne.jp renayama19661014 at ybb.ne.jp
Wed May 28 08:44:19 CEST 2014


Hi Andrew,

I confirmed movement at once.
Your patch solves a problem.

Many Thanks!
Hideo Yamauchi.

--- On Wed, 2014/5/28, renayama19661014 at ybb.ne.jp <renayama19661014 at ybb.ne.jp> wrote:

> Hi Andrew,
> 
> > Perhaps try:
> > 
> > diff --git a/attrd/commands.c b/attrd/commands.c
> > index 7f1b4b0..7342e23 100644
> > --- a/attrd/commands.c
> > +++ b/attrd/commands.c
> > @@ -464,6 +464,15 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
>> >      a->changed |= changed;
>> > +    if(changed) {
> > +        if(a->timer) {
> > +            crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
> > +            mainloop_timer_start(a->timer);
> > +        } else {
> > +            write_or_elect_attribute(a);
> > +        }
> > +    }
> > +
> >      /* this only involves cluster nodes. */
> >      if(v->nodeid == 0 && (v->is_remote == FALSE)) {
> >          if(crm_element_value_int(xml, F_ATTRD_HOST_ID, (int*)&v->nodeid) == 0) {
> > @@ -476,15 +485,6 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
> >              }
> >          }
> >      }
> > -
> > -    if(changed) {
> > -        if(a->timer) {
> > -            crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
> > -            mainloop_timer_start(a->timer);
> > -        } else {
> > -            write_or_elect_attribute(a);
> > -        }
> > -    }
> >  }
>> >  void
> 
> Okay!
> I confirm movement.
> 
> Many Thanks!
> Hideo Yamauchi.
> 
> --- On Wed, 2014/5/28, Andrew Beekhof <andrew at beekhof.net> wrote:
> 
> > 
> > On 28 May 2014, at 4:10 pm, Andrew Beekhof <andrew at beekhof.net> wrote:
> > 
> > > 
> > > On 28 May 2014, at 3:04 pm, renayama19661014 at ybb.ne.jp wrote:
> > > 
> > >> Hi Andrew,
> > >> 
> > >>>> I'd expect that block to hit this clause though:
> > >>>> 
> > >>>>     } else if(mainloop_timer_running(a->timer)) {
> > >>>>        crm_info("Write out of '%s' delayed: timer is running", a->id);
> > >>>>        return;
> > >>> 
> > >>> Which point of the source code does the suggested code mentioned above revise?
> > >>> (Which line of the source code is it?)
> > >> 
> > >> Is it the next cord that you pointed?
> > > 
> > > right
> > > 
> > >> 
> > >> void
> > >> write_attribute(attribute_t *a)
> > >> {
> > >>   int updates = 0;
> > >> (snip)
> > >>   } else if(mainloop_timer_running(a->timer)) {
> > >>       crm_info("Write out of '%s' delayed: timer is running", a->id);
> > >>       return;
> > >>   }
> > >> (snip)
> > >> 
> > >> At the time of phenomenon of the problem, the timer does not yet block it by this processing because it does not start.
> > > 
> > > Thats the curious part
> > 
> > Perhaps try:
> > 
> > diff --git a/attrd/commands.c b/attrd/commands.c
> > index 7f1b4b0..7342e23 100644
> > --- a/attrd/commands.c
> > +++ b/attrd/commands.c
> > @@ -464,6 +464,15 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
>> >      a->changed |= changed;
>> > +    if(changed) {
> > +        if(a->timer) {
> > +            crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
> > +            mainloop_timer_start(a->timer);
> > +        } else {
> > +            write_or_elect_attribute(a);
> > +        }
> > +    }
> > +
> >      /* this only involves cluster nodes. */
> >      if(v->nodeid == 0 && (v->is_remote == FALSE)) {
> >          if(crm_element_value_int(xml, F_ATTRD_HOST_ID, (int*)&v->nodeid) == 0) {
> > @@ -476,15 +485,6 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
> >              }
> >          }
> >      }
> > -
> > -    if(changed) {
> > -        if(a->timer) {
> > -            crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
> > -            mainloop_timer_start(a->timer);
> > -        } else {
> > -            write_or_elect_attribute(a);
> > -        }
> > -    }
> >  }
>> >  void
> > 
> > 
> > 
> > 
> 
> _______________________________________________
> 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