SUNW.LogicalHostname

rgm_rt_SUNW.LogicalHostname

(updated from a sunsolve document)

LogicalHostname is the resource type for assigning logical host names to a resource group. The LogicalHostname 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 (usually 1)

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/hafoip

RT_description

A description of the resource type

Logical Hostname Resource Type

START

The name of the start script/program

hafoip_start

STOP

The name of the stop script/program

hafoip_stop

VALIDATE

The name of the validate script/program

hafoip_validate

UPDATE

The name of the update script/program

hafoip_update

MONITOR_START

The name of the monitor start script/program

hafoip_monitor_start

MONITOR_STOP

The name of the monitor stop script/program

hafoip_monitor_stop

MONITOR_CHECK

The name of the monitor check program

hafoip_monitor_check

PRENET_START

The name of the prenet startup program

hafoip_prenet_start

Single_instance

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

FALSE

Init_nodes

Where the dataservice can be started

RG_PRIMARIES

SysdefinedType

A system defined variable for RGM

Logical_hostname

Installed_nodes

A comma delimited list of nodes where the RT is installed

\* means 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 installed to get this RT

SUNWscu





# pwd
/usr/cluster/lib/rgm/rt/hafoip
# ls -l
total 868
-r-xr-xr-x   1 root     bin        44816 Nov 21 07:26 hafoip_ipmp_callback
-r-xr-xr-x   1 root     bin        42920 Nov 21 07:26 hafoip_monitor_check
-r-xr-xr-x   1 root     bin        43576 Nov 21 07:26 hafoip_monitor_start
-r-xr-xr-x   1 root     bin        43272 Nov 21 07:26 hafoip_monitor_stop
-r-xr-xr-x   1 root     bin        43576 Nov 21 07:26 hafoip_prenet_start
-r-xr-xr-x   1 root     bin        44008 Nov 21 07:26 hafoip_retry
-r-xr-xr-x   1 root     bin        46864 Nov 21 07:26 hafoip_start
-r-xr-xr-x   1 root     bin        43736 Nov 21 07:26 hafoip_stop
-r-xr-xr-x   1 root     bin        42744 Nov 21 07:26 hafoip_update
-r-xr-xr-x   1 root     bin        46016 Nov 21 07:26 hafoip_validate





LogicalHostname 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 LogicalHostname 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

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 : HARD

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

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.LogicalHostname file in the CCR:





# cat rgm_rt_SUNW.LogicalHostname:3

ccr_gennum      1
ccr_checksum    76230EF40DFB8862AAB4B1176E7C10C1
RT_basedir      /usr/cluster/lib/rgm/rt/hafoip
RT_description  Logical Hostname Resource Type
START   hafoip_start
STOP    hafoip_stop
VALIDATE        hafoip_validate
UPDATE  hafoip_update
MONITOR_START   hafoip_monitor_start
MONITOR_STOP    hafoip_monitor_stop
MONITOR_CHECK   hafoip_monitor_check
PRENET_START    hafoip_prenet_start
Single_instance FALSE
Init_nodes      RG_PRIMARIES
SysdefinedType  Logical_hostname
Installed_nodes \*
Global_zone     TRUE
Failover        TRUE
API_version     2
RT_version      3
Pkglist SUNWscu
Upgrade
Upgrade_from.2  ANYTIME
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.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=HARD;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;
p.Global_zone_override  Tunable=WHEN_DISABLED;Type=BOOLEAN;Default=TRUE;
x.NetIfList     Tunable=ANYTIME;Type=STRINGARRAY;Max=4194303;Description="List of IPMP groups on each node";
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 thelogicalhostname type, you would do the following:

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




restart the resource

Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 634592 daemon.debug] Debug Level is scds_syslog_debuglevel <9>
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 525101 daemon.debug] Debug: OP 
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 520764 daemon.debug] Nodepart in the ipmp group is 1
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 520764 daemon.debug] Nodepart in the ipmp group is 2
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 772360 daemon.debug] Returning IPMP group sc_ipmp0
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 152369 daemon.debug] 1 usable addresses found for hostname nfs-ip-1
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 539202 daemon.debug] About to attempt getting lock
Mar 23 21:37:23 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 243353 daemon.debug] Returning from lock() routine
Mar 23 21:37:24 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 399647 daemon.debug] Releasing serialization lock
Mar 23 21:37:24 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_prenet_start]: [ID 211198 daemon.info] Completed successfully.
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 634592 daemon.debug] Debug Level is scds_syslog_debuglevel <9>
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 525101 daemon.debug] Debug: OP 
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 520764 daemon.debug] Nodepart in the ipmp group is 1
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 520764 daemon.debug] Nodepart in the ipmp group is 2
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 772360 daemon.debug] Returning IPMP group sc_ipmp0
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 152369 daemon.debug] 1 usable addresses found for hostname nfs-ip-1
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 834312 daemon.debug] safe_to_takeover returned OK
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 539202 daemon.debug] About to attempt getting lock
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 243353 daemon.debug] Returning from lock() routine
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 399647 daemon.debug] Releasing serialization lock
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_start]: [ID 980477 daemon.info] LogicalHostname online.
Mar 23 21:37:28 v4u-4800e-dombc-sin06 Cluster.RGM.global.rgmd: [ID 922363 daemon.notice] resource nfs-ip-1 status msg on node v4u-4800e-dombc-sin06 change to <LogicalHostname online.>
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 634592 daemon.debug] Debug Level is scds_syslog_debuglevel <9>
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 525101 daemon.debug] Debug: OP 
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 520764 daemon.debug] Nodepart in the ipmp group is 1
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 520764 daemon.debug] Nodepart in the ipmp group is 2
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 772360 daemon.debug] Returning IPMP group sc_ipmp0
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 579819 daemon.debug] client address: 0.0.0.0
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 574345 daemon.debug] server address: 127.0.0.1
Mar 23 21:37:28 v4u-4800e-dombc-sin06 SC[,SUNW.LogicalHostname:3,nfs-rg,nfs-ip-1,hafoip_monitor_start]: [ID 211198 daemon.info] Completed successfully.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jean-Christophe Lamoure

Search

Archives
« April 2015
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