tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* CAA action scripts on TruCluster 5.1
@ 2001-07-20 11:55 Dewhurst, Cy
  0 siblings, 0 replies; 2+ messages in thread
From: Dewhurst, Cy @ 2001-07-20 11:55 UTC (permalink / raw)
  To: tru64-unix-managers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="------_=_NextPart_000_01C11112.CFA7F8E0", Size: 4033 bytes --]

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C11112.CFA7F8E0
Content-Type: text/plain;
	charset="iso-8859-1"

Hello all

I'm having a few issues with a caa start script on our cluster.  If you run
the script alone, it starts the application (oninit - Informix) fine and
returns the necessary error codes etc.

However, if you trigger the script using:

caa_start informix_live

or do the same from the sysman gui, caa tells you it's started correctly and
is online on it's favored member - yet, it's not.  The check subsequently
takes the application offline.

It appears that the oninit process get's terminated by the caa stuff (or
terminates itself) , as the informix log indicates it only gets through the
first few steps of it's initialisation.

I thought this might be down to not being attached to a terminal or
something so I rewrote the script to use expect and I still get the same
behaviour.  Again, the script is fine if you run it from the command line.

I've tried unregistering, deleting the profile, creating the profile and
re-registering.  Still the same...

Any ideas are greatly appreciated

Scripts follow...


Cy Michael Dewhurst
Computer Systems Manager
Royal Bournemouth & Christchurch Hospitals NHS Trust
Education Centre
Castle Lane East
Bournemouth
BH7 7DW

Tel:  +44 (0) 1202 704487
Fax:  +44 (0) 1202 704108


------_=_NextPart_000_01C11112.CFA7F8E0
Content-Type: application/octet-stream;
	name="informix_live.scr"
Content-Disposition: attachment;
	filename="informix_live.scr"

#!/usr/bin/ksh -p
#
# This action script starts and stops informix live
#

PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin
LD_LIBRARY_PATH=/usr/local/lib
export PATH
export LD_LIBRARY_PATH
CAATMPDIR=/tmp

case $1 in
'start')  # Start up Informix OnLine instance (live)

        echo "Starting Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        expect -f /var/cluster/caa/script/oninit.expect
        exit 0
        ;;

'stop')   # Shutdown OnLine instance (live)

        echo "Stopping Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        expect -f /var/cluster/caa/script/onmode.expect
        sleep 2
        exit 0
        ;;
'check')	# Check OnLine instance (live)

        echo "Checking Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        # Can we see an informix server?
        onstat - 2>&1 > /dev/null
        ONSTATERRORCODE=$?
        case $ONSTATERRORCODE in
        -1)    # Offline
            echo "Informix is offline, cannot continue"
            exit 1
            ;;
        0)     # Initialisation
            echo "Server is still initialising, cannot continue"
            exit 0
            ;;
        2)     # Recovery
            echo "Server is in recovery mode, cannot continue"
            exit 0
            ;;
        3)     # Backup
            echo "Backup is already taking place, cannot continue"
            exit 0
            ;;
        4)     # Shutdown
            echo "Server is shutting down, cannot continue"
            exit 1
            ;;
        5)     # Online
            exit 0
            ;;
        6)     # Abort
            echo "Server is aborting, cannot continue"
            exit 1
            ;;
        255)   # SHM not initialised
            echo "Server is not initialised"
            exit 1
            ;;
        esac
        ;;
esac

------_=_NextPart_000_01C11112.CFA7F8E0
Content-Type: application/octet-stream;
	name="oninit.expect"
Content-Disposition: attachment;
	filename="oninit.expect"

#!/usr/local/bin/expect -f -d

if {[fork]!=0} exit
disconnect
system oninit

------_=_NextPart_000_01C11112.CFA7F8E0
Content-Type: application/octet-stream;
	name="onmode.expect"
Content-Disposition: attachment;
	filename="onmode.expect"

#!/usr/local/bin/expect -f

if {[fork]!=0} exit
disconnect

system onmode -yuck

------_=_NextPart_000_01C11112.CFA7F8E0--

^ permalink raw reply	[flat|nested] 2+ messages in thread

* CAA action scripts on TruCluster 5.1
@ 2001-07-20 12:49 Dewhurst, Cy
  0 siblings, 0 replies; 2+ messages in thread
From: Dewhurst, Cy @ 2001-07-20 12:49 UTC (permalink / raw)
  To: tru64-unix-managers

Apologies...

Some virus gateways appear to have picked up the .scr file I sent as an
attachment to be a virus, it's not even executable on a windows platform (as
you can see from below) and is harmless.  My original message follows (if
anybody is brave enough to read it of course!)  My fault... I should have
renamed it.

Hello all

I'm having a few issues with a caa start script on our cluster.  If you run
the script alone, it starts the application (oninit - Informix) fine and
returns the necessary error codes etc.

However, if you trigger the script using:

caa_start informix_live

or do the same from the sysman gui, caa tells you it's started correctly and
is online on it's favored member - yet, it's not.  The check subsequently
takes the application offline.

It appears that the oninit process get's terminated by the caa stuff (or
terminates itself) , as the informix log indicates it only gets through the
first few steps of it's initialisation.

I thought this might be down to not being attached to a terminal or
something so I rewrote the script to use expect and I still get the same
behaviour.  Again, the script is fine if you run it from the command line.

I've tried unregistering, deleting the profile, creating the profile and
re-registering.  Still the same...

Any ideas are greatly appreciated

Scripts follow...

informix_live.scr ----->

#!/usr/bin/ksh -p
#
# This action script starts and stops informix live
#

PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin
LD_LIBRARY_PATH=/usr/local/lib
export PATH
export LD_LIBRARY_PATH
CAATMPDIR=/tmp

case $1 in
'start')  # Start up Informix OnLine instance (live)

        echo "Starting Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        expect -f /var/cluster/caa/script/oninit.expect
        exit 0
        ;;

'stop')   # Shutdown OnLine instance (live)

        echo "Stopping Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        expect -f /var/cluster/caa/script/onmode.expect
        sleep 2
        exit 0
        ;;
'check')	# Check OnLine instance (live)

        echo "Checking Informix Online... Live"
        . /home/local/CaMIS/live/etc/heprofile
        # Can we see an informix server?
        onstat - 2>&1 > /dev/null
        ONSTATERRORCODE=$?
        case $ONSTATERRORCODE in
        -1)    # Offline
            echo "Informix is offline, cannot continue"
            exit 1
            ;;
        0)     # Initialisation
            echo "Server is still initialising, cannot continue"
            exit 0
            ;;
        2)     # Recovery
            echo "Server is in recovery mode, cannot continue"
            exit 0
            ;;
        3)     # Backup
            echo "Backup is already taking place, cannot continue"
            exit 0
            ;;
        4)     # Shutdown
            echo "Server is shutting down, cannot continue"
            exit 1
            ;;
        5)     # Online
            exit 0
            ;;
        6)     # Abort
            echo "Server is aborting, cannot continue"
            exit 1
            ;;
        255)   # SHM not initialised
            echo "Server is not initialised"
            exit 1
            ;;
        esac
        ;;
esac

oninit.expect ----->

#!/usr/local/bin/expect -f -d

if {[fork]!=0} exit
disconnect
system oninit

onmode.expect ----->

#!/usr/local/bin/expect -f -d

if {[fork]!=0} exit
disconnect
system onmode -yuck


Cy Michael Dewhurst
Computer Systems Manager
Royal Bournemouth & Christchurch Hospitals NHS Trust
Education Centre
Castle Lane East
Bournemouth
BH7 7DW

Tel:  +44 (0) 1202 704487
Fax:  +44 (0) 1202 704108

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-20 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-20 11:55 CAA action scripts on TruCluster 5.1 Dewhurst, Cy
  -- strict thread matches above, loose matches on Subject: below --
2001-07-20 12:49 Dewhurst, Cy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox