bigcy / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

cookbook fails to clear the cluster if "export LOCAL_USER_VALUES" is forgotten #637

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Install a three node master-slave cluster with cookbook. Use the following 
custom parameters:

export USE_TPM=1

export TUNGSTEN_SERVICE=datascan
export TUNGSTEN_BASE=/home/tungsten/datascan
export RMI_PORT=13950
export THL_PORT=12950
export DATABASE_PORT=24306
export DATABASE_USER=tungsten
export DATABASE_PASSWORD=secret
export MY_CNF=/home/tungsten/sandboxes/datascan/my.sandbox.cnf
export BINLOG_DIRECTORY=/home/tungsten/sandboxes/datascan/data

2. Let installation succeed:

# node qa3
datascan  [master]  seqno:          0  - latency:   0.812 - ONLINE

# node qa2
datascan  [slave]   seqno:          0  - latency:   1.258 - ONLINE

# node qa1
datascan  [slave]   seqno:          0  - latency:   1.236 - ONLINE

3. Uninstall the cluster:

cd current
export I_WANT_TO_UNINSTALL=1
./cookbook/clear_cluster

What is the expected output?

Cluster is completely wiped out.

What do you see instead?

Confirmation that it was. However command completes suspiciously quickly and 
nothing is cleared (replicators are running, schema is still there):

--------------------------------------------------------------------------------
------
Clearing up cluster with installed topology 'MASTER_SLAVE'
--------------------------------------------------------------------------------
------
!!! WARNING !!!
--------------------------------------------------------------------------------
------
'clear-cluster' is a potentially damaging operation.
This command will do all the following:
* Stop the replication software in all servers. [$STOP_REPLICATORS]
* REMOVE ALL THE CONTENTS from 
/home/tungsten/installs/cookbook/.[$REMOVE_TUNGSTEN_BASE]
* REMOVE the tungsten_<service_name> schemas in all nodes (qa3 qa2 qa1) 
[$REMOVE_SERVICE_SCHEMA]
* REMOVE the schemas created for testing (test, evaluator) in all nodes (qa3 
qa2 qa1)  [$REMOVE_TEST_SCHEMAS]
* Create the test server anew;                [$CLEAN_NODE_DATABASE_SERVER]
* Unset the read_only variable;               [$CLEAN_NODE_DATABASE_SERVER]
* Set the binlog format to MIXED;             [$CLEAN_NODE_DATABASE_SERVER]
* Reset the master (removes all binary logs); [$CLEAN_NODE_DATABASE_SERVER]
***
The variable $I_WANT_TO_UNINSTALL was set. No confirmation is required.
***
--------------------------------------------------------------------------------
------

What is the possible cause?

N/A.

What is the proposed solution?

N/A.

Additional information

Original issue reported on code.google.com by linas.vi...@continuent.com on 12 Jul 2013 at 12:48

GoogleCodeExporter commented 9 years ago
P.S. If I try to run the clear script one more time:

This command requires an installed cluster

Original comment by linas.vi...@continuent.com on 12 Jul 2013 at 12:53

GoogleCodeExporter commented 9 years ago
The cause was that if one used the following during installation:

export LOCAL_USER_VALUES=~/downloads/USER_VALUES.local.sh

It should also be set before calling clear_cluster.

Original comment by linas.vi...@continuent.com on 12 Jul 2013 at 2:09

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 12 Jul 2013 at 2:12

GoogleCodeExporter commented 9 years ago
Fixed by refactoring the implementation of Issue#634

Original comment by g.maxia on 15 Jul 2013 at 12:17