[Pacemaker] nginx OCF script - strange syslog output
Lars Ellenberg
lars.ellenberg at linbit.com
Wed Oct 12 23:10:40 UTC 2011
On Wed, Oct 12, 2011 at 09:23:15PM +0200, Dejan Muhamedagic wrote:
> Hi,
>
> On Wed, Oct 12, 2011 at 05:28:47PM +0200, Amar Prasovic wrote:
> > Hello everyone,
> >
> > I've found one nginx OCF script online and decided to use it since no
> > default script is provided.
> > Here is the script I am using:
> >
> > http://pastebin.com/CCApckew
>
> You can always get the latest nginx release from our repository
> https://github.com/ClusterLabs/resource-agents
>
> > The good news is, the script is functional, I get nginx running.
> > The sort of a bad news is, every ten seconds I got some strange log output.
> >
> > Here is the extract from my syslog:
> >
> > http://pastebin.com/ybPi0VMp
> >
> > I suppose the problem is somewhere with monitor operator but I cannot figure
> > out where.
Parsing of the nginx configuration file is done on each invokation,
which is a design bug^W choice of that resource agent,
so it is done on every monitor action.
Parsing is "rudimentary" at best.
Things get read by awk, passed to shell commands, mangled again through
sed and awk, the result being finally eval'ed...
A lot of stuff that can go wrong there.
All of that just to "guess" the root, pid,
and listen directive from the config file.
> > I used this script with Debian 5 some half a year ago and I didn't have this
> > output. It appeared on Debian 6.0.3
Compare the config files (nginx.conf and it's includes).
Avoid more than one statement on one line.
Especially include statements.
My guess is that parsing those is partially broken,
possibly only for relative paths.
> No idea what's going on. But it doesn't look good. In particular
> as it looks like as if it's trying to execute something it
> shouldn't. You can add at the top of the RA 'set -x' in between
> monitors then take look at the logs. Beware: you should probably
> disable monitor while editing the RA. Or best to try it out on a
> test cluster.
>
> Thanks,
>
> Dejan
>
> > Now, this is not some essential problem since logrotate is in place and the
> > file is not getting that big, but still it kind of makes reading the file
> > difficult since I have to scroll through thousands of unnecessary lines.
> >
> > --
> > Amar Prasovic
> > Gaißacher Straße 17
> > D - 81371 München
>
> > _______________________________________________
> > 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>
> _______________________________________________
> 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the Pacemaker
mailing list