ia64/xen-unstable

changeset 7240:1cfe0875658d

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>
author emellor@ewan
date Thu Oct 06 11:04:49 2005 +0100 (2005-10-06)
parents b0bc53c9d5b6
children 0bc466c25560
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Thu Oct 06 10:16:50 2005 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Thu Oct 06 11:04:49 2005 +0100
     1.3 @@ -22,6 +22,7 @@
     1.4   Needs to be persistent for one uptime.
     1.5  """
     1.6  import os
     1.7 +import logging
     1.8  import threading
     1.9  
    1.10  import xen.lowlevel.xc
    1.11 @@ -61,7 +62,7 @@ class XendDomain:
    1.12  
    1.13          self.domains_lock.acquire()
    1.14          try:
    1.15 -            self.refresh()
    1.16 +            self.refresh(True)
    1.17              self.dom0_setup()
    1.18          finally:
    1.19              self.domains_lock.release()
    1.20 @@ -148,9 +149,13 @@ class XendDomain:
    1.21              info.cleanupDomain()
    1.22  
    1.23  
    1.24 -    def refresh(self):
    1.25 +    def refresh(self, initialising = False):
    1.26          """Refresh domain list from Xen.  Expects to be protected by the
    1.27          domains_lock.
    1.28 +
    1.29 +        @param initialising True if this is the first refresh after starting
    1.30 +        Xend.  This does not change this method's behaviour, except for
    1.31 +        logging.
    1.32          """
    1.33          doms = self.xen_domains()
    1.34          for d in self.domains.values():
    1.35 @@ -162,10 +167,10 @@ class XendDomain:
    1.36          for d in doms:
    1.37              if d not in self.domains:
    1.38                  if doms[d]['dying']:
    1.39 -                    log.error(
    1.40 -                        'Cannot recreate information for dying domain %d.  '
    1.41 -                        'Xend will ignore this domain from now on.',
    1.42 -                        doms[d]['dom'])
    1.43 +                    log.log(initialising and logging.ERROR or logging.DEBUG,
    1.44 +                            'Cannot recreate information for dying domain %d.'
    1.45 +                            '  Xend will ignore this domain from now on.',
    1.46 +                            doms[d]['dom'])
    1.47                  else:
    1.48                      try:
    1.49                          dominfo = XendDomainInfo.recreate(doms[d])