什么配置错误?
What configure fault?
我们有一个集群,有两个节点和两个资源,elastic-ip 和 nginx,当我们 运行 crm_verify -LV
error: unpack_operation: Specifying on_fail=fence and stonith-enabled=false makes no sense
error: unpack_operation: Specifying on_fail=fence and stonith-enabled=false makes no sense
Errors found during check: config not valid
root@ip-172-31-18-143:~#
配置:
Cluster Name: hacluster
Corosync Nodes:
ip-172-31-18-143 ip-172-31-27-85
Pacemaker Nodes:
ip-172-31-18-143 ip-172-31-27-85
Resources:
Resource: elastic-ip (class=ocf provider=heartbeat type=awseip)
Attributes: elastic_ip=***[MY_IP]*** allocation_id=" eipalloc-0xxxxxxxxxx" awscli=/usr/local/bin/aws
Meta Attrs: migration-threshold=3 failure-timeout=60s
Operations: start interval=0s timeout=10s on-fail=restart (elastic-ip-start-interval-0s)
monitor interval=10s timeout=10s on-fail=restart (elastic-ip-monitor-interval-10s)
stop interval=0s on-fail=fence (elastic-ip-stop-interval-0s)
Resource: proxy (class=ocf provider=heartbeat type=nginx)
Attributes: configfile=/data_proxy/nginx/nginx.conf
Meta Attrs: failure-timeout=60s
Operations: start interval=0s timeout=40s (proxy-start-interval-0s)
stop interval=0s on-fail=fence (proxy-stop-interval-0s)
monitor interval=5s timeout=5s (proxy-monitor-interval-5s)
Stonith Devices:
Fencing Levels:
Location Constraints:
Resource: proxy
Enabled on: ip-172-31-18-143 (score:50) (id:location-proxy-ip-172-31-18-143-50)
Ordering Constraints:
start elastic-ip then start proxy (kind:Mandatory) (id:order-elastic-ip-proxy-mandatory)
Colocation Constraints:
proxy with elastic-ip (score:INFINITY) (id:colocation-proxy-elastic-ip-INFINITY)
Resources Defaults:
migration-threshold: 2
Operations Defaults:
No defaults set
Cluster Properties:
cluster-infrastructure: corosync
cluster-name: debian
cluster-recheck-interval: 2min
dc-version: 1.1.14-70404b0
have-watchdog: false
no-quorum-policy: ignore
start-failure-is-fatal: true
stonith-action: poweroff
stonith-enabled: false
Traceback (most recent call last):
File "/usr/sbin/pcs", line 231, in <module>
main(sys.argv[1:])
File "/usr/sbin/pcs", line 171, in main
cmd_map[command](argv)
File "/usr/lib/python2.7/dist-packages/pcs/config.py", line 49, in config_cmd
config_show(argv)
File "/usr/lib/python2.7/dist-packages/pcs/config.py", line 86, in config_show
cluster.cluster_uidgid([], True)
File "/usr/lib/python2.7/dist-packages/pcs/cluster.py", line 1601, in cluster_uidgid
uid_gid_files = os.listdir(settings.corosync_uidgid_dir)
OSError: [Errno 2] No such file or directory: '/etc/corosync/uidgid.d/'
root@ip-172-31-18-143:~#
有什么想法吗?
修改您的资源(elastic-ip 和代理)并删除属性 on_fail=fence ,或启用 Stonith 作为集群 属性 并配置防护。
基本上,您是在指示资源在节点出现故障时对其进行防护,但您禁用了 Stonith,因此无法进行防护(因此没有意义)
我们有一个集群,有两个节点和两个资源,elastic-ip 和 nginx,当我们 运行 crm_verify -LV
error: unpack_operation: Specifying on_fail=fence and stonith-enabled=false makes no sense
error: unpack_operation: Specifying on_fail=fence and stonith-enabled=false makes no senseErrors found during check: config not valid
root@ip-172-31-18-143:~#
配置:
Cluster Name: hacluster
Corosync Nodes:
ip-172-31-18-143 ip-172-31-27-85
Pacemaker Nodes:
ip-172-31-18-143 ip-172-31-27-85
Resources:
Resource: elastic-ip (class=ocf provider=heartbeat type=awseip)
Attributes: elastic_ip=***[MY_IP]*** allocation_id=" eipalloc-0xxxxxxxxxx" awscli=/usr/local/bin/aws
Meta Attrs: migration-threshold=3 failure-timeout=60s
Operations: start interval=0s timeout=10s on-fail=restart (elastic-ip-start-interval-0s)
monitor interval=10s timeout=10s on-fail=restart (elastic-ip-monitor-interval-10s)
stop interval=0s on-fail=fence (elastic-ip-stop-interval-0s)
Resource: proxy (class=ocf provider=heartbeat type=nginx)
Attributes: configfile=/data_proxy/nginx/nginx.conf
Meta Attrs: failure-timeout=60s
Operations: start interval=0s timeout=40s (proxy-start-interval-0s)
stop interval=0s on-fail=fence (proxy-stop-interval-0s)
monitor interval=5s timeout=5s (proxy-monitor-interval-5s)
Stonith Devices:
Fencing Levels:
Location Constraints:
Resource: proxy
Enabled on: ip-172-31-18-143 (score:50) (id:location-proxy-ip-172-31-18-143-50)
Ordering Constraints:
start elastic-ip then start proxy (kind:Mandatory) (id:order-elastic-ip-proxy-mandatory)
Colocation Constraints:
proxy with elastic-ip (score:INFINITY) (id:colocation-proxy-elastic-ip-INFINITY)
Resources Defaults:
migration-threshold: 2
Operations Defaults:
No defaults set
Cluster Properties:
cluster-infrastructure: corosync
cluster-name: debian
cluster-recheck-interval: 2min
dc-version: 1.1.14-70404b0
have-watchdog: false
no-quorum-policy: ignore
start-failure-is-fatal: true
stonith-action: poweroff
stonith-enabled: false
Traceback (most recent call last):
File "/usr/sbin/pcs", line 231, in <module>
main(sys.argv[1:])
File "/usr/sbin/pcs", line 171, in main
cmd_map[command](argv)
File "/usr/lib/python2.7/dist-packages/pcs/config.py", line 49, in config_cmd
config_show(argv)
File "/usr/lib/python2.7/dist-packages/pcs/config.py", line 86, in config_show
cluster.cluster_uidgid([], True)
File "/usr/lib/python2.7/dist-packages/pcs/cluster.py", line 1601, in cluster_uidgid
uid_gid_files = os.listdir(settings.corosync_uidgid_dir)
OSError: [Errno 2] No such file or directory: '/etc/corosync/uidgid.d/'
root@ip-172-31-18-143:~#
有什么想法吗?
修改您的资源(elastic-ip 和代理)并删除属性 on_fail=fence ,或启用 Stonith 作为集群 属性 并配置防护。
基本上,您是在指示资源在节点出现故障时对其进行防护,但您禁用了 Stonith,因此无法进行防护(因此没有意义)