cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Levitskiy <Sergey.Levits...@autodesk.com>
Subject Re: Restarting the Management Server via Marvin
Date Fri, 18 Nov 2016 14:18:29 GMT
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
 

Mime
View raw message