diff options
author | emellor@ewan <emellor@ewan> | 2005-10-06 11:04:49 +0100 |
---|---|---|
committer | emellor@ewan <emellor@ewan> | 2005-10-06 11:04:49 +0100 |
commit | 435cc5366c74734b7a4feae25c80d92c657942a1 (patch) | |
tree | 4751cdb2b0920fe26dfd9249dea2eb688022377f /tools | |
parent | 6bee43e0b66777946ef8291fee82e4529f95a0ea (diff) | |
download | xen-435cc5366c74734b7a4feae25c80d92c657942a1.tar.gz xen-435cc5366c74734b7a4feae25c80d92c657942a1.tar.bz2 xen-435cc5366c74734b7a4feae25c80d92c657942a1.zip |
Reduce the log level for the 'cannot recreate information for dying domain'
message for all but the first refresh when Xend starts.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendDomain.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 39481573a0..9fcc28d385 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -22,6 +22,7 @@ Needs to be persistent for one uptime. """ import os +import logging import threading import xen.lowlevel.xc @@ -61,7 +62,7 @@ class XendDomain: self.domains_lock.acquire() try: - self.refresh() + self.refresh(True) self.dom0_setup() finally: self.domains_lock.release() @@ -148,9 +149,13 @@ class XendDomain: info.cleanupDomain() - def refresh(self): + def refresh(self, initialising = False): """Refresh domain list from Xen. Expects to be protected by the domains_lock. + + @param initialising True if this is the first refresh after starting + Xend. This does not change this method's behaviour, except for + logging. """ doms = self.xen_domains() for d in self.domains.values(): @@ -162,10 +167,10 @@ class XendDomain: for d in doms: if d not in self.domains: if doms[d]['dying']: - log.error( - 'Cannot recreate information for dying domain %d. ' - 'Xend will ignore this domain from now on.', - doms[d]['dom']) + log.log(initialising and logging.ERROR or logging.DEBUG, + 'Cannot recreate information for dying domain %d.' + ' Xend will ignore this domain from now on.', + doms[d]['dom']) else: try: dominfo = XendDomainInfo.recreate(doms[d]) |