epermana / tungsten-replicator

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

dsctl set/reset should throw an error if Replicator is running #1088

Open GoogleCodeExporter opened 9 years ago

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

Execute set/reset while Replicator is running.

What is the expected output?

Error message and request to stop Replicator.

What do you see instead?

dsctl just executes the set/reset.

What is the possible cause?

dsctl doesn't check status of the Replicator.

What is the proposed solution?

Add a check to see if Replicator PID exists and stop, if it does.

Additional information

Though it would be enough to put Replicator OFFLINE and use a JMX to check for 
Replicator state - this check would slow down dsctl execution due to a required 
timeout, while a small timeout might lead to incorrect decision on a loaded 
system. To make it robust, we'll check if Replicator is running at all by 
looking for PID. This will require to stop Replicator process, but it's the 
most safe approach.

A separate class will be developed to check for Replicator PID, which might be 
useful for other components in the future.

Original issue reported on code.google.com by linas.vi...@continuent.com on 15 Jan 2015 at 5:16