mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-24 21:34:41 +03:00
Fixed SPICE with powered off machines (fixed check connection)
This commit is contained in:
parent
f531d338a0
commit
5a3c14db2d
@ -11,7 +11,7 @@ import threading
|
||||
import logging
|
||||
import re
|
||||
|
||||
__updated__ = '2017-03-17'
|
||||
__updated__ = '2017-03-29'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -692,6 +692,8 @@ class Client(object):
|
||||
'expiry': ticket.get_expiry()
|
||||
}
|
||||
}
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
finally:
|
||||
lock.release()
|
||||
|
@ -17,7 +17,7 @@ import threading
|
||||
import logging
|
||||
import six
|
||||
|
||||
__updated__ = '2017-03-22'
|
||||
__updated__ = '2017-03-29'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -718,6 +718,9 @@ class Client(object):
|
||||
}
|
||||
}
|
||||
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
finally:
|
||||
lock.release()
|
||||
|
||||
|
@ -44,7 +44,7 @@ from uds.services.OVirt.OVirtProvider import Provider as oVirtProvider
|
||||
import logging
|
||||
import os
|
||||
|
||||
__updated__ = '2017-03-28'
|
||||
__updated__ = '2017-03-29'
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -116,8 +116,9 @@ class BaseSpiceTransport(Transport):
|
||||
logger.info('SPICE didn\'t find has any port: {}'.format(con))
|
||||
return False
|
||||
|
||||
if connection.testServer(ip, port_to_test) is True:
|
||||
if connection.testServer(con['address'], port_to_test) is True:
|
||||
self.cache.put(ip, 'Y', READY_CACHE_TIMEOUT)
|
||||
ready = 'Y'
|
||||
|
||||
return ready == 'Y'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user