1

I have a Pacemaker setup with two STONITH resources. They have location constraints that crm configure show lists as follows:

location loc_stonith_node1 stonith_node1 rule -inf: #id eq node1
location loc_stonith_node2 stonith_node2 rule -inf: #id eq node2

Yet crm status indicates that both resources are started on node2:

stonith_node1   (stonith:external/ipmi):    Started node2
stonith_node2   (stonith:external/ipmi):    Started node2

This situation even persists if I crm resource stop and then crm resource start both resources. What could explain that the location constraints are apparently not obeyed?

UPDATE If I crm resource migrate stonith_node2 node1, the resource starts on node1, but if I then crm resource unmigrate stonith_node2 it immediately bounces back to node2.

rookie09
  • 623
  • 1
  • 6
  • 17
  • Please add the complete config, omit sensitive details, if needed. – gxx Oct 10 '17 at 14:41
  • 1
    @gf_ I guess by now the problem is that [`#id`](https://github.com/ClusterLabs/pacemaker/blob/master/xml/crm.dtd) refers to node ids such as `1`, whereas `#uname` refers to node names (host names) such as `node1`. I'll try whether switching to `#uname` makes a difference and will then report back. – rookie09 Oct 10 '17 at 14:48

1 Answers1

1

I've overcome the problem by switching to another syntactic form for the location contraints that requires neither references to #id nor #uname:

location loc_stonith_node1 stonith_node1 -inf: node1
location loc_stonith_node2 stonith_node2 -inf: node2
rookie09
  • 623
  • 1
  • 6
  • 17