-   Linux - Software (
-   -   pacemaker + corosync + nginx (

weenux28 03-07-2013 06:25 PM

pacemaker + corosync + nginx
Hi all,

I am having a problem deploying nginx + corosync + pacemaker. I've already configured the fail-over setup using a virtual IP, now I want to add nginx hi-availability service to pacemaker.

Here is my problem. I've already configured pacemaker resource to use ocf:heartbeat:nginx but when starting pacemaker service, it won't start properly. I am having an error


Mar 8 05:10:53 centos lrmd: [26547]: info: RA output: (nginx_res:start:stderr) /usr/lib/ocf/resource.d//heartb eat/nginx: line 401: [: too many arguments
Mar 8 05:10:53 centos nginx[27346]: [27619]: INFO: nginx not running
Mar 8 05:10:53 centos nginx[27346]: [27622]: INFO: Waiting for /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf to come up (try 27)
Here's my configuration:


primitive website ocf:heartbeat:nginx \
params configfile="/usr/local/nginx/conf/nginx.conf" httpd="/usr/local/nginx/sbin/nginx" status10url="" \
op monitor interval="10s" timeout="30s" \
op start interval="0" timeout="40s" \
op stop interval="0" timeout="60s"
Also tried this config, but with this I am having problems with nginx not properly killed when fail-over occurs (transfer from centos to centos2) due to nginx PID not recorded to the file.


primitive website ocf:heartbeat:anything \
params binfile="/usr/local/nginx/sbin/nginx" cmdline_options="-g 'pid /usr/local/nginx/logs/;'" pidfile="/usr/local/nginx/logs/" \
op monitor interval="5s"
Please advise. Thanks :)

All times are GMT -5. The time now is 11:27 PM.