Azure CLI は、仮想マシンなどの Azure リソースを管理するため Microsoft でサポートされているコマンドラインインターフェースです。STONITHと共に使用すると、クラスターソフトウェアは、停止したように見えるクラスターノードの電源をオフにして、異常なノードが共有データにアクセスしたり破損したりしないようにします。

要件

パッケージ

Azure CLI – install Linux Azure CLI on each server in the cluster.

カスタムロール

Azure Fencing に用いる Microsoft Azure 上の仮想マシン及びユーザーに割り当てられるカスタムロールには、仮想マシンを powerOff できる権限が最低限必要です。

  • Microsoft.Compute/*/read
  • Microsoft.Compute/virtualMachines/powerOff/action
  • Microsoft.Compute/virtualMachines/start/action

事前確認

各サーバー で以下のコマンドを実行し、Microsoft Azure 上の認証が機能していることを確認してください。

# az vm show --resource-group <group name> --name <vm name>

STONITH のインストール

次のコマンドを実行して、LifeKeeper がインストールされ、すべてのサーバーへのコミュニケーションパスが構成されている 各サーバー に、LifeKeeper for Microsoft Azure STONITH スクリプトをインストールします。

# /opt/LifeKeeper/samples/STONITH/azure-stonith-install

上記コマンドは対話的に動作しますので、グループ名を入力し、表示されるクラスターノードの Microsoft Azure 上での仮想マシン名を確認してください。

コマンド出力例

STONITH script install...
Please enter the Resource Group name in Azure: rg-Group1
 
Please enter the System name in Azure[vm-HostA]:
Enable Stonith on node vm-HostA [Yes]:
s
Please enter the System name in Azure[vm-HostB]:
Enable Stonith on node vm-HostB [Yes]:
Configuration file /opt/LifeKeeper/config/stonith.conf was saved.

/opt/LifeKeeper/config/stonith.conf の更新

インストールが完了すると、仮想マシンの電源をオフにする設定が以下のファイルに追加されます。

/opt/LifeKeeper/config/stonith.conf

LifeKeeper STONITH configuration
 
Example: <host> az vm restart -g <resource group> -n <node name>
vm-HostA az vm stop -g rg-Group1 -n vm-HostA --skip-shutdown
vm-HostB az vm stop -g rg-Group1 -n vm-HostB --skip-shutdown

フィードバック

お役に立ちましたか?

はい いいえ
お役に立ちましたか
理由をお聞かせください
フィードバックありがとうございました

このトピックへフィードバック

送信