前提・実現したいこと
AWSを利用してMulti-AZのHA構成でサーバを構築しています。
利用しているクラスターソフトはPacemekarとcorosyncです。
VIPの設定を実施したところ上手く動作しません。
また、Pacemekar設定時からですがpcs statusで確認したところ自身のサーバのみOnlineになり、
対象のサーバがOfflineになったままになります。
下記の内容を参考に実施しております。
https://qiita.com/kenzo0107/items/851c002b6ea62f9a07c4
OS:Red Hat Enterprise Linux 8 with High Availability
AWSの設定は上記URLの内容とほとんど変更なし
発生している問題・エラーメッセージ
#pcs status node[server01]
Pacemaker Nodes:
Online:ip-10-10-10-1.ap-northeast-1.compute.internal
Standby:
Standby with resource(s) running:
Maintenance:
Offline:ip-10-10-10-2.ap-northeast-1.compute.internal
#pcs status node[server02]
Pacemaker Nodes:
Online:ip-10-10-10-2.ap-northeast-1.compute.internal
Standby:
Standby with resource(s) running:
Maintenance:
Offline:ip-10-10-10-1.ap-northeast-1.compute.internal
#pcs config[server01]
Cluster Name: aws-cluster
Corosync Nodes:
ip-10-10-10-1.ap-northeast-1.compute.internal ip-10-10-10-2.ap-northeast-1.compute.internal
Pacemaker Nodes:
ip-10-10-10-1.ap-northeast-1.compute.internal ip-10-10-10-2.ap-northeast-1.compute.internal
Resources:
Resource: eip (class=ocf provider=heartbeat type=eip)
Attributes: elastic_ip=1.1.1.1←例
Operations: start interval=0s timeout=60s on-fail=stop (eip-start-interval-0s)
monitor interval=10s timeout=60s on-fail=restart (eip-monitor-interval-10s)
stop interval=0s timeout=60s on-fail=block (eip-stop-interval-0s)
Stonith Devices:
Fencing Levels:
Location Constraints:
Ordering Constraints:
Colocation Constraints:
Resources Defaults:
resource-stickiness: INFINITY
migration-threshold: 1
Operations Defaults:
No defaults set
Cluster Properties:
cluster-infrastructure: corosync
cluster-name: aws-cluster
transition-delay: 0s
dc-version: 1.1.13-10.el7-44eb2dd
have-watchdog: false
no-quorum-policy: ignore
stonith-enabled: false
#pcs config[server02]
Cluster Name: aws-cluster
Corosync Nodes:
ip-10-10-10-2.ap-northeast-1.compute.internal ip-10-10-10-1.ap-northeast-1.compute.internal
Pacemaker Nodes:
ip-10-10-10-2.ap-northeast-1.compute.internal ip-10-10-10-1.ap-northeast-1.compute.internal
Resources:
Stonith Devices:
Fencing Levels:
Location Constraints:
Ordering Constraints:
Colocation Constraints:
Ticket Constraints:
Alerts:
No alerts defined
Resources Defaults:
No defaults set
Operations Defaults:
No defaults set
Cluster Properties:
cluster-infrastructure: corosync
cluster-name: aws-cluster
dc-version: 2.0.5-9.el8_4.1-ba59be7122
have-watchdog: false
Tags:
No tags defined
Quorum:
Options:
#pcs status[server01]
Cluster name: aws-cluster
Cluster Summary:
* Stack: corosync
* Current DC: ip-10-10-10-1.ap-northeast-1.compute.internal (version 2.0.5-9.el8_4.1-ba59be7122) - partition WITHOUT quorum
*Last updated: Fri Jun 4 14:20:06 2021
* Last change: Fri Jun 4 09:46:23 2021 by root via cibadmin on ip-10-10-10-1.ap-northeast-1.compute.internal
*2 nodes configured
*1 resource instance configured
Node List:
*Online: [ ip-10-10-10-1.ap-northeast-1.compute.internal ]
*OFFLINE: [ ip-10-10-10-2.ap-northeast-1.compute.internal ]
Full List of Resources:
*eip (ocf:💓eip): Stopped
Failed Resource Actions:
*eip_start_0 on ip-10-10-10-1.ap-northeast-1.compute.internal 'error' (1): call=6, status='complete', exitreason='', last-rc-change='2021-06-04 09:32:25 +09:00', queued=0ms, exec=12ms
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
#pcs status[server02]
Cluster name: aws-cluster
WARNINGS:
No stonith devices and stonith-enabled is not false
Cluster Summary:
* Stack: corosync
* Current DC: ip-10-10-10-2.ap-northeast-1.compute.internal (version 2.0.5-9.el8_4.1-ba59be7122) - partition WITHOUT quorum
* Last updated: Fri Jun 4 14:28:01 2021
* Last change: Fri Jun 4 09:29:47 2021 by hacluster via crmd on ip-10-10-10-2.ap-northeast-1.compute.internal
* 2 nodes configured
* 0 resource instances configured
Node List:
* Node ip-10-10-10-1.ap-northeast-1.compute.internal: UNCLEAN (offline)
* Online: [ ip-10-10-10-2.ap-northeast-1.compute.internal ]
Full List of Resources:
* No resources
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
corosync.conf
totem {
version: 2
transport:udpu
}
nodelist {
node {
ring0_addr: 10.10.10.1
name: ip-10-10-10-1.ap-northeast-1.compute.internal
nodeid: 1
}
node {
ring0_addr: 10.10.10.2
name: ip-10-10-10-2.ap-northeast-1.compute.internal
nodeid: 2
}
}
quorum {
provider: corosync_votequorum
two_node: 2
}
logging {
to_logfile: yes
logfile: /var/log/cluster/corosync.log
timestamp: on
}
#Online後のpcs status [server01]
Cluster name: aws-cluster
Cluster Summary:
- Stack: corosync
- Current DC: ip-10-10-10-1.ap-northeast-1.compute.internal (version 2.0.5-9.el8_4.1-ba59be7122) - partition with quorum
- Last updated: Mon Jun 7 03:39:48 2021
- Last change: Mon Jun 7 03:23:05 2021 by root via cibadmin on ip-10-10-10-2.ap-northeast-1.compute.internal
- 2 nodes configured
- 1 resource instance configured
Node List:
- Online: [ ip-10-10-10-1.ap-northeast-1.compute.internal ip-10-10-10-2.ap-northeast-1.compute.internal ]
Full List of Resources:
- eip (ocf:💓eip): Stopped
Failed Resource Actions:
- eip_start_0 on ip-10-10-10-2.ap-northeast-1.compute.internal 'error' (1): call=244, status='complete', exitreason='', last-rc-change='2021-06-07 03:10:06 +09:00', queued=0ms, exec=14ms
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled