All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH][xend] Ensure bootable flag is set in internal xend config for tap devices
Date: Mon, 30 Apr 2007 17:41:48 -0600	[thread overview]
Message-ID: <46367EBC.8030008@novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

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


[-- Attachment #2: xend_bootable_tap_device.patch --]
[-- Type: text/x-patch, Size: 1176 bytes --]

# HG changeset patch
# User Jim Fehlig <jfehlig@novell.com>
# 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@novell.com>

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':

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2007-04-30 23:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46367EBC.8030008@novell.com \
    --to=jfehlig@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.