0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ProxmoxVE】偶数ノードクラスタでのauto_tie_breaker検証

Last updated at Posted at 2024-08-26

ProxmoxVEで4ノード構成とした場合に半分の2ノードまで故障を許容させる方法の1つとして、auto_tie_breakerを設定した場合のノード障害発生時の動作について検証した。

設定ファイル:/etc/pve/corosync.conf
auto_tie_breakerについて:RedHat Documentation - クォーラムオプションの設定

結果と結論

4ノード構成でauto_tie_breakerを設定した場合、以下のような動作となった。

  • 最小ノードIDを持つノード(検証した環境ではノードID 1)が稼働している場合、2ノードで稼働を継続
  • 最小ノードIDを持つノードが停止している場合、2ノードでクラスタ停止(Activity Blocked)

結論として、auto_tie_breakerはスプリットブレイン対策としては一応機能したと言えなくもないが、4ノード構成で2ノード障害まで許容するという観点では不完全であった。
スプリットブレイン対策としても、特定のノード(最小IDのノードもしくはauto_tie_breaker_nodeで指定したノード)に依存してしまうため、使用には十分な検討が必要そうである。

また、今回は1台ずつノードを停止したが、2ノードが同時に故障した場合も同じ動作になると思われる。

なお、auto_tie_breaker_node設定について、複数指定ができそうな記述を見つけたので試してみたが、カンマ区切りでは一番左の1ノードのみで設定が有効となり、スペース区切りでは「pvecm status」コマンドにて設定ファイル不正が検出される結果となった。

検証環境

1台のPC内にProxmoxVE4台と、共有ストレージ用のTrueNAS等を構築。
ProxmoxのバージョンはProxmoxVE 8.2-1を使用している。
PVE検証イメージ図.png

auto_tie_breaker設定は/etc/pve/corosync.confのquorumブロックを以下のように記述。

quorum {
  provider: corosync_votequorum
  auto_tie_breaker: 1
}
/etc/pve/corosync.conf全量
root@pve101:~# cat /etc/pve/corosync.conf 
logging {
  debug: off
  to_syslog: yes
}

nodelist {
  node {
    name: pve101
    nodeid: 1
    quorum_votes: 1
    ring0_addr: 192.168.100.211
  }
  node {
    name: pve102
    nodeid: 2
    quorum_votes: 1
    ring0_addr: 192.168.100.212
  }
  node {
    name: pve103
    nodeid: 3
    quorum_votes: 1
    ring0_addr: 192.168.100.213
  }
  node {
    name: pve104
    nodeid: 4
    quorum_votes: 1
    ring0_addr: 192.168.100.214
  }
}

quorum {
  provider: corosync_votequorum
  auto_tie_breaker: 1
}

totem {
  cluster_name: pve-cluster
  config_version: 4
  interface {
    linknumber: 0
  }
  ip_version: ipv4-6
  link_mode: passive
  secauth: on
  version: 2
}

root@pve101:~#

4ノードすべて稼働している状態のpvecm status実行結果。

Votequorum information
----------------------
Expected votes:   4
Highest expected: 4
Total votes:      4
Quorum:           3  
Flags:            Quorate AutoTieBreaker 

Membership information
----------------------
    Nodeid      Votes Name
0x00000001          1 192.168.100.211 (local)
0x00000002          1 192.168.100.212
0x00000003          1 192.168.100.213
0x00000004          1 192.168.100.214

【検証1】ノード4・3を停止

ノード4、ノード3と順に停止した後のpvecm status。
Quoram 3に対してTotal votes 2となっているが停止(Activity blocked)とならず、稼働を継続した。

Votequorum information
----------------------
Expected votes:   4
Highest expected: 4
Total votes:      2
Quorum:           3  
Flags:            Quorate AutoTieBreaker 

Membership information
----------------------
    Nodeid      Votes Name
0x00000001          1 192.168.100.211 (local)
0x00000002          1 192.168.100.212

【検証2】ノード1・2を停止

ノード1のみ停止した場合のpvecm status。
Quoram 2に対してTotal votes 3のためクラスタは継続稼働。

Votequorum information
----------------------
Expected votes:   4
Highest expected: 4
Total votes:      3
Quorum:           3  
Flags:            Quorate AutoTieBreaker 

Membership information
----------------------
    Nodeid      Votes Name
0x00000002          1 192.168.100.212
0x00000003          1 192.168.100.213 (local)
0x00000004          1 192.168.100.214

ノード1停止後、ノード2も停止した際のpvecm status。
ノード3・4停止時と異なり、クラスタは停止(Activity blocked)となった。

Votequorum information
----------------------
Expected votes:   4
Highest expected: 4
Total votes:      2
Quorum:           3 Activity blocked
Flags:            AutoTieBreaker 

Membership information
----------------------
    Nodeid      Votes Name
0x00000003          1 192.168.100.213 (local)
0x00000004          1 192.168.100.214

auto_tie_breaker_nodeについて

auto_tie_breaker_nodeを指定した場合も、ノードは異なるが動作としては上記と同じであったため、結果は割愛する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?