ITEM: P8371L

stop_server order is same as start_server



Question:

Env:  HACMP 2.1 cluster at AIX 3.2.5

Desc: The starting and stopping of the application servers
occurs in the same order.  It would make more since to have
the application servers stop in the reverse order that they
were started in.  For example:

Start Application Servers:
   ORACLE Database Server
   Application Server \#1
   Application Server \#2

Stop Application Servers:
   Application Server \#2
   Application Server \#1
   ORACLE Database Server

Isn't this a defect?

Action:  The start_server and stop_server scripts both
use the APPLICATIONS environment variable obtained from
`/usr/sbin/cluster/clgetres -A` for their input strings.
This environment variable can be reversed.  I used the
following environment variable to reverse them:

REVERSE_APPS=`echo $APPLICATIONS | awk '{ for (i = NF; \\
i >= 1; i--) print $i }'`

There are only two scripts that call the stop_server 
script:

  /usr/sbin/cluster/samples/node_up_remote
  /usr/sbin/cluster/samples/node_down_local

The call is the same in both scripts:
----------------------------------------------------------------
if [ -n "$APPLICATIONS" ]
then
        /usr/sbin/cluster/clcallev stop_server "$APPLICATIONS"

        if [ $? -ne 0 ]
        then
                STATUS=1
        fi
fi
----------------------------------------------------------------

You can make the following modification to that call 
each script:
----------------------------------------------------------------
REVERSE_APPS=`echo $APPLICATIONS | awk '{ for (i = NF; \\
i >= 1; i--) print $i }'`

if [ -n "$APPLICATIONS" ]
then
        /usr/sbin/cluster/clcallev stop_server $REVERSE_APPS

        if [ $? -ne 0 ]
        then
                STATUS=1
        fi
fi
----------------------------------------------------------------

 This item was submitted as a possible APAR.
 Here is the response from  the developer:

 This is not a defect.  These scripts are not written in stone and
 are meant to be customized by the installer in order to accommodate
 that site's particular needs.  Not every site will want their servers
 stopped in reverse order from the order that they were started.  It
 is also an easy change if the user wants servers stopped in reverse
 order.


Support Line: stop_server order is same as start_server ITEM: P8371L
Dated: January 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:38
Comments or suggestions? Contact us