This section describes how to create the definition file and build the cluster application for network takeover.
For network takeover, create the following definition file on all nodes controlling the network devices of Azure.
/usr/opt/reliant/etc/hvazurenicconfig
Information
When you create the /usr/opt/reliant/etc/hvazurenicconfigfile, you can use the /usr/opt/reliant/etc/hvazurenicconfig.template file as a template.
# cp -p /usr/opt/reliant/etc/hvazurenicconfig.template /usr/opt/reliant/etc/hvazurenicconfig
Note
Create the hvazurenicconfigfile with a root user and change the permission to 600.
Information in the definition file
TakeoverIPAddress CFName1 NICName1 CFName2 NICName2 ResourceGroup AppID TenantID CertPath
Item | Contents | Remarks |
---|---|---|
TakeoverIPAddress | Takeover IP address (Specify the IPv4 address.) | - |
CFName1 | Specify the CF node name. | - |
NICName1 | Specify the network interface name of the virtual machine in CFName1. | Check it in the Azure portal |
CFName2 | Specify the CF node name. | - |
NICName2 | Specify the network interface name of the virtual machine in CFName2. | Check it in the Azure portal |
ResourceGroupName | Specify the resource group name. | Check it in the Azure portal |
AppID | Specify the application ID of the service principal. | The value recorded in step 3 of "27.3 Presetting" |
TenantID | Specify the tenant ID of the service principal. | The value recorded in step 3 of "27.3 Presetting" |
CertPath | Specify the path of the service principal certificate. | The value recorded in step 3 of "27.3 Presetting" |
Example
On each node, enter information on the operational system and the standby system in the created /usr/opt/reliant/etc/hvazurenicconfig file.
The following is an example when both 172.31.0.10 and 172.31.0.11 are controlled as the takeover IP address.
TakeoverIPAddress | CFName1 | NICName1 | CFName2 | NICName2 | ResourceGroupName | AppID | TenantID | CertPath |
---|---|---|---|---|---|---|---|---|
172.31.0.10 | node0 | Node0-eth1 | node1 | Node1-eth1 | MyRG | d5b7dac1-718f-448b-8e11-4a8cca6d9004 | 8ff7ddfd-fbcb-4700-ae52-6d071ac8d1b4 | /root/examplecert.pem |
172.31.0.11 | node0 | Node0-eth1 | node1 | Node1-eth1 | MyRG | d5b7dac1-718f-448b-8e11-4a8cca6d9004 | 8ff7ddfd-fbcb-4700-ae52-6d071ac8d1b4 | /root/examplecert.pem |
172.31.0.10 node0 Node0-eth1 node1 Node1-eth1 MyRG d5b7dac1-718f-448b-8e11-4a8cca6d9004 8ff7ddfd-fbcb-4700-ae52-6d071ac8d1b4 /root/examplecert.pem 172.31.0.11 node0 Node0-eth1 node1 Node1-eth1 MyRG d5b7dac1-718f-448b-8e11-4a8cca6d9004 8ff7ddfd-fbcb-4700-ae52-6d071ac8d1b4 /root/examplecert.pem
Note
Separated by a space.
For CFName1 and CFName2, enter each CF node name of the operational system and the standby system. There are no restrictions on the order in which they are listed.
Specify TakeoverIPAddress with IPv4 addresses, not host names.
The contents of the definition file of the operational system and the standby system should be identical.
If the definition file is not correct, or if the specified IP address is already in use on the Azure, UserApplication fails to start and an error message is output to the application log. For details on the messages, refer to "PRIMECLUSTER Messages."
This section describes how to register the network takeover to the cluster application.
The resources to be registered and their uses are as follows.
Registered target | Usage |
---|---|
PreOnline script of userApplication | Add the secondary IP address to the network interface of the virtual machine on the operational system. |
Takeover network resources | In the operational system, the takeover IP address is activated. |
Register the following script in the PreOnlineScript of userApplication that registers the Takeover Network Resources.
/opt/SMAW/bin/hvazurenic
ScriptTimeout of userApplication should be greater than the following formula.
ScriptTimeout > Number of takeover IP address x ( 85 + retry interval (2seconds) ) (seconds)
Consider processing delays and perform verification. Then set the ScriptTimeout of userApplication high enough.
Note
If you change ScriptTimeout for userApplication, the following scripts change their timeout values to the same value.
PreOnlineScript
PostOnlineScript
PreOfflineScript
PostOfflineScript
OfflineDoneScript
FaultScript
To set up the takeover network resources, refer to "6.7.3.6 Setting Up Takeover Network Resources" in "PRIMECLUSTER Installation and Administration Guide."
For the definition of the monitoring destination host in the presetting of this setting and the definition of the cluster configuration file, do as follows.
Defining the monitoring destination host
In an Azure environment, the virtual network gateway does not respond to Ping.
For this reason, network monitoring using ICMP cannot be used.
Note
The following steps are required to set up the takeover network resources.
Set VIRTUAL (default value) for the BASE attribute and the VIRTUAL attribute of the takeover network resources.
Set the primary IP address of the network interface that activates the takeover IP address as the static IPv4 address.
For how to change the IP address of the Azure network interface, refer to the official Azure documentation.
Execute the following command on all nodes and make sure that the information described in the definition file (/usr/opt/reliant/etc/hvazurenicconfig) is correctly described to control the device of Azure.
# /opt/SMAW/bin/hvazurechkconf
If there are no problems with the contents of the definition file, the display is as follows.
Example) The definition file is hvazurenicconfig
# /opt/SMAW/bin/hvazurechkconf NOTICE: Check completed successfully. file=/usr/opt/reliant/etc/hvazurenicconfig
If there is a problem with the contents of the definition file, the setting value that must be checked is output. Follow the displayed message to take an action.
For details on the hvazurechkconf (8) command messages, refer to "PRIMECLUSTER Messages."