qmemman: make sure to release lock
Even when handling updated meminfo or domain list something goes wrong, make sure to release the lock - otherwise the whole qmemman will be blocked.
This commit is contained in:
parent
9015414119
commit
206b7c02d5
@ -143,11 +143,12 @@ class XS_Watcher(object):
|
|||||||
self.log.debug('acquiring global_lock')
|
self.log.debug('acquiring global_lock')
|
||||||
global_lock.acquire()
|
global_lock.acquire()
|
||||||
self.log.debug('global_lock acquired')
|
self.log.debug('global_lock acquired')
|
||||||
|
try:
|
||||||
if force_refresh_domain_list:
|
if force_refresh_domain_list:
|
||||||
self.domain_list_changed(refresh_only=True)
|
self.domain_list_changed(refresh_only=True)
|
||||||
|
|
||||||
system_state.refresh_meminfo(domain_id, untrusted_meminfo_key)
|
system_state.refresh_meminfo(domain_id, untrusted_meminfo_key)
|
||||||
|
finally:
|
||||||
global_lock.release()
|
global_lock.release()
|
||||||
self.log.debug('global_lock released')
|
self.log.debug('global_lock released')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user