mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-20 06:50:23 +03:00
Removed "erroring" machine is it has any exception on connection
This commit is contained in:
parent
10805ded7e
commit
3003066a91
@ -172,18 +172,16 @@ class ProxmoxDeployment(services.UserDeployment):
|
||||
|
||||
try:
|
||||
vmInfo = self.service().getMachineInfo(int(self._vmid))
|
||||
if vmInfo.status == 'stopped':
|
||||
self._queue = [opStart, opFinish]
|
||||
return self.__executeQueue()
|
||||
|
||||
self.cache.put('ready', '1')
|
||||
except client.ProxmoxConnectionError:
|
||||
raise # If connection fails, let it fail on parent
|
||||
except Exception as e:
|
||||
self.doLog(log.ERROR, 'Error on setReady: {}'.format(e))
|
||||
# Treat as operation done, maybe the machine is ready and we can continue
|
||||
# return self.__error('Machine not found')
|
||||
return self.__error('Machine not found: {}'.format(e))
|
||||
|
||||
if vmInfo.status == 'stopped':
|
||||
self._queue = [opStart, opFinish]
|
||||
return self.__executeQueue()
|
||||
|
||||
self.cache.put('ready', '1')
|
||||
return State.FINISHED
|
||||
|
||||
def reset(self) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user