TruCluster
cancel
Showing results for 
Search instead for 
Did you mean: 

caa_start arguments do not display

SOLVED
Go to solution
Mike W Nelson
Occasional Visitor

caa_start arguments do not display

I am modifying the caa scripts to cope with node failures, either on start or stop and whilst running.

I have added a usr defined attribute SINGLE_NODE so that I can specify single node start/stop throughout all the scripts, but for some reason it is not working,

Your help would be much appreciated.

Details below:-

I have specified the following in the application.tdf

#!==========================
attribute: SINGLE_NODE
type: name_list
switch: -o s
default:
required: no

#!==========================
attribute: USR_DEBUG
type: boolean
switch: -o d
default: 0
required: no

profile below created with the following command:-
/usr/sbin/caa_profile -create oracle_ba_primary -t application -a oracle_template.scr -d oracle_ba_primary -p restricted -h hpt001 hpt002 -r mhcslive_ip -o st=600,ci=60,ra=1,s=”hpt001 hpt002”

NAME=oracle_ba_primary
TYPE=application
ACTION_SCRIPT=oracle_template.scr
ACTIVE_PLACEMENT=0
AUTO_START=0
CHECK_INTERVAL=60
DESCRIPTION=oracle_ba_primary
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=hpt001 hpt002
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REBALANCE=
REQUIRED_RESOURCES=mhcslive_ip
RESTART_ATTEMPTS=1
SCRIPT_TIMEOUT=600
SINGLE_NODE=hpt001 hpt002
USR_DEBUG=0

caa_register oracle_ba_primary
caa_profile -update oracle_ba_primary

added the following line in the action script
echo $_CAA_SINGLE_NODE

so if I run a caa_start oracle_ba_primary the output for
SINGLE_NODE is hpt001 hpt002

If however I run the following

caa_start -c hpt001 SCRIPT_TIMEOUT=120 SINGLE_NODE="hpt002" oracle_ba_primary

I get the following output to the screen:-

SCRIPT_TIMEOUT displays 600 instead of the 120 specified in the caa_start
SINGLE_NODE displays hpt001 hpt002 instead of the hpt002 specified in the caa_start.

The standard arguments are not displaying properly

Best Regards Mike
3 REPLIES
Pieter 't Hart
Honored Contributor
Solution

Re: caa_start arguments do not display

never used caa_start this way but :

syntax from man-page is :
/usr/sbin/caa_start [USR_attribute_name=value] [...] resource_name [-c
cluster_member] [-q]

so you may need rearrange the order of elements in your command.
caa_start SCRIPT_TIMEOUT=120 SINGLE_NODE="hpt002" oracle_ba_primary -c hpt001

and maybe the variables need the "USR_" prefix ?
caa_start USR_SCRIPT_TIMEOUT=120 USR_SINGLE_NODE="hpt002" oracle_ba_primary -c hpt001

Pieter
Mike W Nelson
Occasional Visitor

Re: caa_start arguments do not display

Thanks Pieter,

Your right, the USR_ seems to be mandatory for user arguments.
I've updated the application.tdf file to USR_SINGLE_NODE for the attribute name and echo $_USR_SINGLE_NODE displays the variable.

Much appreciated, the script is now working

Best Regards Mike
Pieter 't Hart
Honored Contributor

Re: caa_start arguments do not display

thanks for feedback and thanks for points
regards,
Pieter