Top
PRIMECLUSTER Installation and Administration Guide4.7 Cloud Services

27.9.1 Building the Cluster Application for Network Takeover

This section describes how to create the definition file and build the cluster application for network takeover.

27.9.1.1 Creating the Definition File

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."

27.9.1.2 Building the Cluster Application

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.

Note

In an Azure environment, a virtual machine may pause for up to 30 seconds for maintenance without notice, causing a resource failure.

To prevent a resource failure during maintenance without notification, set the following parameters by adding 30 seconds to the calculated timeout period.

  • ScriptTimeout for userApplication

  • CheckCommandTimeouts for the Cmdline resource

  • Timeout on takeover network resources

27.9.1.2.1 Setting PreOnline scripts for Network Takeover with Secondary IP address change

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

27.9.1.2.2 Setting up the Takeover Network Resources
Static physical IP addresses

Perform the following steps on all nodes to ensure that the physical IP addresses of all network interfaces for which you want to configure a Takeover IP address are persistent.

  1. Determine the connection profile name (NAME) for the network interface (DEVICE) for which you want to set the Takeover IP address by executing the following command.

    # nmcli connection show

    Example: Result displayed when the command is executed

    # nmcli connection show
    NAME UUID TYPE DEVICE ens256 9f45e94f-1726-dd68-8a33-8022f72b550f ethernet ens256 ens192 03da7500-2101-c722-2438-d0d006c28c73 ethernet ens192 cip0 c24ca981-b8d6-487f-89ba-e73c58da349d ethernet cip0 :
  2. Execute the following command to check the ipv4.method value of the connection profile name that you saw in 1.

    # nmcli connection show <connection profile name>

    If the ipv4.method value is not manual, record the following values and perform the steps from 3.

    • IP4.ADDRESS,IP4.GATEWAY,IP4.DNS

    If the ipv4.method value is manual, no further steps are required.

    Example: The connection profile name is ens192

    # nmcli connection show ens192
    connection.id:                   ens192
    connection.uuid:                 03da7500-2101-c722-2438-d0d006c28c73
      :
    ipv4.method:                     auto
      :
    GENERAL.MASTER-PATH:             --
    IP4.ADDRESS[1]:                  172.31.0.10/24
    IP4.GATEWAY:                     172.31.0.1
    IP4.ROUTE[1]:                    dst = 172.31.0.0/24, nh = 0.0.0.0, mt = 100
    IP4.DNS[1]:                      172.31.0.2
  3. Execute the following command to set the value of IP4.ADDRESS as a fixed value from 2.

    # nmcli connection modify <connection profile name> ipv4.addresses <IP4.ADDRESS>
    # nmcli connection modify <connection profile name> ipv4.method manual

    Example: The connection profile name is ens 192 and the IP4.ADDRESS value is 172.31.0.10/24

    # nmcli connection modify ens192 ipv4.addresses 172.31.0.10/24
    # nmcli connection modify ens192 ipv4.method manual
  4. Execute the following command to set the IP4.GATEWAY, IP4.DNS values from 2 and activate the connection profile name.

    # nmcli connection modify <connection profile name> ipv4.gateway <IP4.GATEWAY>
    # nmcli connection modify <connection profile name> ipv4.dns <IP4.DNS>
    # nmcli connection up <connection profile name>

    Example: The connection profile name is ens192, the IP4.GATEWAY value is 172.31.0.1, and the IP4.DNS value is 172.31.0.2

    # nmcli connection modify ens192 ipv4.gateway 172.31.0.1
    # nmcli connection modify ens192 ipv4.dns 172.31.0.2
    # nmcli connection up ens192
  5. Execute the following command and verify that the values for ipv4.addresses, ipv4.method, ipv4.gateway, ipv4.dns appear as configured in 3.4.

    # nmcli connection show <connection profile name>

    Example: The connection profile name is ens192

    # nmcli connection show ens192
    connection.id:                   ens192
    connection.uuid:                 03da7500-2101-c722-2438-d0d006c28c73
      :
    ipv4.method:                     manual
    ipv4.dns:                        172.31.0.2
    ipv4.dns-search:                 --
      :
    ipv4.addresses:                  172.31.0.10/24
    ipv4.gateway:                    172.31.0.1
Setting Takeover Network Resources Used for the Network Takeover by the Virtual Router

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.

27.9.1.3 Checking the Network Takeover Settings

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."