Hi Raoul,

On Mon, Jul 27, 2009 at 02:46:14PM +0200, Raoul Bhatia [IPAX] wrote:
> hi,
> 
> i'm reposting the postfix ocf ra as i feel that my works are complete.
> 
> dejan posted some comments in his last email which i will address:
> 
> >> i'm now checking more indepth for:
> >> > 1. empty queue_directory
> > 
> > For monitor? Why?
> 
> because then something is broken. i reworked this part now
> and am checking if the directory exists, "[ -d ... ]" return <> 0, at
> least on my linux box using bash.

This is from a diff:

+    [ -d "$queue" ] || return 1 # check if queue directory is empty @TODO 
shall we return false or $OCF_ERR_something

I guess you meant to say: "check if queue is a directory"?

> >> 2. pidfile
> >> 3. "postfix status"
> >> 4. postqueue ... | grep 'Mail system is down'
> >> 5. fuser -v $queue
> >> 
> >> is this ok? feel free to remove some checks
> > 
> > It should be enough just to check for the process. First using
> > pidfile and if that doesn't work then with fuser.
> 
> i do not know enough about fuser to know if this is available on all
> systems. after going through all comments i received, especially the
> ones from lars ellenberg, i compiled this set of checks.

This got too complicated. Again, part of the diff:
 
+    # try some different methods to see if we can find a running 
postfix/master instance
+    # postfix status
+    $binary $OPTION_CONFIG_DIR status >/dev/null 2>&1 && return $OCF_SUCCESS

Shouldn't this be enough? Is there a chance that "postfix status"
would lie? If not, then you wouldn't even need to fiddle with the
pid file. And it seems to me preferable to leave this to the
postfix itself: it should really know the best.

No need to repost the whole script again, I already edited it to
fix some false false(1) usage and reduce some noise :) (note that
false doesn't change the order of execution just exits with code 1).

Cheers,

Dejan

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to