Configuring SMF Service Probes for Containers in Sun Cluster 3.2.

Prerequsites:
Program inside a clustered zone must be managed through SMF and be in OFFLINE state.
Script for program must reside inside the zone and return 0 - normal, 100 - service restart needed, 201 - zone restart/switch is needed.

1. On clustered global zone edit file /opt/SUNWsczone/sczsmf/util/sczsmf_config:

RS=sczsmf-rs
RG=sczbt-rg
SCZBT_RS=sczbt-rs
ZONE=sczbt-zone-name
SERVICE=smf-service
RECURSIVE=true|false
STATE=true|false
SERVICE_PROBE=sczsmf-service-probe
The meaning and permitted values of the keywords in the sczsmf_config file are as
follows:
RS=sczsmf-rs
Specifies the name that you are assigning to the zone SMF resource. This must be
defined.
RG=sczbt-rg
Specifies the name of the resource group the zone boot resource resides in. This
must be defined.
SCZBT_RS=sczbt-rs
Specifies the name of the zone boot resource. You must specify a value for this
keyword.
ZONE=sczbt-zone-name
Specifies the zone name. This must be defined.
SERVICE=smf-service
Specifies the SMF service to enable/disable. This must be defined.
RECURSIVE=true|false
Specifies true to enable the service recursively or false to just enable the service
and no dependents. This must be defined.
STATE=true|false
Specifies true to wait until the service state is reached or false to not wait until
the service state is reached. This must be defined.
SERVICE_PROBE=sczsmf-service-probe
Specify the script to check the SMF service.

2. Run
/opt/SUNWsczone/sczsmf/util/sczsmf_register - to register SMF service resource within cluster.

3. Set failover properties for new resource(it may require to put resource offline):
sudo clresource set -p Failover_enabled=True sczsmf-rs
sudo clresource set -p Failover_mode=SOFT sczsmf-rs

4. Enable resource
sudo clresource enable sczsmf-rs

5. Check status:
sudo clresource status sczsmf-rs


Usefull comands:
clresourcegroup show
clresource list-prop

Additional reading:
http://docs.sun.com/app/docs/doc/819-3069/cacjgdbc?a=browse

Comments