ia64/xen-unstable

changeset 6810:d38da169752e

IntroduceDomain of dom0 can fail when it's already connected.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Sep 13 16:56:02 2005 +0000 (2005-09-13)
parents 574aeba9859d
children f562c0f1d222
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Sep 13 16:55:21 2005 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Sep 13 16:56:02 2005 +0000
     1.3 @@ -27,6 +27,7 @@ import string, re
     1.4  import os
     1.5  import time
     1.6  import threading
     1.7 +import errno
     1.8  
     1.9  import xen.lowlevel.xc; xc = xen.lowlevel.xc.new()
    1.10  from xen.util.ip import check_subnet, get_current_ipgw
    1.11 @@ -1097,7 +1098,14 @@ class XendDomainInfo:
    1.12          ref = xc.init_store(self.store_channel.port2)
    1.13          if ref and ref >= 0:
    1.14              self.setStoreRef(ref)
    1.15 -            IntroduceDomain(self.id, ref, self.store_channel.port1, self.path)
    1.16 +            try:
    1.17 +                IntroduceDomain(self.id, ref, self.store_channel.port1,
    1.18 +                                self.path)
    1.19 +            except RuntimeError, ex:
    1.20 +                if ex.args[0] == errno.EISCONN:
    1.21 +                    pass
    1.22 +                else:
    1.23 +                    raise
    1.24              # get run-time value of vcpus and update store
    1.25              self.exportVCPUSToDB(dom_get(self.id)['vcpus'])
    1.26