Red Hat Training

A Red Hat training course is available for RHEL 8

2.14. ロードバランサーリソースエージェントの設定

ヘルスプローブを作成したら、ロードバランサー リソースエージェントを設定する必要があります。このリソースエージェントは、Azure ロードバランサーからヘルスプローブ要求に応答し、要求に応答しないクラスターノードを削除するサービスを実行します。

手順

  1. 全ノードに nmap-ncat リソースエージェントをインストールします。

    # yum install nmap-ncat resource-agents

    単一ノードで以下の手順を実行します。

  2. pcs リソースおよびグループを作成します。IPaddr2 アドレスにロードバランサーの FrontendIP を使用します。

    # pcs resource create resource-name IPaddr2 ip="10.0.0.7" --group cluster-resources-group
  3. ロードバランサー リソースエージェントを設定します。

    # pcs resource create resource-loadbalancer-name azure-lb port=port-number --group cluster-resources-group

検証

  • pcs status を実行して結果を表示します。

    [root@node01 clouduser]# pcs status

    出力例:

    Cluster name: clusterfence01
    Stack: corosync
    Current DC: node02 (version 1.1.16-12.el7_4.7-94ff4df) - partition with quorum
    Last updated: Tue Jan 30 12:42:35 2018
    Last change: Tue Jan 30 12:26:42 2018 by root via cibadmin on node01
    
    3 nodes configured
    3 resources configured
    
    Online: [ node01 node02 node03 ]
    
    Full list of resources:
    
    clusterfence (stonith:fence_azure_arm):      Started node01
    Resource Group: g_azure
        vip_azure  (ocf::heartbeat:IPaddr2):       Started node02
        lb_azure   (ocf::heartbeat:azure-lb):      Started node02
    
    Daemon Status:
      corosync: active/disabled
      pacemaker: active/disabled
      pcsd: active/enabled