[ClusterLabs] Unable to perform resource failover.

Garima garima at nectechnologies.in
Tue Nov 7 05:30:59 EST 2017

Hi All,

I am new in pacemaker corosync.

I have created a simple environment with 2 nodes(Active/Passive) having 2 resources.
One resource is added on VIP.
Other resource is added as Httpd apache service.

[root at node1 ~]# pcs resource show Httpd
Resource: Httpd (class=ocf provider=heartbeat type=apache)
  Attributes: configfile=/etc/httpd/conf/httpd.conf
  Operations: monitor interval=30s (Httpd-monitor-interval-30s)
              start interval=0s timeout=40s (Httpd-start-interval-0s)
              stop interval=0s timeout=60s (Httpd-stop-interval-0s)
[root at node1 ~]# pcs resource show Cluster_VIP
Resource: Cluster_VIP (class=ocf provider=heartbeat type=IPaddr2)
  Attributes: cidr_netmask=32 ip=
  Operations: monitor interval=20s (Cluster_VIP-monitor-interval-20s)
              start interval=0s timeout=20s (Cluster_VIP-start-interval-0s)
              stop interval=0s timeout=20s (Cluster_VIP-stop-interval-0s)

[root at node1 ~]# pcs status
Cluster name: Cluster
Stack: corosync
Current DC: node2 (version 1.1.16-12.el7_4.4-94ff4df) - partition with quorum
Last updated: Tue Nov  7 15:09:40 2017
Last change: Tue Nov  7 15:03:22 2017 by root via cibadmin on node1
2 nodes configured
2 resources configured
Online: [ node1 node2 ]
Full list of resources:
Cluster_VIP    (ocf::heartbeat:IPaddr2):       Started node1
Httpd  (ocf::heartbeat:apache):        Started node1
Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

To check and kill  process ID(pid) of httpd by using command:

*         ps -aef | grep httpd

[root at node1 ~]# ps -aef | grep httpd
root      4392     1  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid
apache    4393  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid
apache    4394  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid
apache    4395  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid
apache    4396  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid
apache    4397  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid

[root at node1 ~]# kill -9 4392

I am trying to do resource failover by killing pid of httpd.
I observed that resource failover is not happing after killing the pid. Status of resource(Httpd) remain started on node1.
We don't want to use resource move "pcs resource move Httpd" and resource disable"pcs resource disable httpd" command for this.

What is the issue in our approach ?
How we can achieve a resources failover?

Further I will use this environment for testing the migration-threshold.
Any suggestions regarding this also welcome.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20171107/ecf4a04e/attachment-0002.html>

More information about the Users mailing list