mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-11 05:17:55 +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 logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
__updated__ = '2017-03-17'
|
__updated__ = '2017-03-29'
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -692,6 +692,8 @@ class Client(object):
|
|||||||
'expiry': ticket.get_expiry()
|
'expiry': ticket.get_expiry()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
lock.release()
|
lock.release()
|
||||||
|
@ -17,7 +17,7 @@ import threading
|
|||||||
import logging
|
import logging
|
||||||
import six
|
import six
|
||||||
|
|
||||||
__updated__ = '2017-03-22'
|
__updated__ = '2017-03-29'
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -718,6 +718,9 @@ class Client(object):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ from uds.services.OVirt.OVirtProvider import Provider as oVirtProvider
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
__updated__ = '2017-03-28'
|
__updated__ = '2017-03-29'
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -116,8 +116,9 @@ class BaseSpiceTransport(Transport):
|
|||||||
logger.info('SPICE didn\'t find has any port: {}'.format(con))
|
logger.info('SPICE didn\'t find has any port: {}'.format(con))
|
||||||
return False
|
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)
|
self.cache.put(ip, 'Y', READY_CACHE_TIMEOUT)
|
||||||
|
ready = 'Y'
|
||||||
|
|
||||||
return ready == 'Y'
|
return ready == 'Y'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user