[ClusterLabs Developers] OCF_RESKEY_CRM_meta_notify_active_* always empty

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Tue May 3 19:10:12 UTC 2016


Le Mon, 2 May 2016 17:59:55 -0500,
Ken Gaillot <kgaillot at redhat.com> a écrit :

> On 04/28/2016 04:47 AM, Jehan-Guillaume de Rorthais wrote:
> > Hello all,
> > 
> > While testing and experiencing with our RA for PostgreSQL, I found the
> > meta_notify_active_* variables seems always empty. Here is an example of
> > these variables as they are seen from our RA during a migration/switchover:
> > 
> > 
> >   {
> >     'type' => 'pre',
> >     'operation' => 'demote',
> >     'active' => [],
> >     'inactive' => [],
> >     'start' => [],
> >     'stop' => [],
> >     'demote' => [
> >                   {
> >                     'rsc' => 'pgsqld:1',
> >                     'uname' => 'hanode1'
> >                   }
> >                 ],
> >     
> >     'master' => [
> >                   {
> >                     'rsc' => 'pgsqld:1',
> >                     'uname' => 'hanode1'
> >                   }
> >                 ],
> >     
> >     'promote' => [
> >                    {
> >                      'rsc' => 'pgsqld:0',
> >                      'uname' => 'hanode3'
> >                    }
> >                  ],
> >     'slave' => [
> >                  {
> >                    'rsc' => 'pgsqld:0',
> >                    'uname' => 'hanode3'
> >                  },
> >                  {
> >                    'rsc' => 'pgsqld:2',
> >                    'uname' => 'hanode2'
> >                  }
> >                ],
> >     
> >   }
> > 
> > In case this comes from our side, here is code building this:
> > 
> >   https://github.com/dalibo/PAF/blob/6e86284bc647ef1e81f01f047f1862e40ba62906/lib/OCF_Functions.pm#L444
> > 
> > But looking at the variable itself in debug logs, I always find it empty, in
> > various situations (switchover, recover, failover).
> > 
> > If I understand the documentation correctly, I would expect 'active' to list
> > all the three resources, shouldn't it? Currently, to bypass this, we
> > consider: active == master + slave
> 
> You're right, it should. The pacemaker code that generates the "active"
> variables is the same used for "demote" etc., so it seems unlikely the
> issue is on pacemaker's side. Especially since your code treats active
> etc. differently from demote etc., it seems like it must be in there
> somewhere, but I don't see where.

The code treat active, inactive, start and stop all together, for any cloned
resource. If the resource is a multistate, it adds promote, demote, slave and
master.

Note that from this piece of code, the 7 other notify vars are set
correctly: start, stop, inactive, promote, demote, slave, master. Only active
is always missing.

I'll investigate and try to find where is hiding the bug.

> Which debug logs are you referring to?

I'm referring on the debug log from the resource agent itself.

I'll try to make the RA dump its whole environment to the logfiles to compare
what it gets and what it produces.


Thank you for your feedback,
-- 
Jehan-Guillaume de Rorthais
Dalibo




More information about the Developers mailing list