Section | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Resource Attributes
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.
[Figure] Resource Attribute View
Attribute | Description | Type | Default | Edit | Note | |
---|---|---|---|---|---|---|
Key Attribute | *Critical | When a failure occurs in the resource it indicated whether to failover the whole group. | BOOLEAN | X | ||
*Enabled | It is used when deciding whether to manage the resource. | BOOLEAN | X | |||
General Attribute | AgentState | It indicates the agent state of the resource. | STRING | X |
...
리소스 그룹이란 ?
그룹은 서비스 운영에 필요한 리소스들을 하나로 묶은 집합입니다.
리소스들을 그룹으로 묶는 이유는 서비스 특성에 있습니다. 별개로 분리되면 의미가 없는 리소스들(예를 들면 네트워크 카드와 IP 주소, 데이터 소스와 데이터베이스 등)은 각각의 단일 객체로는 의미 있는 서비스를 제공할 수 없습니다.
이러한 리소스들을 서로 의존 관계로 연결하고 하나의 그룹으로 구성해서 같은 노드로 실행되어야 의미 있는 서비스를 제공할 수 있습니다.
리소스 배타성과 공유성 – 그룹 모드(병렬/페일오버)
리소스 배타성이란 한쪽 노드에서만 실행되어야 하는 속성을 의미합니다.가령, 데이터베이스 서비스 그룹인 경우는 네트워크 카드, 네트워크 주소, 공유 디스크(혹은 미러 디스크), 데이터베이스와 같은 필수 리소스들로 구성됩니다.
이 중에서 데이터베이스 연결점을 제공하는 IP 주소와 데이터가 위치하는 디스크와 같은 리소스는 오직 하나의 노드에서만 배타적으로 운영할 수 있습니다.
반면에 네트워크 카드와 같은 리소스는 모든 노드에서 병렬로 운영 될 수 있습니다. 데이터베이스와 같은 애플리케이션은 의존하는 리소스(데이터) 상태에 따라 달라집니다.배타적인 리소스를 하나 이상 포함하는 그룹은 페일오버 모드로 설정되어야 합니다.
반면 병렬 모드 그룹은 병렬 운영 할 수 있는 리소스만으로 구성되어야 합니다.
시작/종료 순서
리소스는 그룹 내에서 상호간의 의존 관계에 따라 시작 또는 종료되는 과정이 정해진 순서를 갖습니다.예를 들면 데이터베이스 관련 애플리케이션은 네트워크 리소스(네트워크 카드, 네트워크 주소)와 데이터 리소스(공유 디스크 혹은 미러 디스크)가 정상적으로 시작된 이후에 시작되어야 합니다.
왜냐하면 네트워크 IP 주소와 데이터베이스가 저장된 디스크가 없는 상태에서는 데이터베이스 관련 애플리케이션이 정상으로 구동되지 않기 때문입니다. 네트워크 리소스와 데이터 리소스는 상호 의존 관계가 없으므로 독립적으로 시작될 수 있습니다.
...
리소스 그룹 상태
그룹 상태는 리소스들의 상태에 의해 결정됩니다. 그룹내의 모든 리소스가 온라인 상태라면 그룹은 온라인 상태가 되고, 모두 오프라인 상태라면 그룹도 오프라인 상태가 됩니다. 일부만 온라인이라면 일부 동작 상태가 되며, 하나 이상의 리소스가 장애 상태라면 그룹도 장애 상태가 됩니다.
그룹에 대한 제어는 상태에 따라 가능한 메뉴가 활성화 됩니다. 예를 들면 종료 명령은 그룹이 일부 동작 혹은 온라인 상태일 때만 활성화 되고, 장애 표시 제거 명령은 그룹이 장애 상태일 때만 활성화됩니다.
(상세한 내용은 "챕터 3.2 그룹 상태" 와 "챕터 3.3 그룹 제어" 편을 참조해 주십시오.)
모니터링과 서비스 복구
그룹은 하나 이상의 리소스가 온라인 상태가 되면 서비스를 자동 복구할 수 있는 상태가 됩니다. 어떤 노드에서 온라인 상태였던 리소스에서 장애가 발생하면 그룹 상태는 장애 상태가 되고 복구 관련 설정에 따라 복구 과정이 이루어 집니다.
병렬 모드에서는 재시작 설정 옵션에 따라 복구할 수 있습니다.
...
*BatchAfterOffline | This is a batch command to be executed after a resource is taken offline. | FILE | O | ||
*BatchAfterOnline | This is a batch command to be executed after a resource is brought online. | FILE | O | ||
*BatchBeforeOffline | This is a batch command to be executed before a resource is taken offline. | FILE | O | ||
*BatchBeforeOnline | This is a batch command to be executed before a resource is brought online. | FILE | O | ||
*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. (unit = second) | INTEGER | 300 sec | O | |
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 | O | ||
Failoverable | It indicates whether the resource is in the state to be failover. | BOOLEAN | X | ||
Group | It is the name of the group which the resource belongs. | STRING | X | ||
LastOnline | It is name of the node on which state of the resource is online lastly. | STRING | |||
Monitored | It periodically records whether monitoring is completed. | BOOLEAN | X | ||
NoAction | It is only for persistent resources. If it is 'true', action like Online, Offline, other than monitoring will be prohibited. | BOOLEAN | X | ||
ResName | It is the name of the resource. | NAME | X | ||
Restartlimit | It shows the number to restart before failover when the resource is determined as a failure. | INTEGER | 0 | O | |
State | It is the resource state of each node. | STRING | X | ||
Type | It is the name of the agent type of the resource. | STRING | X |
※ There is no attributes attached "※" icon in monitor only resource like Network Interface Card
*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 mode group only, does not affect parallel mode group. Critical attribute can be considered alone but there are many things to be considered if it has linked dependency among resources.
For an example, none critical resource on which critical resource(parent) depends, group failover will be occurred because one of critical resource cannot be 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 created, and it must be checked ‘enable’, when has been successful configured to be used.
Agent, a MCCS component is in detached state when create 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 Menus
If you want to use the resource handling commands in MCCS, go to the management console and select the resource in the left view and right click with your mouse button to launch the pop up window.
Alternatively, select group and right click with your mouse button on the resource in the 'Resource Dependency' tab to launch the same pop up as resource.
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 for failure
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 is when there is a parent resource.
Therefore, if there is an online parent resource, a dialog box appears asking ‘There is an online resource dependent. Would you like to stop parent resources too?’
Offline Propagation
You can take a resource including parent resources offline by using this.
If there is an online parent resource, a dialog box appears asking ‘There is an online resource dependent. Would you like to stop parent resources too?’
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 created.
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.
Warning |
---|
Attribute values that is copied resource are basically same as original resource. |
Resource Copy
- Right click on the resource to be copy and select "Copy Resource".
- Right click on the resource to be paste and select "Paste Resource".
Resource Paste
Select the network adaptor for the resource to newly add and name the resource.
Info |
---|
Copied resource name is defined which '_number'is added from original name by default and this can be editable. |
ex> Paste Network Card Resource view
[Figure] Paste Network Card Resource View
CLI Use (mcres command)
It sends MCCS resources related commands. Commands such as add, delete, online, offline, edit of resource can be done.
Info |
---|
When you install MCCS, the initial user account ID is set to 'admin' and the password is set to 'password'. |
Syntax
mcres [-u userid -pw password] [-n node_ip_address] [-p port] -command [ resource ] [ -g group ] [ -n node] mcres [-u userid -pw password] [-n node_ip_address] [-p port] -add [ resource ] [ -t resource_type ] [ -g group ] mcres [-u userid -pw password] [-n node_ip_address] [-p port] -monitor [ group_name ] [ -t interval(seconds)] mcres [-u userid -pw password] [-n node_ip_address] [-p port] -modify [ resource ] [-a attribute attribute_value] [ -g group ] [ -n node] |
Options
Option | Description |
-h | It prints help menu. |
-u | Designate the user account ID. |
-pw | Enter the user password. |
-n | 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. |
-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 -add testResource -t Application -g testGroup |
delete
Delete testResource.
mcres -delete testResource |
enable
Enable testResource.
mcres -enable testResource |
disable
Disable testResource.
mcres -disable testResource |
monitor
It monitors a resource in every interval. If the period is not set, 3 sec is a default value.
mcres -monitor [testGroup] [-t interval(seconds)] |
It monitors testResource every 10 seconds.
mcres -monitor testGroup -t 10 |
modify
Modify a value of attribute of testResource in a node.
mcres -modify testResource -a attribute value [ -n node] |
Modify a value of ‘User’ attribute of testResource to administrator in testNode.
mcres -modify testResource -a User administrator -n testGroup |
link
Make a dependency link among resources.
Make a dependency link between the resource1 as parent and the resource2 as child.
mcres -link resource1 resource2 |
unlink
Delete a dependency link between the resource1 and the resource2.
mcres -unlink resource1 resource2 |
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 -local 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 -global testResource -a attribute [value] |
Set a User’ attribute of the testResource to administrator.
mcres -global testResource -a User administrator |
online
Bring online testResource on testNode.
mcres -online testResource -n testNode |
offline
Take offline testResource on testNode.
mcres -offline testResource -n testNode |
Offlineprop
Take offline the resource including its parent resource(s) of testResource on testNode.
mcres -offlineprop testResource -n testNode |
probe
Probe testResource on testNode.
mcres -probe testResource -n testNode |
clear
Remove fault mark on testResource of testNode.
mcres -clear testResource [ -n testNode] |
list
Print current resource state.
mcres -list [resource [ -a attribute]] | [-g group [-a attribute]] |