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.
这个提交包含在:
Marek Marczykowski-Górecki 2017-06-12 09:52:44 +02:00
父节点 9015414119
当前提交 206b7c02d5
找不到此签名对应的密钥
GPG 密钥 ID: 063938BA42CFA724

查看文件

@ -143,13 +143,14 @@ class XS_Watcher(object):
self.log.debug('acquiring global_lock')
global_lock.acquire()
self.log.debug('global_lock acquired')
if force_refresh_domain_list:
self.domain_list_changed(refresh_only=True)
try:
if force_refresh_domain_list:
self.domain_list_changed(refresh_only=True)
system_state.refresh_meminfo(domain_id, untrusted_meminfo_key)
global_lock.release()
self.log.debug('global_lock released')
system_state.refresh_meminfo(domain_id, untrusted_meminfo_key)
finally:
global_lock.release()
self.log.debug('global_lock released')
def watch_loop(self):