[ClusterLabs] Why my node1 couldn't back to the clustering chain?

Ken Gaillot kgaillot at redhat.com
Thu Apr 8 10:55:47 EDT 2021


On Thu, 2021-04-08 at 14:32 +0000, Jason Long wrote:
> Why, when node1 is back, then web server still on node2? Why not
> switched?

By default, there are no preferences as to where a resource should run.
The cluster is free to move or leave resources as needed.

If you want a resource to prefer a particular node, you can use
location constraints to express that. However there is rarely a need to
do so; in most clusters, nodes are equally interchangeable.


> 
> On Thursday, April 8, 2021, 06:49:38 PM GMT+4:30, Ken Gaillot <
> kgaillot at redhat.com> wrote: 
> 
> 
> 
> 
> 
> On Thu, 2021-04-08 at 14:14 +0000, Jason Long wrote:
> 
> > Hello,
> > I stopped node1 manually as below:
> > 
> > [root at node1 ~]# pcs cluster stop node1
> > node1: Stopping Cluster (pacemaker)...
> > node1: Stopping Cluster (corosync)...
> > [root at node1 ~]#
> > [root at node1 ~]# pcs status
> > Error: error running crm_mon, is pacemaker running?
> >   Could not connect to the CIB: Transport endpoint is not connected
> >   crm_mon: Error: cluster is not available on this node
> > 
> > And after it, I checked my cluster logs: 
> > https://paste.ubuntu.com/p/9KNyt5nB79/
> > Then, I started node1:
> > 
> > [root at node1 ~]# pcs cluster start node1
> > node1: Starting Cluster...
> > [root at node1 ~]#
> > 
> > And checked my cluster logs again: 
> > https://paste.ubuntu.com/p/GQFbdhMvV3/
> > The status of my cluster is:
> > 
> > # pcs status 
> > Cluster name: mycluster
> > Cluster Summary:
> >   * Stack: corosync
> >   * Current DC: node2 (version 2.0.5-10.fc33-ba59be7122) -
> > partition
> > with quorum
> >   * Last updated: Thu Apr  8 18:33:49 2021
> >   * Last change:  Thu Apr  8 17:18:49 2021 by root via cibadmin on
> > node1
> >   * 2 nodes configured
> >   * 3 resource instances configured
> > 
> > 
> > Node List:
> >   * Online: [ node1 node2 ]
> > 
> > 
> > Full List of Resources:
> >   * Resource Group: apache:
> >     * httpd_fs    (ocf::heartbeat:Filesystem):    Started node2
> >     * httpd_vip    (ocf::heartbeat:IPaddr2):    Started node2
> >     * httpd_ser    (ocf::heartbeat:apache):    Started node2
> > 
> > 
> > Daemon Status:
> >   corosync: active/enabled
> >   pacemaker: active/enabled
> >   pcsd: active/enabled
> > 
> > But, I can't browse the Apache web server? Why?
> > 
> > Thanks.
> 
> 
> Based on the above status output, the web server is running on node2,
> using the IP address specified by the httpd_vip resource. Are you
> trying to contact the web server at a name corresponding to that IP?
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list