> > > > +    [ ! -r $SAPSTARTPROFILE ] && abnormal_end "Expected 
> > $SAPSTARTPROFILE to be the instance START profile, please set 
> > START_PROFILE parameter!"
> > > 
> > > Though this one should exit with code $OCF_ERR_INSTALLED.
> > > Perhaps add the code parameter to abnormal_end?
> > 
> > Hm, it is about to test the SAP start profile, but the error is, that 
the 
> > OCF_RESKEY_START_PROFILE is set to the wrong value (because the file 
> > exists quite sure, we just don't know the right name of it).
> > 
> > Isn't that a OCF_ERR_CONFIGURED ?
> 
> It could be either, i.e. the file could be missing on a node.
> Well, you can apply your SAP expertise here :) For instance, if
> the profile is on the shared storage then it's safe to say
> OCF_ERR_CONFIGURED.

That is true in 99.9% of the cases. Other advantage: no other change to 
"abnormal_end" needed :-)

> > > >      pkill -9 -f "sapstartsrv.*$runninginst"
> > > >      $SAPSTARTSRV pf=$SAPSTARTPROFILE -D -u $sidadm
> > > > @@ -357,7 +375,8 @@
> > > >        chkrc=$OCF_SUCCESS
> > > >      else
> > > >        ocf_log error "sapstartsrv for instance $SID-$InstanceName 
> > could not be started!"
> > > > -      chkrc=$OCF_NOT_RUNNING
> > > > +      chkrc=$OCF_ERR_GENERIC
> > > > +      [ "$__OCF_ACTION" = "monitor" ] && chkrc=$OCF_NOT_RUNNING
> > > 
> > > Better:
> > > 
> > >       ocf_is_probe && chkrc=$OCF_NOT_RUNNING
> > 
> > I'd like to change it into:
> > 
> >       [ "$ACTION" = "monitor" ] && chkrc=$OCF_NOT_RUNNING
> > 
> > Because probe AND monitor was meant here.
> 
> Note that monitor runs only in case the resource has been
> previously successfully started. So, this is an unexpected
> condition. We can't say if the resource is completely down,
> right? I mean, we don't know how it was stopped.

Somehow I had in my mind, that the monitor must always return OCF_SUCCESS 
or OCF_NOT_RUNNING. 
Just check with the guide from Florian: OCF_ERR... is also allowed.
So I'll change it as you proposed first.

> BTW, if sapstartsrv isn't running, the SAP instance could still
> be up, right?

Yes, this is correct. And I allways tried to avoid, that a missing 
sapstartsrv leads to any actions from the cluster to restart or relocate 
the SAP instance.

> Welcome.
> Dejan

Regards
Alex
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to