ctdb event scripts

Amitay Isaacs amitay at gmail.com
Mon Nov 14 01:42:28 UTC 2016


On Sat, Nov 12, 2016 at 9:07 PM, Martin Schwenke <martin at meltin.net> wrote:

> [+Amitay]
>
> On Fri, 11 Nov 2016 16:22:53 -0800, Steve French <smfrench at gmail.com>
> wrote:
>
> > On Fri, Nov 11, 2016 at 11:30 AM, Martin Schwenke <martin at meltin.net>
> wrote:
> >
> > > On Fri, 11 Nov 2016 10:43:32 -0600, Steve French <smfrench at gmail.com>
> > > wrote:
> > >
> > > > On Thu, Nov 10, 2016 at 7:39 PM, Martin Schwenke <martin at meltin.net>
> > > wrote:
> > > >
> >  [...]
> >  [...]
> > > debugging it
> >  [...]
> > > part
> >  [...]
> >  [...]
> > > experimented
> >  [...]
> >  [...]
> > > >
> > > > That works and is useful - but dumps to a log so a little harder to
> read
> > > > for quick checks.
> > >
> > > Oh, I didn't mean "ctdb eventscript monitor".  I meant something like:
> > >
> > >   /etc/ctdb/event.d/50.samba monitor
> > >
> > > There is enough boilerplate in the scripts so that they can find the
> > > functions file and the configuration.
> > >
> > > CTDB won't notice that you're running it, unless it stores state and a
> > > subsequent run by CTDB uses that state.  For example, 60.nfs counts
> > > RPC failures before failing the "monitor" event.  If you run a script
> by
> > > hand it will update the same state.
> > >
> > > Alternatively, if you just want to know why a monitor cycle failed
> > > without grovelling through logs, you can always see the output of the
> > > last monitor cycle by running:
> > >
> > >   ctdb scriptstatus monitor
> > >
> > > Cool feature idea: implement an option to scriptstatus that shows the
> > > output of the last failure.  This would require daemon support, since
> > > that's where the information comes from.
>
> > Yes - that is a cool idea.
>
> Let's see if Amitay agrees and wants to add it to his new event
> daemon.  :-)
>
>
What's so cool about it?  It's in the logs already when the node becomes
UNHEALTHY.
I don't think there is any point adding it to eventd.

If we want to provide a hook to capture that information, then it can be
done via notify script.

Amitay.


More information about the samba-technical mailing list