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,13 +66,15 @@ class SystemState:
if self.domdict[i].slow_memset_react and \
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))
clear_error_qubes_manager(dom_name, slow_memset_react_msg)
if dom_name is not None:
clear_error_qubes_manager(dom_name, slow_memset_react_msg)
self.domdict[i].slow_memset_react = False
if self.domdict[i].no_progress and \
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))
clear_error_qubes_manager(dom_name, no_progress_msg)
if dom_name is not None:
clear_error_qubes_manager(dom_name, no_progress_msg)
self.domdict[i].no_progress = False
#the below works (and is fast), but then 'xm list' shows unchanged memory value