WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][xend] Ensure bootable flag is set in internal xend c

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][xend] Ensure bootable flag is set in internal xend config for tap devices
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Mon, 30 Apr 2007 17:41:48 -0600
Delivery-date: Mon, 30 Apr 2007 16:40:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (X11/20060911)
When defining new domains containing more than one tap device, only the
first has 'bootable' entry set.  Subsequent tap devices have no bootable
entry and generate a KeyError when the entry is accessed in
XendDomainInfo._configureBootloader, e.g.

[2007-04-30 15:34:47 4147] ERROR (xmlrpclib2:178) Internal error
handling xend.domain.start
Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/xen/util/xmlrpclib2.py", line
131, in _marshaled_dispatch
    response = self._dispatch(method, params)
  File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch
    return func(*params)
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line
985, in domain_start
    dominfo.start(is_managed = True)
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 396, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendTask.py", line
209, in log_progress
    retval = func(*args, **kwds)
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 1487, in _initDomain
    self._configureBootloader()
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 1806, in _configureBootloader
    disks = [x for x in self.info['vbd_refs']
KeyError: 'bootable'

This patch adds to the 'compat hack' in XendConfig.py, ensuring a
bootable entry exists for all tap devices.

Regards,
Jim

# HG changeset patch
# User Jim Fehlig <jfehlig@xxxxxxxxxx>
# Date 1177975982 21600
# Node ID d89ce902508ed4d5f1afa1fbb85b30a6a9ed805e
# Parent  0f9b97523450aae06d42852bdac9bbca3d6033d1
Ensure 'bootable' entry is set for domains containing multiple tap devices.

When defining new domains containing more than one tap device, only the first
has 'bootable' entry set.  Subsequent tap devices have no bootable entry and
generate a KeyError when the entry is accessed in
XendDomainInfo._configureBootloader.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>

diff -r 0f9b97523450 -r d89ce902508e tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Sat Apr 28 09:44:24 2007 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Mon Apr 30 17:33:02 2007 -0600
@@ -1001,6 +1001,8 @@ class XendConfig(dict):
                         # Compat hack -- this is the first disk, so mark it
                         # bootable.
                         dev_info['bootable'] = 1
+                    else:
+                        dev_info['bootable'] = 0
                     target['vbd_refs'].append(dev_uuid)
                     
             elif dev_type == 'vfb':
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][xend] Ensure bootable flag is set in internal xend config for tap devices, Jim Fehlig <=