All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] xend: don't drop device config on domain start failure
Date: Wed, 21 Apr 2010 19:55:37 -0600	[thread overview]
Message-ID: <4BCFAC99.8010102@novell.com> (raw)

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

If domain creation in xend fails before devices are configured, e.g.
insufficient memory, device config is dropped from xend's managed domain
config.

# cat
/var/lib/xend/domains/70c7bace-af44-1343-1e8f-a6e149632f4a/config.sxp |
grep device
            (device_model /usr/lib/xen/bin/qemu-dm)
            (device_model /usr/lib/xen/bin/qemu-dm)
    (device
    (device (vkbd (backend 0)))
    (device
    (device
    (device
# xm start test1
Error: I need 4194816 KiB, but dom0_min_mem is 524288 and shrinking to
524288 KiB would leave only 3568556 KiB free.
# cat
/var/lib/xend/domains/70c7bace-af44-1343-1e8f-a6e149632f4a/config.sxp |
grep device
            (device_model /usr/lib/xen/bin/qemu-dm)
            (device_model /usr/lib/xen/bin/qemu-dm)

Once xend is restarted, the domain's devices are lost.

The attached patch fixes a bug in XendConfig where only the device
controller was consulted for device configuration.

Regards,
Jim

    Signed-off-by: Jim Fehlig <jfehlig@novell.com>


[-- Attachment #2: xend-preserve-devs.patch --]
[-- Type: text/x-patch, Size: 686 bytes --]

Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py
+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py
@@ -1173,8 +1173,8 @@ class XendConfig(dict):
                                     config.append(['VDI', dev_cfg.get('VDI', '')])
 
                                 sxpr.append(['device', config])
+                                found = True
 
-                            found = True
                         except:
                             log.exception("dumping sxp from device controllers")
                             pass

[-- 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:[~2010-04-22  1:55 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=4BCFAC99.8010102@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.