Concerns regarding decommissioning a node


(vineeth mohan) #1

Hi ,

I started a index with 5 shards and 1 replica on our integration(INT)
environment on a single machine.(This is to make sure i can scale the index
, if needed ,in future)
Unfortunately when i plugged my dev box to the INT environment network , the
ES instance running on my box automatically hooked up (What a bitch [?] )
with the master ES instance
in the INT environment :frowning: (As it is in multi-cast discovory more ).

Due to this half the documents i have is in my dev box and rest in INT box.

How can i decommission the node running on my dev box. That is i need to
transfer the documents to the INT box and shutdown the DEV instance for the
good.

Thanks
Vineeth


(David Pilato) #2

I suggest changing your cluster name for each env :
For dev instances, use :
ES-DEV-USERNAME (in case of many developpers)
For INT instances, use :
ES-INT
For production, use :
ES-PROD

So even, nodes can see each other on the network, they won't try to work for another cluster.

HTH
David :wink:

Le 25 oct. 2011 à 04:39, Vineeth Mohan vineethmohan@algotree.com a écrit :

Hi ,

I started a index with 5 shards and 1 replica on our integration(INT) environment on a single machine.(This is to make sure i can scale the index , if needed ,in future)
Unfortunately when i plugged my dev box to the INT environment network , the ES instance running on my box automatically hooked up (What a bitch <35D.gif> ) with the master ES instance
in the INT environment :frowning: (As it is in multi-cast discovory more ).

Due to this half the documents i have is in my dev box and rest in INT box.

How can i decommission the node running on my dev box. That is i need to transfer the documents to the INT box and shutdown the DEV instance for the good.

Thanks
Vineeth


(Clinton Gormley) #3

On Tue, 2011-10-25 at 08:09 +0530, Vineeth Mohan wrote:

How can i decommission the node running on my dev box. That is i need
to transfer the documents to the INT box and shutdown the DEV instance
for the good.

Just shut down the node on your DEV box, and the INT server's replica
shard will be promoted to primary.

clint


(vineeth mohan) #4

When i shut down the dev box , things were working fine at master but it
lost some documents.
When i brought back dev instance all these documents came back.
I dont want to loose any document in the process.

On Tue, Oct 25, 2011 at 12:52 PM, Clinton Gormley clint@traveljury.comwrote:

On Tue, 2011-10-25 at 08:09 +0530, Vineeth Mohan wrote:

How can i decommission the node running on my dev box. That is i need
to transfer the documents to the INT box and shutdown the DEV instance
for the good.

Just shut down the node on your DEV box, and the INT server's replica
shard will be promoted to primary.

clint


(vineeth mohan) #5

@David - changing cluster name will help in future. But can i get a fix to
this scenario.

On Tue, Oct 25, 2011 at 3:13 PM, Vineeth Mohan vineethmohan@algotree.comwrote:

When i shut down the dev box , things were working fine at master but it
lost some documents.
When i brought back dev instance all these documents came back.
I dont want to loose any document in the process.

On Tue, Oct 25, 2011 at 12:52 PM, Clinton Gormley clint@traveljury.comwrote:

On Tue, 2011-10-25 at 08:09 +0530, Vineeth Mohan wrote:

How can i decommission the node running on my dev box. That is i need
to transfer the documents to the INT box and shutdown the DEV instance
for the good.

Just shut down the node on your DEV box, and the INT server's replica
shard will be promoted to primary.

clint


(Clinton Gormley) #6

On Tue, 2011-10-25 at 15:13 +0530, Vineeth Mohan wrote:

When i shut down the dev box , things were working fine at master but
it lost some documents.
When i brought back dev instance all these documents came back.
I dont want to loose any document in the process.

Are you sure that your index is set to {number_of_replicas: 1} then?

If you have 1 replica, and 2 nodes, then all your docs should be on both
nodes.

clint


(vineeth mohan) #7

Nope its 0 replica and 5 shards.
Sorry for the wrong details b4.

Thanks
Vineeth

On Tue, Oct 25, 2011 at 3:23 PM, Clinton Gormley clint@traveljury.comwrote:

On Tue, 2011-10-25 at 15:13 +0530, Vineeth Mohan wrote:

When i shut down the dev box , things were working fine at master but
it lost some documents.
When i brought back dev instance all these documents came back.
I dont want to loose any document in the process.

Are you sure that your index is set to {number_of_replicas: 1} then?

If you have 1 replica, and 2 nodes, then all your docs should be on both
nodes.

clint


(Clinton Gormley) #8

On Tue, 2011-10-25 at 15:39 +0530, Vineeth Mohan wrote:

Nope its 0 replica and 5 shards.
Sorry for the wrong details b4.

Then update your index settings and change number of replicas to 1, and
once your cluster is green, then shutdown the DEV node

c

Thanks
Vineeth

On Tue, Oct 25, 2011 at 3:23 PM, Clinton Gormley
clint@traveljury.com wrote:
On Tue, 2011-10-25 at 15:13 +0530, Vineeth Mohan wrote:
> When i shut down the dev box , things were working fine at
master but
> it lost some documents.
> When i brought back dev instance all these documents came
back.
> I dont want to loose any document in the process.

    Are you sure that your index is set to {number_of_replicas: 1}
    then?
    
    If you have 1 replica, and 2 nodes, then all your docs should
    be on both
    nodes.
    
    clint

(vineeth mohan) #9

thanks dude.
Looks like a workable idea.

Thanks
Vineeth

On Tue, Oct 25, 2011 at 4:11 PM, Clinton Gormley clint@traveljury.comwrote:

On Tue, 2011-10-25 at 15:39 +0530, Vineeth Mohan wrote:

Nope its 0 replica and 5 shards.
Sorry for the wrong details b4.

Then update your index settings and change number of replicas to 1, and
once your cluster is green, then shutdown the DEV node

c

Thanks
Vineeth

On Tue, Oct 25, 2011 at 3:23 PM, Clinton Gormley
clint@traveljury.com wrote:
On Tue, 2011-10-25 at 15:13 +0530, Vineeth Mohan wrote:
> When i shut down the dev box , things were working fine at
master but
> it lost some documents.
> When i brought back dev instance all these documents came
back.
> I dont want to loose any document in the process.

    Are you sure that your index is set to {number_of_replicas: 1}
    then?

    If you have 1 replica, and 2 nodes, then all your docs should
    be on both
    nodes.

    clint

(system) #10