SUNW.SharedAddress

rgm_rt_SUNW.SharedAddress

(updated form a sunsolve document). 

SharedAddress is the resource type for assigning a shared IP address to a resource group. The SharedAddress resource type has standard resource type properties, in order for the Resource Group Manager to manage it:



Property Name

Explanation

Value

ccr_gennum

Generation number of the file so we always use the latest

integer

ccr_checksum

A checksum value to validate file integrity

hex # (meaningless except to cluster)

RT_basedir

The base directory containing all the cluster-related executables

/usr/cluster/lib/rgm/rt/hascip

RT_description

A description of the resource type

HA Shared Address Resource Type

START

The name of the start script/program

hascip_start

STOP

The name of the stop script/program

hascip_stop

VALIDATE

The name of the validate script/program

hascip_validate

UPDATE

The name of the update script/program

hascip_update

INIT

The name of the init program. It configures IP addresses on the loopback and loads the mcnet module on the adapters under the NAFO group.

hascip_init

FINI

The name of the fini program. It removes all the IP addresses from the loopback interfaces.

hascip_fini

BOOT

The name of the boot program. Currently the same as the init program (linked).

hascip_boot

MONITOR_START

The name of the monitor start script/program

hascip_monitor_start

MONITOR_STOP

The name of the monitor stop script/program

hascip_monitor_stop

MONITOR_CHECK

The name of the monitor check program

hascip_monitor_check

PRENET_START

The name of the prenet startup program

hascip_prenet_start

Single_instance

True if only a single instance can be running, false otherwise

FALSE

Init_nodes

Where the dataservice can be started

RT_INSTALLED_NODES (everywhere the RT is installed)

SysdefinedType

A system defined variable for RGM

Shared_address

Installed_nodes

A comma-delimited list of nodes where the RT is installed

all nodes

Failover

True if a failover only service, false otherwise

TRUE

API_version

Version of the API (Application Programming Interface)

2

RT_version

Version of the resource type

1.0

Pkglist

A list of the packages installedto get this RT

SUNWscu





This is an example of the resource type as it exists in the rgm_rt_SUNW.SharedAddress file in the CCR:

# pwd
/usr/cluster/lib/rgm/rt/hascip
# ls -l
total 1290
lrwxrwxrwx   1 root     root          13 Mar  9 22:50 hascip_boot -> ./hascip_init
-r-xr-xr-x   1 root     bin        53752 Nov 21 07:26 hascip_fini
-r-xr-xr-x   1 root     bin        54600 Nov 21 07:26 hascip_init
-r-xr-xr-x   1 root     bin        55728 Nov 21 07:26 hascip_ipmp_callback
-r-xr-xr-x   1 root     bin        53200 Nov 21 07:26 hascip_monitor_check
-r-xr-xr-x   1 root     bin        53836 Nov 21 07:26 hascip_monitor_start
-r-xr-xr-x   1 root     bin        53528 Nov 21 07:26 hascip_monitor_stop
-r-xr-xr-x   1 root     bin        54460 Nov 21 07:26 hascip_prenet_start
-r-xr-xr-x   1 root     bin        54220 Nov 21 07:26 hascip_retry
-r-xr-xr-x   1 root     bin        57072 Nov 21 07:26 hascip_start
-r-xr-xr-x   1 root     bin        54148 Nov 21 07:26 hascip_stop
-r-xr-xr-x   1 root     bin        53024 Nov 21 07:26 hascip_update
-r-xr-xr-x   1 root     bin        56436 Nov 21 07:26 hascip_validate

SharedAddress uses the following properties, which will be displayed in the rgm_rt file, as well as in the comma delimited list of properties for the SharedAddress resource in a resource group.



Property

Common/Extension

Description

START_TIMEOUT

Common

Time in seconds for the start script/program to finish.

Default=500

Min=360

Tunable: Anytime

STOP_TIMEOUT

Common

Time in seconds for the stop script/program to finish.

Default=300

Min=60

Tunable: Anytime

VALIDATE_TIMEOUT

Common

Time in seconds for the validate script/program to finish.

Validate is called at resource creation and during updates

of the resource or its resource group.

Default=300

Min=60

Tunable: Anytime

UPDATE_TIMEOUT

Common

Time in seconds for the update script/program to finish.

Update is called when the administrator updates properties

of the resource or its resource group.

Default=300

Min=60

Tunable: Anytime

INIT_TIMEOUT

Common

Time in seconds forthe init script/program to finish.

Init is called when a resource of this type becomes managed by the RGM

Default=300

Min=60

Tunable: Anytime

FINI_TIMEOUT

Common

Time in seconds for the fini script/program to finish.

Fini is called when a resource of this type is removed from RGM management

Default=300

Min=60

Tunable: Anytime

BOOT_TIMEOUT

Common

Time in seconds for the boot script/program to finish.

Boot is called on a node which joins or rejoins the cluster

when a resource of this type is already managed.

This script is expected to initialize resources of this type similar to the INIT method.

Default=300

Min=60

Tunable: Anytime

MONITOR_START_TIMEOUT

Common

Time in seconds for the monitor_start script/program to finish.

Monitor_start is called just after a resource has started.

Default=300

Min=60

Tunable: Anytime

MONITOR_STOP_TIMEOUT

Common

Time in seconds for the monitor_stop script/program to finish.

Monitor_stop is called just before a resource is stopped.

Default=300

Min=60

Tunable: Anytime

MONITOR_CHECK_TIMEOUT

Common

Time in seconds for the monitor_check script/program to finish.

Monitor_check is called when the probe script/program attempts to fail the RG to a new node.

Default=300

Min=60

Tunable: Anytime

PRENET_START_TIMEOUT

Common

Time in seconds for the prenet_start script/program to finish.

Prenet_start is called just before the network addresses in the

resource group are started.

Default=300

Min=60

Tunable: Anytime

Failover_mode

Common

A property that indicates what to do if start or stop fails for the resource.

HARD means relocate the resource to another node if start fails, and abort the node if stop fails.

SOFT means relocate the resource to another node in the cluster if start fails;do nothing if stop fails.

NONE means do nothing on either a start failure or stop failure.

Default: SOFT

Tunable: Anytime

Cheap_probe_interval

Common

The number of seconds between invocations of a quick fault probe

Default 60

Min 0 Max 3600

Tunable: At Creation

Thorough_probe_interval

Common

The number of seconds between thorough probes.

Default 60

Min 0 Max 3600

Tunable: At Creation

Retry_count

Common

The number of times a monitor attempts to restart a resource if it fails.

Default: 2

Max: 10

Tunable: At Creation

Retry_interval

Common

The number of seconds over which to count attempts to restart a resource.

Default: 60

Max: 3600

Tunable: At Creation

NetIfList

Extension

List of NAFO (Network Adapter Fail Over) interfaces on each node

Tunable: Anytime

AuxNodeList


List of nodes on which this resource is available

Tunable: At Creation

HostnameList

Extension

List of hostnames this resource manages

Tunable: At Creation

CheckNameService

Extension

Service check flag

Tunable : Anytime



This is an example of the resource type as it exists in the rgm_rt_SUNW.SharedAddress file in the CCR:

# cat rgm_rt_SUNW.SharedAddress:2
ccr_gennum      0
ccr_checksum    3DFAD007A21992E23180EB652838AECD
RT_basedir      /usr/cluster/lib/rgm/rt/hascip
RT_description  HA Shared Address Resource Type
START   hascip_start
STOP    hascip_stop
VALIDATE        hascip_validate
UPDATE  hascip_update
INIT    hascip_init
FINI    hascip_fini
BOOT    hascip_boot
MONITOR_START   hascip_monitor_start
MONITOR_STOP    hascip_monitor_stop
MONITOR_CHECK   hascip_monitor_check
PRENET_START    hascip_prenet_start
Single_instance FALSE
Init_nodes      RT_INSTALLED_NODES
SysdefinedType  Shared_address
Installed_nodes \*
Failover        TRUE
API_version     2
RT_version      2
Pkglist SUNWscu
Upgrade
Upgrade_from.1.0        ANYTIME
p.START_TIMEOUT Tunable=ANYTIME;Type=INT;Default=500;Min=360;
p.STOP_TIMEOUT  Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.VALIDATE_TIMEOUT      Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.UPDATE_TIMEOUT        Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.INIT_TIMEOUT  Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.FINI_TIMEOUT  Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.BOOT_TIMEOUT  Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.MONITOR_START_TIMEOUT Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.MONITOR_STOP_TIMEOUT  Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.MONITOR_CHECK_TIMEOUT Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.PRENET_START_TIMEOUT  Tunable=ANYTIME;Type=INT;Default=300;Min=60;
p.Failover_mode Tunable=ANYTIME;Type=ENUM;Default=SOFT;Enumlist=NONE,HARD,SOFT;
p.Cheap_probe_interval  Tunable=AT_CREATION;Type=INT;Default=60;Min=0;Max=3600;
p.Thorough_probe_interval       Tunable=AT_CREATION;Type=INT;Default=60;Min=0;Max=3600;
p.Retry_count   Tunable=AT_CREATION;Type=INT;Default=2;Min=0;Max=10;
p.Retry_interval        Tunable=AT_CREATION;Type=INT;Default=300;Min=0;Max=3600;
x.NetIfList     Tunable=ANYTIME;Type=STRINGARRAY;Max=4194303;Description="List of IPMP groups on each node";
x.AuxNodeList   Tunable=AT_CREATION;Type=STRINGARRAY;Default=;Max=4194303;Description="List of nodes on which this resource is available";
x.HostnameList  Tunable=AT_CREATION;Type=STRINGARRAY;Max=4194303;Description="List of hostnames this resource manages";
x.CheckNameService      Tunable=ANYTIME;Type=BOOLEAN;Default=TRUE;Description="Name service check flag";


How to enable debug mode for logicalhostname resource :


-Configure syslog with new options:

add daemon.debug messages login, to /var/adm/debug for example.

in syslog.conf :

daemon.debug        /var/adm/debug

# touch /var/adm/debug

Restart syslogd with:

# pkill -HUP syslogd

Test the addition to /etc/syslog.conf with:

# logger -p daemon.debug test

You should see output with "test" at the end of /var/adm/debug

       The file that controls the debug level is called "loglevel"
       To turn on debugging for a the sharedaddress type, you would do the following:

# mkdir -p /var/cluster/rgm/rt/SUNW.sharedaddress
# echo 9 > /var/cluster/rgm/rt/SUNW.sharedaddress/loglevel



restart the resource

( service address is 129.158.136.85)

node 1 :

Apr  6 16:42:08 v4u-4800e-doma-sin06 SC[,SUNW.SharedAddress:2,apache-rg,apache-sh-rs,hascip_prenet_start]: [ID 211198 daemon.info] Completed successfully.
Apr  6 16:42:08 v4u-4800e-doma-sin06 SC[,SUNW.SharedAddress:2,apache-rg,apache-sh-rs,hascip_start]: [ID 848033 daemon.info] SharedAddress online.
Apr  6 16:42:08 v4u-4800e-doma-sin06 SC[,SUNW.SharedAddress:2,apache-rg,apache-sh-rs,hascip_monitor_start]: [ID 579819 daemon.debug] client address: 0.0.0.0
Apr  6 16:42:08 v4u-4800e-doma-sin06 SC[,SUNW.SharedAddress:2,apache-rg,apache-sh-rs,hascip_monitor_start]: [ID 574345 daemon.debug] server address: 127.0.0.1
Apr  6 16:42:08 v4u-4800e-doma-sin06 SC[,SUNW.SharedAddress:2,apache-rg,apache-sh-rs,hascip_monitor_start]: [ID 211198 daemon.info] Completed successfully.


# ifconfig -a
lo0: flags=20010008c9<UP,LOOPBACK,RUNNING,NOARP,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
hme0: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 129.158.136.75 netmask ffffff00 broadcast 129.158.136.255
        groupname sc_ipmp0
        ether 8:0:20:ed:16:3e 
hme0:1: flags=1001040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,FIXEDMTU> mtu 1500 index 2
        inet 129.158.136.85 netmask ffffff00 broadcast 129.158.136.255
...

Node 2 :

Apr  6 16:41:13 v4u-4800e-dombc-sin06 Cluster.RGM.global.rgmd: [ID 922363 daemon.notice] resource apache-sh-rs status msg on node v4u-4800e-doma-sin06 change to <SharedAddress online.>

# ifconfig -a
lo0: flags=20010008c9<UP,LOOPBACK,RUNNING,NOARP,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
lo0:1: flags=20010088c9<UP,LOOPBACK,RUNNING,NOARP,MULTICAST,PRIVATE,IPv4,VIRTUAL> mtu 8232 index 1
        inet 129.158.136.85 netmask ffffffff 
hme0: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 129.158.136.74 netmask ffffff00 broadcast 129.158.136.255
        groupname sc_ipmp0
        ether 8:0:20:ed:16:45 
...

Node the node 1 is the "GIF" node ie manage the public address of the service and receive incoming requests, while other nodes have the public address plumbered on ther loopback interface.

The request came thru node1, and is then dispatched to another nodes of the cluster thru the interconnect.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jean-Christophe Lamoure

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today