Hi,

On Tue, Nov 10, 2009 at 09:45:52AM +0700, Dinh N. Quoc wrote:
> Thanks you all for pointing me out and here is my workaround, it seems
> to be working -- just needs a few lines to check the status of postfix
> before doing stop command. Are there any better ideas?
> 
> --- Cluster-Resource-Agents-5f09e3bd7e20/heartbeat/postfix
> 2009-08-14 17:32:33.000000000 +0700
> +++ /usr/lib/ocf/resource.d/heartbeat/postfix   2009-11-10
> 09:32:43.000000000 +0700
> @@ -141,6 +141,12 @@
> 
>  postfix_stop()
>  {
> +
> +    if ! postfix_status; then
> +        ocf_log info "Postfix already stopped."
> +        return $OCF_SUCCESS
> +    fi
> +
>      $binary $OPTIONS stop >/dev/null 2>&1
>      ret=$?

The patch looks fine to me. Looks like /usr/sbin/postfix can't
handle this itself. Raoul: Is that actually expected?

Thanks,

Dejan

> 
> On 11/10/09, Tim Serong <tser...@novell.com> wrote:
> > On 11/10/2009 at 04:56 AM, Dimitri Maziuk <dmaz...@bmrb.wisc.edu> wrote:
> >> On Monday 09 November 2009 07:00:42 Dejan Muhamedagic wrote:
> >>
> >> > It would, but the stop action failed:
> >> >
> >> > Nov  9 11:07:12 Server1 lrmd: [4682]: info: RA output:
> >> > (Postfix:stop:stderr) 2009/11/09_11:07:12 ERROR: Postfix returned an
> >> > error
> >> > while stopping. 1
> >> >
> >> > This error comes from /usr/sbin/postfix. Not an expert on
> >> > postfix, so CC the author of the RA, perhaps he can take a look.
> >>
> >> Actually, this
> >>
> >> > > Failed actions:
> >> > >     Postfix_monitor_50000 (node=Server1, call=16, rc=7,
> >> > > status=complete): not running
> >> > >     Postfix_stop_0 (node=Server1, call=17, rc=1, status=complete):
> >> > > unknown error
> >>
> >> looks like it's using a "restart" action, usually coded as "stop" followed
> >>
> >> by "start".
> >>
> >> If the daemon isn't running to begin with, "stop" will fail.
> >
> > That sounds like a bug in the RA.  If the resource is already stopped,
> > "stop" is meant to return success.
> >
> > Regards,
> >
> > Tim
> >
> >
> > --
> > Tim Serong <tser...@novell.com>
> > Senior Clustering Engineer, Novell Inc.
> >
> >
> >
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> >
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to