percona/percona-pacemaker-agents — pull request #32 by dotmanila (2014-10-14 10:22:35+00:00)
Title: Support for non-root SSH user, improved remote CIB query, noop commands

1. Add support for non-root SSH user when connecting to remote site to query replication info and active master.

2. For multiple master-slave resources, if a command is executed to a node that does not belong to a node group, an OCF_SUCCESS is returned. This works by adding a location rule for a primitive/master-slave resource to a node with -INFINITY score. For example I have this cluster:

```
[root@node1 ~]# crm_mon -A1
Last updated: Tue Oct 14 06:17:03 2014
Last change: Sat Oct 11 03:34:08 2014 via crm_attribute on node1
Stack: cman
Current DC: node1 - partition with quorum
Version: 1.1.10-14.el6_5.3-368c726
3 Nodes configured
9 Resources configured

Online: [ node1 node2 node3 ]

Resource Group: g-booth
booth-ip	(ocf::heartbeat:IPaddr2):	Started node2
booth	(ocf::pacemaker:booth-site):	Started node2
Master/Slave Set: ms_MySQL_users [p_mysql_users]
Masters: [ node1 ]
Slaves: [ node2 ]
Master/Slave Set: ms_MySQL_api [p_mysql_api]
Masters: [ node3 ]
users_r_vip	(ocf::heartbeat:IPaddr2):	Started node1
users_w_vip	(ocf::heartbeat:IPaddr2):	Started node1
api_r_vip	(ocf::heartbeat:IPaddr2):	Started node3
api_w_vip	(ocf::heartbeat:IPaddr2):	Started node3

Node Attributes:
* Node node1:
+ master-p_mysql_users	: 1060
+ readable	: 1
* Node node2:
+ master-p_mysql_users	: 60
+ readable	: 1
* Node node3:
+ master-p_mysql_api	: 1060
+ readable	: 1
```

And these rules:

```
location location-p_mysql_api p_mysql_api \
rule -inf: #uname eq node1
location location-p_mysql_api-1 p_mysql_api \
rule -inf: #uname eq node2
location location-p_mysql_users p_mysql_users \
rule -inf: #uname eq node3
```

When the agent issues a monitor command for node1 where the OCF_RESOURCE_INSTANCE is p_mysql_users, it will be a noop and will return an OCF_SUCCESS immediately. In the future we need to support OCF_NOT_SUPPORTED as well.

3. Merged auto-position fix by Kenny