HA-Cluster/corosync/pacemaker: サービス IP/サービス IP が切り替えられていないアクティブ - アクティブクラスタ

HA-Cluster/corosync/pacemaker: サービス IP/サービス IP が切り替えられていないアクティブ - アクティブクラスタ

サービスが失敗した場合にServiceIPを移行するようにcrmを設定する方法は?

node 1: web01a \
    attributes standby=off
node 2: web01b \
    attributes standby=off
primitive Apache2 systemd:apache2 \
    operations $id=Apache2-operations \
    op start interval=0 timeout=100 \
    op stop interval=0 timeout=100 \
    op monitor interval=15 timeout=100 start-delay=15 \
    meta
primitive PHP-FPM systemd:php7.4-fpm \
    operations $id=PHP-FPM-operations \
    op start interval=0 timeout=100 \
    op stop interval=0 timeout=100 \
    op monitor interval=15 timeout=100 start-delay=15 \
    meta
primitive Redis systemd:redis-server \
    operations $id=Redis-operations \
    op start interval=0 timeout=100 \
    op stop interval=0 timeout=100 \
    op monitor interval=15 timeout=100 start-delay=15 \
    meta
primitive ServiceIP IPaddr2 \
    params ip=1.2.3.4 \
    operations $id=ServiceIP-operations \
    op monitor interval=10 timeout=20 start-delay=0 \
    op_params migration-threshold=1 \
    meta
primitive lsyncd systemd:lsyncd \
    op start interval=0 timeout=100 \
    op stop interval=0 timeout=100 \
    op monitor interval=15 timeout=100 start-delay=15 \
    meta target-role=Started
group ActiveNode ServiceIP lsyncd
group WebServer Apache2 PHP-FPM Redis
clone cl_WS WebServer \
    meta clone-max=2 notify=true interleave=true
colocation col_cl_WS_ActiveNode 100: cl_WS ActiveNode
property cib-bootstrap-options: \
    have-watchdog=false \
    dc-version=2.0.3-4b1f869f0f \
    cluster-infrastructure=corosync \
    cluster-name=debian \
    stonith-enabled=false \
    no-quorum-policy=ignore \
    startup-fencing=false \
    maintenance-mode=false \
    last-lrm-refresh=1622628525 \
    start-failure-is-fatal=true

これらのサービスは常に開始する必要があります。

  • Apache 2
  • PHP-FPM
  • レディス

これらのサービスのいずれかが実行されていない場合、ノードは異常です。これサービスIPそして同期通常のノードに切り替える必要があります。

apache2 プロセスを終了すると、IP は切り替えられません。

ベストアンサー1

おすすめ記事