목차

fencing history cleanup

pacemaker 상태를 확인해 보면 아래와 같이 fencing action log가 찍혀있는경우가 있다.

# pcs status 
Cluster name: my_cluster
Stack: corosync
Current DC: rhel-8-0-1 (version 2.0.1-3.el8-0eb7991564) - partition with quorum
Last updated: Wed Feb  6 18:30:11 2019
Last change: Wed Feb  6 18:22:22 2019 by root via cibadmin on rhel-8-0-1

...

Failed Fencing Actions:
* reboot of rhel-8-0-2 failed: delegate=rhel-8-0-1, client=stonith_admin.1697, origin=rhel-8-0-2,
    last-failed='Wed Feb  6 18:22:35 2019'

...

장애나 여타 원인으로 인해 펜싱동작이 수행된경우 위와 같은 로그가 찍혀있는데 장애로그와는 달리 cleanup해주지 않아도 클러스터 동작에는 아무런 영향이 없다.
그럼에도 불구하고 해당 내용을 없애고 싶은경우 아래와 같이 처리해줄수 있다.

로그 조회

# stonith_admin --verbose --history "*"
stonith_admin at node1 wishes to reboot node node1 - 1 0
stonith_admin at node1 wishes to reboot node node2 - 1 0

pcs stonith history [show [<node>]] 명령어로 로그 조회 할 수 있다.

[root@rhel-8-0-1 ~]# pcs stonith history
rhel-8-0-1 was able to reboot node rhel-8-0-2 on behalf of stonith_admin.12657 from rhel-8-0-1 at Wed Feb  6 18:19:09 2019

We failed to reboot node rhel-8-0-1 on behalf of stonith_admin.2369 from rhel-8-0-2 at Wed Feb  6 18:59:53 2019

rhel-8-0-1 was able to reboot node rhel-8-0-2 on behalf of stonith_admin.6667 from rhel-8-0-2 at Wed Feb  6 18:20:11 2019

rhel-8-0-1 failed to reboot node rhel-8-0-2 on behalf of stonith_admin.1697 from rhel-8-0-2 at Wed Feb  6 18:22:35 2019

[root@rhel-8-0-1 ~]# pcs stonith history show rhel-8-0-2
rhel-8-0-1 was able to reboot node rhel-8-0-2 on behalf of stonith_admin.12657 from rhel-8-0-1 at Wed Feb  6 18:19:09 2019

rhel-8-0-1 was able to reboot node rhel-8-0-2 on behalf of stonith_admin.6667 from rhel-8-0-2 at Wed Feb  6 18:20:11 2019

rhel-8-0-1 failed to reboot node rhel-8-0-2 on behalf of stonith_admin.1697 from rhel-8-0-2 at Wed Feb  6 18:22:35 2019

로그 삭제

# stonith_admin --cleanup --history "*"
cleaning up fencing-history for node *

pcs stonith history cleanup [<node>] 명령어로 로그 삭제 가능하다.

[root@rhel-8-0-1 ~]# pcs stonith history cleanup rhel-8-0-2
cleaning up fencing-history for node rhel-8-0-2

[root@rhel-8-0-1 ~]# pcs stonith history
We failed to reboot node rhel-8-0-1 on behalf of stonith_admin.2369 from rhel-8-0-2 at Wed Feb  6 18:59:53 2019

[root@rhel-8-0-1 ~]# pcs stonith history cleanup 
cleaning up fencing-history for node *

[root@rhel-8-0-1 ~]# pcs stonith history

참조링크