ClusterLabs/pacemaker — pull request #481 by inouekazu (2014-03-31 09:40:50+00:00)
Title: Fix: crmd: make node_state erase correctly

This patch fixes the issue on which __guest02__ of "UNCLEAN (offline)" state is not set to OFFLINE by 'stonith_admin -C __GUEST02__'.

* (1) STONITH failed
```
$ cat /var/log/ha-log
Mar 31 14:52:03 guest01 crmd[29181]: notice: too_many_st_failures: Too many failures to fence guest02 (11), giving up
```
* (2) I stopped guest02, and performed stonith_admin.
```
$ crm_mon

Node guest02 (3232261520): UNCLEAN (offline)
Online: [ guest01 ]

```
```
$ stonith_admin -C GUEST02 ; echo $?
0

$ cat /var/log/ha-log
Mar 31 14:52:46 guest01 crmd[22906]: info: erase_status_tag: Deleting xpath: //node_state[@uname='GUEST02']/lrm
Mar 31 14:52:46 guest01 crmd[22906]: info: erase_status_tag: Deleting xpath: //node_state[@uname='GUEST02']/transient_attributes
```
* However, since crmd tried to erase "//node_state[@uname='__GUEST02__']" (xpath) at this time, node_state of __guest02__ remains.
```
$ cibadmin -Q

```