From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653652421993.tru64-unix-managers.marc@archive.invalid> From: "Dewhurst, Cy" Date: Fri, 20 Jul 2001 11:55:03 +0000 To: tru64-unix-managers Subject: CAA action scripts on TruCluster 5.1 X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653652421993 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------_=_NextPart_000_01C11112.CFA7F8E0" 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--