Corosync と Pacemaker を使用した nginx の高可用性

Corosync と Pacemaker を使用した nginx の高可用性

corosync と pacemaker を使用してフェイルオーバーで nginx を構成しました。

フェイルオーバーのテストまではすべて次のようになりました:

仮想 IP は他のホストに送信されますが、リソース リバース プロキシは起動に失敗します。デバッグ開始を実行すると、すべて正常に動作します。

私の設定をご覧ください:

# crm_verify -VL
error: unpack_rsc_op: Preventing reverseproxy from re-starting anywhere: operation start failed 'not configured' (6)

# pcs status
Cluster name: cluster_reverse
Last updated: Fri Oct 9 13:43:15 2015 Last change: Fri Oct 9 10:37:56 2015 by root via crm_resource on reverse1.domain.de
Stack: corosync
Current DC: reverse2.domain.de (version 1.1.13-a14efad) - partition with quorum
2 nodes and 2 resources configured
Online: [ reverse1.domain.de reverse2.domain.de ]
Full list of resources:
virtual_ip (ocf::heartbeat:IPaddr2): Started reverse1.domain.de
reverseproxy (ocf::heartbeat:nginx): Stopped
Failed Actions:
* reverseproxy_start_0 on reverse1.domain.de 'not configured' (6): call=13,   status=complete, exitreason='none',
last-rc-change='Fri Oct 9 12:31:41 2015', queued=0ms, exec=102ms

PCSD Status:
reverse1.domain.de: Online
reverse2.domain.de: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled

# pcs resource show reverseproxy
Resource: reverseproxy (class=ocf provider=heartbeat type=nginx)
Attributes: configfile=/etc/nginx/nginx.conf status10url=http://127.0.0.1
Operations: start interval=0s timeout=40s (reverseproxy-start-timeout-40s)
stop interval=0s timeout=60s (reverseproxy-stop-timeout-60s)
monitor interval=1min (reverseproxy-monitor-interval-1min)

エラーは確認できますが、解決方法がわかりません。

何かアイデアがあればぜひ教えてください。

前もって感謝します

編集: 完全な設定は次のとおりです:

こんにちは、問題ありません:

# pcs config

Cluster Name: cluster_reverse
Corosync Nodes:
reverse1.domain.de reverse2.domain.de
Pacemaker Nodes:
reverse1.domain.de reverse2.domain.de
Resources:
Resource: virtual_ip (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=194.15.215.49 cidr_netmask=32
Operations: start interval=0s timeout=20s (virtual_ip-start-timeout-20s)
stop interval=0s timeout=20s (virtual_ip-stop-timeout-20s)
monitor interval=30s (virtual_ip-monitor-interval-30s)
Resource: reverseproxy (class=ocf provider=heartbeat type=nginx)
Attributes: configfile=/etc/nginx/nginx.conf status10url=http://127.0.0.1
Operations: start interval=0s timeout=40s (reverseproxy-start-timeout-40s)
stop interval=0s timeout=60s (reverseproxy-stop-timeout-60s)
monitor interval=1min (reverseproxy-monitor-interval-1min)
Stonith Devices:
Fencing Levels:
Location Constraints:
Resource: reverseproxy
Enabled on: reverse1.domain.de (score:50) (id:location-reverseproxy-reverse1.domain.de-50)
Ordering Constraints:
start virtual_ip then start reverseproxy (kind:Mandatory) (id:order-virtual_ip-reverseproxy-mandatory)
Colocation Constraints:
reverseproxy with virtual_ip (score:INFINITY) (id:colocation-reverseproxy-virtual_ip-INFINITY)
Cluster Properties:
cluster-infrastructure: corosync
cluster-name: cluster_reverse
dc-version: 1.1.13-a14efad
have-watchdog: false
no-quorum-policy: ignore
stonith-enabled: false`

関連情報