Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Disconnect from a cluster
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Simon Balz  
View profile  
 More options Feb 12, 9:14 am
From: Simon Balz <si...@balz.me>
Date: Sun, 12 Feb 2012 06:14:46 -0800 (PST)
Local: Sun, Feb 12 2012 9:14 am
Subject: Disconnect from a cluster
Hi all,

is there a way to take node 'offline', I mean disconnect from the
cluster so wsrep_local_state will be 0?
The idea is to do maintenance on the node without stopping the whole
mysql daemon.

Thx
Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Feb 12, 10:01 am
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Sun, 12 Feb 2012 18:01:05 +0300
Local: Sun, Feb 12 2012 10:01 am
Subject: Re: [codership-team] Disconnect from a cluster
On 2012-02-12 17:14, Simon Balz wrote:

> Hi all,

> is there a way to take node 'offline', I mean disconnect from the
> cluster so wsrep_local_state will be 0?
> The idea is to do maintenance on the node without stopping the whole
> mysql daemon.

> Thx
> Simon

mysql> SET GLOBAL wsrep_cluster_address='';

will do exactly what you want. But are you sure it is what you want? ;)
What sort of maintenance this could be?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Balz  
View profile  
 More options Feb 12, 11:33 am
From: Simon Balz <si...@balz.me>
Date: Sun, 12 Feb 2012 08:33:34 -0800 (PST)
Local: Sun, Feb 12 2012 11:33 am
Subject: Re: Disconnect from a cluster
Maybe maintenance is the wrong word but I'm searching for a solution
to have a cold-standby instance when doing deployments with critical
database changes. Can't I just bootstrap a new cluster on this
standalone instance in case of a rollback scenario? Of course I have
to add addtl. nodes again afterwards, maybe after resetting somehow
nodes used in the previous cluster. This scenario could save a lot of
time when I'm working with bigger databases.

On 12 Feb., 16:01, Alex Yurchenko <alexey.yurche...@codership.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Feb 12, 12:58 pm
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Sun, 12 Feb 2012 20:58:25 +0300
Local: Sun, Feb 12 2012 12:58 pm
Subject: Re: [codership-team] Re: Disconnect from a cluster
On 2012-02-12 19:33, Simon Balz wrote:

> Maybe maintenance is the wrong word but I'm searching for a solution
> to have a cold-standby instance when doing deployments with critical
> database changes. Can't I just bootstrap a new cluster on this
> standalone instance in case of a rollback scenario?

mysql> SET GLOBAL wsrep_cluster_address='gcomm://' will do exactly
this.

CAUTION!!! This will make two clusters with the same state/history
UUID. This can lead to data inconsistency. E.g. if you do some changes
on this node and then rejoin it to old cluster, they may go unnoticed if
you have configured IST and old cluster has more advanced sequence
number. (I think this will have to be addressed in 2.1). In any case,
operation on a disconnected node is highly discouraged. You don't have
to be a rocket scientist to break Galera consistency control.

> Of course I have
> to add addtl. nodes again afterwards, maybe after resetting somehow
> nodes used in the previous cluster.

mysql> SET GLOBAL wsrep_cluster_address='gcomm://<the new cluster
node>' will do exactly this.

Note however, that if those nodes are more advanced (which I as
understand is the case), they will have to take full SST to be rolled
back to that other node state. And for rsync/xtrabackup SST you will
need to restart them. (And yes, that will reset the buffer pool, but it
is still faster than mysqldump, cause mysqldump SST will totally flush
it as well).

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henrik Ingo  
View profile  
 More options Feb 12, 2:41 pm
From: Henrik Ingo <henrik.i...@avoinelama.fi>
Date: Sun, 12 Feb 2012 21:41:54 +0200
Local: Sun, Feb 12 2012 2:41 pm
Subject: Re: [codership-team] Re: Disconnect from a cluster
On Sun, Feb 12, 2012 at 7:58 PM, Alex Yurchenko

In this case it is easy to get rid of the UUID though.

Simon, can't you simply shut down one node? Then it's surely disconnected.

Your rollback scenario would then be:

1. shutdown all nodes in the botched cluster
2. on the cold standby: rm /var/lib/mysql/grastate.dat
3. start cold standby
4. add more nodes to cluster with the cold standby

Step 2 is the one that resets the UUID, now nodes from the old botched
cluster cannot accidentally join this node, they will have to discard
their data.

AFAIK this isn't possible without restarting MySQL. (But there seems
to be many use cases now for a feature request to reset the UUID.)

henrik

--
henrik.i...@avoinelama.fi
+358-40-8211286 skype: henrik.ingo irc: hingo
www.openlife.cc

My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Feb 12, 3:48 pm
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Sun, 12 Feb 2012 23:48:19 +0300
Local: Sun, Feb 12 2012 3:48 pm
Subject: Re: [codership-team] Re: Disconnect from a cluster
On 2012-02-12 22:41, Henrik Ingo wrote:

Hi Henrik,

Actually it is possible to do without restarting MySQL:

1. SET GLOBAL wsrep_provider='none';
2. rm /var/lib/mysql/grastate.dat
3. SET GLOBAL wsrep_provider='/usr/lib64/galera/libgalera_smm.so';
4. SET GLOBAL wsrep_cluster_address='gcomm://';
5. add more nodes

But it is not really required, unless you decide to modify data in both
clusters. Not changing UUID may actually be helpful since it allows you
to remerge cold standby to original cluster without SST (given that
critical database changes went alright).

Also, in order to maintain some degree of availability I'd advise to
have at least 2-node cold standby _cluster_. It can be produced this way
(the order is important):

1. On node1: SET GLOBAL wsrep_cluster_address='';
2. On node2: SET GLOBAL wsrep_cluster_address=''; // more updated than
node1
3. On node2: SET GLOBAL wsrep_cluster_address='gcomm://';
4. On node1: SET GLOBAL wsrep_cluster_address='gcomm://node2'; // IST,
synced with node2

Regards,
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henrik Ingo  
View profile  
 More options Feb 12, 4:34 pm
From: Henrik Ingo <henrik.i...@avoinelama.fi>
Date: Sun, 12 Feb 2012 23:34:23 +0200
Local: Sun, Feb 12 2012 4:34 pm
Subject: Re: [codership-team] Re: Disconnect from a cluster
On Sun, Feb 12, 2012 at 10:48 PM, Alex Yurchenko

When the maintenance actions go as planned, the cold standby should of
course just join back into the cluster when finished. The rm
grastate.dat should be the first step only if the rollback procedure
is actually executed.

henrik

--
henrik.i...@avoinelama.fi
+358-40-8211286 skype: henrik.ingo irc: hingo
www.openlife.cc

My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Balz  
View profile  
 More options Feb 13, 7:29 am
From: Simon Balz <si...@balz.me>
Date: Mon, 13 Feb 2012 04:29:22 -0800 (PST)
Local: Mon, Feb 13 2012 7:29 am
Subject: Re: Disconnect from a cluster
Hi guys

Thank you all for this input.

I have an additional question:
What is the correct procedure to start up the origin cluster again,
after every node of the cluster was down, so I don't loose the UUID?
I mean the first node of the cluster won't find any partner when I try
to set the cluster address:
SET GLOBAL wsrep_cluster_address='gcomm://node2';

Thx
Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Feb 13, 9:03 am
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Mon, 13 Feb 2012 17:03:59 +0300
Local: Mon, Feb 13 2012 9:03 am
Subject: Re: [codership-team] Re: Disconnect from a cluster
On 2012-02-13 15:29, Simon Balz wrote:

> Hi guys

> Thank you all for this input.

> I have an additional question:
> What is the correct procedure to start up the origin cluster again,
> after every node of the cluster was down, so I don't loose the UUID?
> I mean the first node of the cluster won't find any partner when I
> try
> to set the cluster address:
> SET GLOBAL wsrep_cluster_address='gcomm://node2';

> Thx
> Simon

When all cluster nodes are down, you should choose the one that was
down last to be the "seed" node and start it with
wsrep_cluster_address='gcomm://'. Then join remaining nodes in whatever
order.

Here by "down" I mean graceful shutdown - then global transaction ID is
saved in grastate.dat. In case of a crash/abort you normally lose state
information (as you normally have a broken state anywas) - and then a
new state UUID will be generated on startup.

Regards,
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
patrickzoblis...@comcast.net  
View profile  
 More options Feb 13, 3:31 pm
From: PATRICKZOBLIS...@comcast.net
Date: Mon, 13 Feb 2012 20:31:55 +0000 (UTC)
Local: Mon, Feb 13 2012 3:31 pm
Subject: Re: [codership-team] Re: Disconnect from a cluster

Hi Alex,

Regarding taking a node out of a cluster via ` SET GLOBAL wsrep_cluster_address='';` - What would be a reasonable expectation for time to complete?

I've tried setting it blank as above and also setting it to 'gcomm://' as mentioned below and both commands never return. Snippet from the node's log file which I'm trying to remove from the cluster. Last line from the log is " [Note] WSREP: rollbacker thread exiting".

120213 22:15:09 [Note] WSREP: Stop replication

120213 22:15:09 [Note] WSREP: Closing send monitor...
120213 22:15:09 [Note] WSREP: Closed send monitor.
120213 22:15:09 [Note] WSREP: gcomm: terminating thread
120213 22:15:09 [Note] WSREP: gcomm: joining thread
120213 22:15:09 [Note] WSREP: gcomm: closing backend
120213 22:15:09 [Note] WSREP: evs::proto(e0c81b4c-567e-11e1-0800-85ed415644d4, LEAVING, view_id(REG,5d6a7cdc-565a-11e1-0800-7dba6589ad90,92)) uuid 5d6a7cdc-565a-11e1-0800-7dba6589ad90 missing from install message, assuming partitioned
120213 22:15:09 [Note] WSREP: evs::proto(e0c81b4c-567e-11e1-0800-85ed415644d4, LEAVING, view_id(REG,5d6a7cdc-565a-11e1-0800-7dba6589ad90,92)) uuid 6cd1e65e-567f-11e1-0800-377d6c6676ab missing from install message, assuming partitioned
120213 22:15:09 [Note] WSREP: GMCast::handle_stable_view: view(view_id(NON_PRIM,5d6a7cdc-565a-11e1-0800-7dba6589ad90,92) memb {
e0c81b4c-567e-11e1-0800-85ed415644d4,

} joined {
} left {
} partitioned {

5d6a7cdc-565a-11e1-0800-7dba6589ad90,
6cd1e65e-567f-11e1-0800-377d6c6676ab,
})

120213 22:15:09 [Note] WSREP: New COMPONENT: primary = no, my_idx = 0, memb_num = 1
120213 22:15:09 [Note] WSREP: GMCast::handle_stable_view: view((empty))
120213 22:15:09 [Note] WSREP: gcomm: closed
120213 22:15:09 [Note] WSREP: Flow-control interval: [230, 256]
120213 22:15:09 [Note] WSREP: Received NON-PRIMARY.
120213 22:15:09 [Note] WSREP: Shifting SYNCED -> OPEN (TO: 4046094)
120213 22:15:09 [Note] WSREP: Received self-leave message.
120213 22:15:09 [Note] WSREP: New cluster view: global state: 0ec148da-46c0-11e1-0800-e762c70be5e7:4046094, view# -1: non-Primary, number of nodes: 1, my index: 0, protocol version 1
120213 22:15:09 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
120213 22:15:09 [Note] WSREP: Flow-control interval: [0, 0]
120213 22:15:09 [Note] WSREP: Received SELF-LEAVE. Closing connection.
120213 22:15:09 [Note] WSREP: Shifting OPEN -> CLOSED (TO: 4046094)
120213 22:15:09 [Note] WSREP: RECV thread exiting 0: Success
120213 22:15:09 [Note] WSREP: recv_thread() joined.
120213 22:15:09 [Note] WSREP: Closing slave action queue.
120213 22:15:09 [Note] WSREP: New cluster view: global state: 0ec148da-46c0-11e1-0800-e762c70be5e7:4046094, view# -1: non-Primary, number of nodes: 0, my index: -1, protocol version 1
120213 22:15:09 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
120213 22:15:09 [Note] WSREP: applier thread exiting (code:0)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:09 [Note] WSREP: applier thread exiting (code:5)
120213 22:15:11 [Note] WSREP: rollbacker thread exiting

As of right now - the command says it's still in progress;

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 5.5.17-22.1-log Percona XtraDB Cluster (GPL), Release 22.1, Revision 3683 wsrep_22.3.r3683

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set global wsrep_cluster_address='';

Thanks
Patrick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Feb 13, 3:57 pm
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Mon, 13 Feb 2012 23:57:30 +0300
Local: Mon, Feb 13 2012 3:57 pm
Subject: Re: [codership-team] Re: Disconnect from a cluster
Hi Patrick,

This is Percona's server, maybe something went wrong when they merged
our patch. I suggest that you file a bug report there.

To be honest, before posting I tested those commands with the build
from branch head only, so it may also be a bug in our previous release
that have been fixed in launchpad.

And to answer your question - time to complete should be around 2
seconds (there are some sleeps).

Regards,
Alex

On 2012-02-13 23:31, PATRICKZOBLIS...@comcast.net wrote:

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »