On 2012-05-30 09:53, Debian Guy wrote:
> Hello, everyone,
>
> I would appreciate a bit of advice concerning the following scenario:
> Galera cluster (percona release) with 3 nodes (N1, N2, N3), out of
> which N1
> is considered as a reference node.
> N1 has wsrep_cluster_address='gcom://', while N2 and N3 have it
> pointing to
> the IP of N1 (perhaps this is what I'm doing wrong, but need a double
> check).
>
> If I simulate a failure of N1 (a forced power off or network
> failure), the
> remaining nodes seem to handle everything correctly and replicate
> changes
> between them.
>
> When N1 returns, it will join the cluster,
No it won't. How will it know about the other guys if
wsrep_cluster_address=gcomm:// ?
It will create a new cluster.
> but does not receive any of the
> updates (due to the wsrep_cluster_address) - somewhat normal for this
> behavior. And if any of the other nodes is to restart, will most
> likely do
> a full resync from N1 and lose all the changes.
>
> What's the best approach concerning the wsrep_cluster_address setting
> of
> each node, in order to avoid such issue? Have it unset in the
> configuration
> file and configure it dynamically after startup using some external
> component, or do some form of chain on the nodes with the
> wsrep_cluster_address (e.g.: N2 => N1, N3 => N2, N1 => N3)?
Unfortunately dynamic address changes are limited to mysqldump SST
method only, since with anything else you have to join the cluster
_before_ mysqld is fully initialized.
The best approach for now is to remember that
wsrep_cluster_address=gcomm:// is a temporary setting to bootstrap a new
cluster and must be changed to some real address asap. (And the reason
to change it in my.cnf is that it is the only way to adjust the
configuration in a system with mysqld_safe)
Regards,
Alex
> TIA
--
Alexey Yurchenko,
Codership Oy,
www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011