dom0/qmemman: do not fail when domain name not available

This can be the case when domain just dissapeared (destroy), but qmemman didn't
processed xenstore watch trigger.
This commit is contained in:
Marek Marczykowski 2012-10-15 01:58:07 +02:00
parent 3183942a9d
commit 02601049ca

View File

@ -66,12 +66,14 @@ class SystemState:
if self.domdict[i].slow_memset_react and \ if self.domdict[i].slow_memset_react and \
self.domdict[i].memory_actual <= self.domdict[i].last_target + self.XEN_FREE_MEM_LEFT/4: self.domdict[i].memory_actual <= self.domdict[i].last_target + self.XEN_FREE_MEM_LEFT/4:
dom_name = self.xs.read('', '/local/domain/%s/name' % str(i)) dom_name = self.xs.read('', '/local/domain/%s/name' % str(i))
if dom_name is not None:
clear_error_qubes_manager(dom_name, slow_memset_react_msg) clear_error_qubes_manager(dom_name, slow_memset_react_msg)
self.domdict[i].slow_memset_react = False self.domdict[i].slow_memset_react = False
if self.domdict[i].no_progress and \ if self.domdict[i].no_progress and \
self.domdict[i].memory_actual <= self.domdict[i].last_target + self.XEN_FREE_MEM_LEFT/4: self.domdict[i].memory_actual <= self.domdict[i].last_target + self.XEN_FREE_MEM_LEFT/4:
dom_name = self.xs.read('', '/local/domain/%s/name' % str(i)) dom_name = self.xs.read('', '/local/domain/%s/name' % str(i))
if dom_name is not None:
clear_error_qubes_manager(dom_name, no_progress_msg) clear_error_qubes_manager(dom_name, no_progress_msg)
self.domdict[i].no_progress = False self.domdict[i].no_progress = False