You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Jeff Hair <je...@greenqloud.com> on 2016/11/18 11:05:26 UTC
Restarting the Management Server via Marvin
Hi,
is there any facility in Marvin for restarting the management server? I
need to write a test where I change a global setting and then see if
functionality has changed based on me changing the setting. As far as I
know, the only way to update the settings is to restart the management
server. I'd need to restart it and then wait for it to be ready, I guess.
Jeff
Re: Restarting the Management Server via Marvin
Posted by Sergey Levitskiy <Se...@autodesk.com>.
You can use SSH client to get to management server and restart. Similar to this
try:
sshClient = SshClient(
self.mgtSvrDetails["mgtSvrIp"],
22,
self.mgtSvrDetails["user"],
self.mgtSvrDetails["passwd"],
retries=1,
log_lvl=logging.INFO
)
result = sshClient.runCommand("/etc/init.d/cloudstack-management restart")
if 'status' in result and result['status'] == 'SUCCESS' and 'stdout' in result and len(result['stdout']) > 0:
exec_stdout = result['stdout']
except Exception:
self.debug("Failed to ssh into mgmt server host and execute command")
Don’t forget to wait enough for management server to come online after the restart.
Thanks,
Sergey