Re: [ClusterLabs] Problems with pacemaker

2017-11-20 Thread Ken Gaillot
On Thu, 2017-11-16 at 10:27 +0100, Salvatore D'Angelo wrote:
> Hi All, 
> 
> I am working on a PostgreSQL cluster managed using Pacemaker and
> Corosync. 
> The cluster is composed by three nodes: Master, Sync and Async. 
> Currently my cluster uses PostgreSQL 9.4.9 and I am going to upgrade
> my environments to 9.6.3. 
> 
> My upgrade procedure uses the following steps: 
> 
> 1. install 9.6.3 binaries on all the three nodes 
> 2. crm node standby of all the three nodes 

Another option would be to put the cluster into maintenance mode at
this step instead of standby. The cluster would continue monitoring
pgsql and reporting failures, but wouldn't do anything about them.

Then I think you could replace steps 7-11 with: start postgres on all
nodes, wait for the monitors to come back OK, then take the cluster out
of maintenance mode.

> 3. create new data directory on all the three nodes 
> 4. only on master node do initdb on data directory 
> 5. pg_upgrade from old to the new directory 
> 6. update postgresql.conf file 
> 7. start postgres with pg_ctl command 
> 8. stop postgres with pg_ctl command 
> 9. crm node online  
> 
> on the others two nodes: 
> 10. pg_base_backup to align slave node with master 
> 11. crm node online  
> 
> Now I have two questions: 
> 1. In order to have the master working properly I needed step 7 and 8
> in order to let master recognize the status of the cluster before the
> upgrade and let it recognize the others node and go in hot standby
> mode. Is this start/sto really required or there is another way to
> have master start from the status before the upgrade? 
> 
> 2. On test environment this procedure works fine. In production, two
> times happened that when I start nodes in step 9 the slaves start as
> well. Is this possible? In which case this could happen? 
> 
> Salvatore D'Angelo
> Advisory Software  Engineer - IBM Cloud
> IBM Rome Software Lab
> Via Sciangai 53, 00144 Roma
> Phone +39-347-432-8059
> 
> IBM Italia S.p.A. Sede Legale: Circonvallazione Idroscalo - 20090
> Segrate (MI) Cap. Soc. euro 347.256.998,80 C. F. e Reg. Imprese MI
> 01442240030 - Partita IVA 10914660153 Societa' con unico azionista
> Societa' soggetta all'attivita' di direzione e coordinamento di
> International Business Machines Corporation (Salvo che sia
> diversamente indicato sopra / Unless stated otherwise above)
-- 
Ken Gaillot 

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] Problems with pacemaker

2017-11-17 Thread Salvatore D'Angelo
Hi All,

I am working on a PostgreSQL cluster managed using Pacemaker and Corosync.
The cluster is composed by three nodes: Master, Sync and Async.
Currently my cluster uses PostgreSQL 9.4.9 and I am going to upgrade my 
environments to 9.6.3.

My upgrade procedure uses the following steps:

1. install 9.6.3 binaries on all the three nodes
2. crm node standby of all the three nodes
3. create new data directory on all the three nodes
4. only on master node do initdb on data directory
5. pg_upgrade from old to the new directory
6. update postgresql.conf file
7. start postgres with pg_ctl command
8. stop postgres with pg_ctl command
9. crm node online 

on the others two nodes:
10. pg_base_backup to align slave node with master
11. crm node online 

Now I have two questions:
1. In order to have the master working properly I needed step 7 and 8 in 
order to let master recognize the status of the cluster before the upgrade 
and let it recognize the others node and go in hot standby mode. Is this 
start/sto really required or there is another way to have master start 
from the status before the upgrade?

2. On test environment this procedure works fine. In production, two times 
happened that when I start nodes in step 9 the slaves start as well. Is 
this possible? In which case this could happen?

Salvatore D'Angelo
Advisory Software  Engineer - IBM Cloud
IBM Rome Software Lab
Via Sciangai 53, 00144 Roma
Phone +39-347-432-8059


IBM Italia S.p.A. Sede Legale: Circonvallazione Idroscalo - 20090 Segrate 
(MI) Cap. Soc. euro 347.256.998,80 C. F. e Reg. Imprese MI 01442240030 - 
Partita IVA 10914660153 Societa' con unico azionista Societa' soggetta 
all'attivita' di direzione e coordinamento di International Business 
Machines Corporation (Salvo che sia diversamente indicato sopra / Unless 
stated otherwise above)
___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org