Nehal,

I would approach this in a slightly different way.

Set up your new management server but as a 2nd node rather than a replacement.  
To do so you need to put a load balancer in front of both of them and update 
the global setting 'host' with the new load balanced IP.

After updating the 'host' setting and restarting the 'cloud-management' service 
on each, you will need to restart all system VMs so they use this new setting.

You should then add a 2nd MySQL server, initially as a slave and allow it to 
replicate, then 'fail over' making the slave the new master.  The docs detail 
how to deploy multiple MySQL servers and how to fail over.

Whilst this may seem like more work, we always deploy with at least two 
Management Servers and two MySQL servers as this provides better resilience 
makes performing planned maintenance much easier.

Regards

Geoff Higginbottom
CTO / Cloud Architect


D: +44(0)20 3603 0542<tel:+442036030542> | S: +44(0)20 3603 
0540<tel:+442036030540> | M: +44(0)7968161581<tel:+447968161581>

[email protected]<mailto:[email protected]> | 
www.shapeblue.com

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS



On 27 May 2013, at 06:25, "Nehal J. Wani" 
<[email protected]<mailto:[email protected]>> wrote:

Suppose I have only one management server and I want to take it down for
maintenance. What is the procedure to deploy the management server on a
different machine?

I tried the following on the new machine:

(i) Completed all the steps from Chapter 2 in the
Apache_CloudStack-4.0.2-Quick_Install_Guide-en-US.pdf

(ii) Copied all files from /etc/cloud, /usr/lib64/cloud, /var/lib/cloud
from the old machine to the new one.

(iii) Took dumps of the databases cloud, cloudbridge, cloud_usage from old
machine and then put them in the new machine.

(iv) Changed the ip in /etc/cloud/agent/agent.properties and
/etc/cloud/management/db.properties from 10.3.3.57 to 10.3.3.56


But i still get the error

2013-05-27 10:51:16,581 WARN  [agent.manager.ClusteredAgentManagerImpl]
(Job-Executor-2:job-93) Unable to connect to peer management server:
90520731198133, ip: 10.3.3.57 due to Connection refused
java.net.ConnectException: Connection refused
   at sun.nio.ch.Net.connect(Native Method)
   at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:525)
   at java.nio.channels.SocketChannel.open(SocketChannel.java:164)
   at
com.cloud.agent.manager.ClusteredAgentManagerImpl.connectToPeer(ClusteredAgentManagerImpl.java:442)
   at
com.cloud.agent.manager.ClusteredAgentAttache.send(ClusteredAgentAttache.java:172)
   at com.cloud.agent.manager.AgentAttache.send(AgentAttache.java:388)
   at
com.cloud.agent.manager.AgentManagerImpl.send(AgentManagerImpl.java:505)
   at
com.cloud.agent.manager.AgentManagerImpl.send(AgentManagerImpl.java:458)
   at
com.cloud.vm.VirtualMachineManagerImpl.advanceStop(VirtualMachineManagerImpl.java:1079)
   at
com.cloud.vm.UserVmManagerImpl.stopVirtualMachine(UserVmManagerImpl.java:2804)
   at
com.cloud.event.ActionEventCallback.intercept(ActionEventCallback.java:36)
   at com.cloud.api.commands.StopVMCmd.execute(StopVMCmd.java:119)
   at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:138)
   at
com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:432)
   at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:679)

How to rectify this? How can I achieve my goal?

Thanking You,
Nehal J. Wani
UG2, BTech CS+MS(CL)
IIIT-Hyderabad
http://commanlinewani.blogspot.com
This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is operated under 
license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Reply via email to