7. Resource.

Resources are necessary H/W or S/W elements for service operation and they include network interface cards(NIC), IP addresses, processes, services, and disks.
In MCCS, resource is used as the minimum unit of operation management with high availability.
When you create a resource in MCCS, you must enter a unique name that is used to differentiate a resource from others.
Thus, the existing names or reserved keywords (for instance, network interface cards (NIC) or processes) cannot be used as names.

There are two categories of resources in MCCS which are 'general(OnOFF)' and ‘monitor only(None)’. Most resources such as IP address, disk, process and service are 'General' which MCCS bring online and offline based on management policies. 

On the contrary, a 'MonitorOnly' resource such as NIC cannot be brought online or taken offline by MCCS  and only monitored the status and operation.

For instance, a network interface card can only monitor whether it exists physically or it is normal, But an IP address can be brought online or taken offline onto the NIC.

Table of Contents

Resource Attribute

Resource attribute is a reference value used when the resource takes some actions or determines the status.
Resource attribute can be identified from Resource Attributes view of MCCS web console.
From the group management view of MCCS web console, select the resource, then select ‘Resource Attributes’ tab located on the top of detailed information panel.

The values of gray colored are read only. They just contain and show the information of resource state.
The values of white colored are configurable by user definition. Below is description of some of them.

Detail on the "Specified Attribute" is also described on each page related to every resource in this manual.


Detail on the Resource Attribute is also described on the Resource Type in this manual.


[Figure] Resource Attribute View


Maximum numbers of resources available to be configured in MCCS is 500 pieces, and those of groups is 32 pieces.


Among the attributes listed on the following tables, those with the * marks do not work on the network card resources that is unable to use the online/offline command.


AttributeDescriptionTypeDefaultMinimum Value/
Maximum Value
EditNote
 Key AttributeCritical

When a failure occurs in the resource it indicated whether to failover the group.
true : failover the group.
false : no action.

BOOLEAN

X
Enabled

It is used when deciding whether to manage the resource. 
true : enabled.
false : disabled.

BOOLEAN

X
General AttributeAgentState

It indicates the agent state of the resource.
This cannot be edited by user. It is displayed after collecting all the agent state for all the nodes in the MCCS engine.

STRING

X

*BatchAfterOffline

This is a batch command to be executed after a resource is taken offline.  
Success or failure of the batch file does not affect group procedure.  
Also, it still operates regardless of other resource online or offline. 

FILE
8 to 254 characters of textO

*BatchAfterOnline

This is a batch command to be executed after a resource is brought online.  
Success or failure of batch does not affect group procedure.  
Also, it still operates regardless of other resource online or offline.

FILE
8 to 254 characters of textO
*BatchBeforeOffline

This is a batch command to be executed before a resource is brought online.  
Success or failure of batch does not affect group procedure.  
Also, it still operates regardless of other resource online or offline. 

FILE
8 to 254 characters of textO
*BatchBeforeOnline

This is a batch command to be executed before a resource is taken offline.  
Success or failure of batch does not affect group procedure.  
Also, it still operates regardless of other resource online or offline.

FILE
8 to 254 characters of textO
*BatchTimeout

It is the waiting time until execution of batch command completes. If execution result is over this time, it is considered as a failure. 

INTEGER300sec100 to 1500 secondsO
CleanProgram

This program is executed to initialize related resources and state when a failure occurs to a resource. This program must be written separately.

FILE
8 to 254 characters of textO
CleanTimeoutIt represents the time out until execution of CleanProgram is completed.
When the limit is exceeded, it will be forcefully stoped.
INTEGER60 sec0 to 300 secondsO
EnableTimeoutIt is the waiting time until the execution of Enable completes. If the execution result is over this time, it is considered as a failure. (unit = second)INTEGERINFINITY
1 to INFINITY secondsO
*FailoverableIt indicates whether the resource is in the state to be failover.BOOLEAN

X
FaultOnMonitorTimeoutsIf the monitoring timeout take place as much as this value, it is regarded as fault.
If it is '0', it is not regarded as fault.
INTEGER4 times0 to 12 timesO
GroupIt is the name of the group which the resource belongs.STRING
4 to 50 characters of textX
*LastOnline

It is name of the node on which state of the resource is online lastly.

STRING

X
Monitored

Depending on the 'MonitorTimeout', attribute values for the resource types, it record periodically whether each node's monitoring is completed.

BOOLEAN

X
MonitorIntervalIt indicates the interval to the next monitoring when online resources are monitored. If the value is too small, it may result in malfunction.
If the value is too big, then it will take too long until it detects the status changes.
INTEGER10 sec1 to 300 secondsO
MonitorTimeoutIt represents the time elapsed until monitoring is completed or terminated.INTEGER60 sec1 to 300 secondsO
NoAction

It represents the action attribute of the resource.
If the attribute is set to true, the resource is MonitorOnly resource. The value is set to false in case of NIC resource.

BOOLEAN

X
OfflineMonitorIntervalIt is the time interval until the next monitoring of offline resource.
If the time interval is '0', the offline resources will not be monitored.
INTEGER10 sec0 to 300 secondsO
*OfflineTimeoutIt indicates the maximum time until resources is taken offline successfully, stop or final judgment is made.INTEGER300 sec1 to 1500 secondsO
*OnlineRetryLimitIt indicate the number of retry count if it fails to start resource.INTEGER0 time0 to 10 timesO
*OnlineTimeoutIt indicates the maximum time until resources is brought online successfully, stop or final judgment is made.INTEGER300 sec1 to 1500 secondsO
*OnlineTrustTimeIt is the time to reset the retry count of resource.
If resources remain normal for a specified amount of time after starting, the retry count will be initialized. 
INTEGER600 sec60 to 3000 secondsO
*OnlineWaitLimitIf the timeout occurs while determining whether the resource goes online properly, it will retry as many times as defined.
It is the time interval of retry is defined in 'MonitorInterval'.
INTEGER2 times0 to 30 timesO
PersistIt is used when deciding whether to manage the resource. Persist Resource just has two resource state Online and fault.BOOLEAN

X
ResNameIt is the name of the resource.NAME
4 to 50 characters of textX
*Restartlimit 

It shows the retry count before failover when the resource is determined as a failure. 

INTEGER00 to 100 times

Shared Disk DR X
Mirror Disk DR X
Other Resources O


StateIt is the resource state of each node.STRING

X
ToleranceLimitWhen the monitoring results cannot be trusted , monitoring will be retried during the defined time.
For instance, if the result of the ICMP ping test with a network interface card cannot be trusted, it must be retried as many times as defined.
INTEGER0 time0 to 100 timesO
TypeIt is the name of the agent type of the resource.STRING

X
WaitMonitorIntervalIt indicates the time interval until starting the next monitoring when monitoring resources which are waiting for online or offline.INTEGER1 sec1 to 300 secondsO


MCCS has function to limit input values against user's input field, and it provides function detects automatically data which is input wrong by user's mistake.



Critical

This attribute shows to failover (true) or not (false) when failure has occured.
Default is set as true, and most of the resources are set as a true value. For resources that is not as important or resources that cannot be failover are set as false.
Critical values affects failover group only, does not affect parallel group. Critical attribute can be set onto each resource, but there are many things to be considered if it has linked dependency among resources. If at least one of the resources has true value of it's critical attribute in a group, all of the resources will be failover to provide proper service.


Enabled

It shows resources are enabled which can be monitored, online and offline as state.
A resource cannot be used right after it has been added, and it must be checked ‘enable’, when has been successful configured to be used.
Agent, a MCCS component is in detached state when add a resource for the first time. In this state, Resource and group is disabled which cannot be managed like online, offline, switch and etc.
If you check  'enable' after completing the configuration, agent executes the probing stage in which flaws in the configuration are detected. If it is considered normally configured, both the resource and agent turn into offline state.


BatchAfterOffline / BatchAfterOnline / BatchBeforeOnline / BatchBeforeOffline

It is used when there is additional command to be sent before the resource is online or after the resource is offline. Name of the user created batch or script file with path name is registered as value.
For an example, if an application that leads many child processes has gone offline by command, but child processes were not terminated normally. When this happens, a script file is needed to be used so that child processes can be all terminated. 
This command does not affect group Online/Offline of MCCS. In other words, MCCS does the group online even though the command has failed. Only result of the command execution write in the log.


BatchTimeout

BatchTimeout can be defined the timeout value of the result of batch execution.
It avoids a deadlock when exceptional situation occurs during the execution of scripts and other resources cannot be controlled.
If the script is not executed when offline or online attempts are made, stop further procedures and wait for the control of the administrator.



Resource State

[Figure] Resource State View


The resource state can be checked on resource state view of MCCS console.
From the group management view of MCCS console, select the resource and select ‘Resource Status’ tab from detailed information panel. The resource status will be shown.
Resource states are as below;

Online

Resource is running.

Offline

Resource has been stopped.

Fault

Resource has been failed.

Unknown

Resource is not being monitored since it is not enabled.



Resource Control

[Figure] Resource control


A resource can be managed easily through MCCS console. From the group management view of MCCS console, select the resource and right click , then control menu will be pop up.

Another way to select group from the group management view of MCCS console, is to select ‘Resource Dependency’ tab from detailed information panel, select the resource and right click, then control menu will be pop up.

Also, you can use the commands in the console menu or tool bar. CLI can be used as well.

 

Enable Resource

This can be checked by checking of there is a enabled check mark in front of the command. This can also be checked by checking on the Enabled value in the Resource Attribute. If the resource is disabled, resource state cannot be monitored.
If the attribute value is incorrect, this will be failed.  For example, when type a wrong path name in the process of application, monitoring whether it is online or offline is impossible. Therefore, whenever this is failed, attribute value should be checked first.


Group Failover on Error

This is about Critical attribute, and this can be checked through the check mark in front of this.
If this value is checked, that means when failure occurs, group will failover to the other node. This is not the case for the parallel group. 


Probe Now

When an agent monitors the resource state, it probes that periodically.
But when you use ‘Probe Now’, the agent probes the resource right away that this is ready to use. When you modify a value of resource attribute, this may not be applied right away.
But you can verify this modification is applied by using this right away.


Online

You can bring a resource online by using this. 

From here, there are sub menus per node so that nodes to be online can be selected. Sub menus can be 'Enabled' or 'Disabled' according to the resource state per node.
For example, failover mode group cannot send enabled command when it is online in the temporary node. This is because failover mode group should only have one node online and if there is one node that is already online, online menu is not enabled.
However, in case of parallel mode group, it is all enabled if it is not in an online state.

Failover mode group should only have one node online and so node that is online can start the Online command. 
When this is selected, you can choose appropriate node from the sub menu which shows nodes list. When the resource is already online state, all of the node icons will be disabled at failover mode group.
But the node will be enabled which the resource isn’t online state at parallel mode group.

If there is a fault mark in the resource, in which that has been failed, it should be cleared first before sending the that is online. This is because MCCS regards cause of the fault is not identified yet.

There are some considerations for dependency as well. To online a resource, if there is a child resource, child resource should be online state first. Since there is a dependency, if the child resource is not online state, parent resource cannot be online as well. 
When the child resource exists, you should check that is online state before the resource bring online.


Offline

You can take a resource offline by using this.
Similar to Online, you can choose appropriate node from the sub menu.
One thing that has to be careful when offline a resource is that there are online parent resources. Because the parent resources depend on the selected resource, those should be offline first.


Offline Propagation

You can take a resource offline including it's parent by using this. 
Similar to Offline, you can choose appropriate node from the sub menu.


Clear Fault

You can clear the fault mark on a resource icon by using this. You can choose appropriate node from the sub menu. 
Clear fault on one resource is only for that particular resource, but clear fault for group is for all the resources in the group.


Delete

You can delete a resource by using this.



Copy and Paste Resource

It is an annoyance if attribute value is entered whenever a new resource is added.
When you add a new resource same as type of resource which is already exist, you can use this function.
Copied resource maintain same values as original one and can be pasted on any group.
After paste the resource, you can edit the values.

Attribute values that is copied resource are basically same as original resource.
Therefore, attribute of pasted resource should be edited according to the situation so that it does not duplicate with copied resource.

 

Copy and Paste resource

  1. Right click on the resource to be copy and select "Copy Resource".
  2. Right click on the group to be paste and select "Paste Resource". 


Copied resource name is defined which "_number" is added from original name by default and this can be editable.

Depending on the resource type, you need to enter extra information if necessary.


[Figure] Paste Networkcard Resource View



CLI Use (mcres command)

It sends the commands related to MCCS resource. Resource related commands such as add, delete, online, offline and etc can be done.

When you install MCCS, the initial user account ID is set to 'admin' and the password is set to 'password'.
When you run the CLI command, you need to enter the ID and the password. Otherwise, the above initial ID and password will be used.
Thus, when you change the initial user password, you must enter the ID/password in the CLI command as options.


Syntax


mcres [-u userid -pw password] [-ip node_ip_address] [-p port] -command [ resource ] [ -g group ] [ -n node]
mcres [-u userid -pw password] [-ip node_ip_address] [-p port] -add [ resource ] [ -t resource_type ] [ -g group ]
mcres [-u userid -pw password] [-ip node_ip_address] [-p port] -monitor [ group_name ] [ -t interval(seconds)]
mcres [-u userid -pw password] [-ip node_ip_address] [-p port] -modify [ resource ] [-a attribute attribute_value] [ -g group ] [ -n node]


Options

OptionDescription

-h

Display help menu.

-uEnter the user account.
-pwEnter the password.

-ip

It defines the node to access to execute command. If omitted, it will access to execute command for local node.

-p

It defines the port to access to execute command. If omitted, it will access to the default value which is 4321, and when you define specific port number as heartbeat, enter this followed by --p.

-resourcecommand

It defines resource command.

(add, delete, enable, disable, monitor, modify, link, unlink, local, Global, Online, Offline, Offlineprop, Probe, clear, list)

resource

It enters resource name.

-a

[list] It defines the attribute value that should be listed if it is command.  
[modify] It defines the attribute and attribute value that should be changed if it is command.  
attribute: It defines the values of the group.  
attribute_value: It defines the values that should be changed.

-t

It defines resource type when it is [-add] command. It specifies time interval when it is [-monitor] command.

-g

It defines group name to be managed.

-n

It defines node name to be managed.

Example

add

Add testResource of application resource type on testGroup.


mcres -u admin -pw password -add testResource -t resourceType -g testGroup

delete

Delete testResource


mcres -u admin -pw password -delete testResource

enable

Enable testResource


mcres -u admin -pw password -enable testResource

disable

Disable testResource


mcres -u admin -pw password -disable testResource

monitor

It monitors a resource in every interval. If the period is not set, 3 sec is a default value.


mcres -u admin -pw password -monitor [testGroup] [-t interval(seconds)]

It monitors testResource every 10 seconds. 


mcres -u admin -pw password -monitor testGroup -t 10

modify

Modify a value of attribute of testResource in a node. 


mcres -u admin -pw password -modify testResource -a attribute attribute_value [ -n node ]

Modify a value of ‘User’ attribute of testResource to administrator in testNode


mcres -u admin -pw password -modify testResource -a User administrator -n testGroup

local

Set a value of attribute of the resource per node.
It is used locally so that other values can be inserted for attribute values of all the nodes.
(Modify command should be used to change the value.) 


mcres -u admin -pw password -local -r testResource -a attribute

global

Set a value of attribute of the testResource to all node.
It is used publicly so that values can be inserted with common values for all nodes. 


mcres -u admin -pw password -global -r testResource -a attribute [value]

Set a User’ attribute of the testResource to administrator


mcres -u admin -pw password -global -r testResource -a User administrator

 

online 

Bring online testResource on testNode.


mcres -u admin -pw password -online testResource -n testNode

offline

Take offline testResource on testNode


mcres -u admin -pw password -offline testResource -n testNode

offlineprop

Take offline the resource including its parent resource(s) of testResource on testNode


mcres -u admin -pw password -offlineprop testResource -n testNode

probe

Probe testResource on testNode.


mcres -u admin -pw password -probe testResource -n testNode


clear

Remove fault mark on testResource of testNode.


mcres -u admin -pw password -clear testResource [ -n testNode ]

list

Print current resource state.


mcres -u admin -pw password -list [resource [ -a attribute]] | [-g group [-a attribute]]