Skip to main content
jmlux
New Member
February 10, 2016
Solved

Changing config while slave is active (master), will it sync when actual master is back?

  • February 10, 2016
  • 1 reply
  • 14516 views

Hi,

In an A-P HA cluster, with the Master down (Slave has become Master), what happens when I go and change config and the actual master comes back and takes over as master again? Will there be a config sync issue?

Thanks for any insight.

 

Bye,

Marki

Best answer by emnoc

NO the slave is your master and will sync withe 2nd unit when it comes back online. If preemption is enabled,  the former master will take ownership.

1 reply

emnoc
emnocAnswer
New Member
February 10, 2016

NO the slave is your master and will sync withe 2nd unit when it comes back online. If preemption is enabled,  the former master will take ownership.

Toshi_Esumi
SuperUser
SuperUser
February 10, 2016

a quote from HA Handbook:

- Enable or disable preempt mode using the preempt option. In preempt mode a higher priority backup unit can preempt a lower priority master unit. This can happen if a master has failed, a backup unit has become the master unit, and the failed master is restarted. Since the restarted unit will have a higher priority, if preempt mode is enabled the restarted unit will replace the current master unit. Preempt mode is enabled by default.

 

ede_pfau
SuperUser
SuperUser
February 10, 2016

Oh, oh.

 

First, @Toshi: the 'preempt' parameter is not part of the HA setup. It's used in the VRRP setup. OP is inquiring about a HA cluster.

 

Second, yes, if the prior primary unit comes online again, config changes that have taken place inbetween can be lost!

 

But, one requirement for this is that on all cluster units the HA override parameter is enabled, and that the priority of the joining unit is higher than the priority of the running unit.

Both of these are not set by default.

Only if you had the intention to always have the same unit be the master and set the override parameter and it's priority highest then you would lose config changes when reconnecting this unit.

 

Please read the relevant chapter in the Handbook about HA configuration to fully understand how and when a primary unit is selected. For instance, Handbook v5.0.7, ch. 9, pg. 1133 ff., especially page 1148 (regular selection process) and pg. 1157 (with override enabled).