All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xen.org
Cc: Ian.Campbell@citrix.com
Subject: [PATCH 6 of 6] tools/xend: move assert to exception block
Date: Mon, 18 Mar 2013 17:40:11 +0100	[thread overview]
Message-ID: <07a436dc7cbd710f219f.1363624811@probook.site> (raw)
In-Reply-To: <patchbomb.1363624805@probook.site>

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1363624025 -3600
# Node ID 07a436dc7cbd710f219f9728704b5e8de8de0a39
# Parent  9e5bec95fd04a05d0b009adcc3f10f635ab638be
tools/xend: move assert to exception block

The two assert in restore trigger sometimes after hundreds of
migrations. If they trigger the destination host will not destroy the
newly created, still empty guest. After a second migration attempt to
this host there will be two guets with the same name and uuid. This
situation is poorly handled by the xm tools.
With this change the guest will be destroyed.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 9e5bec95fd04 -r 07a436dc7cbd tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py
+++ b/tools/python/xen/xend/XendCheckpoint.py
@@ -262,9 +262,6 @@ def restore(xd, fd, dominfo = None, paus
     store_port   = dominfo.getStorePort()
     console_port = dominfo.getConsolePort()
 
-    assert store_port
-    assert console_port
-
     # if hvm, pass mem size to calculate the store_mfn
     if is_hvm:
         apic = int(dominfo.info['platform'].get('apic', 0))
@@ -276,6 +273,9 @@ def restore(xd, fd, dominfo = None, paus
         pae  = 0
 
     try:
+        assert store_port
+        assert console_port
+
         restore_image = image.create(dominfo, dominfo.info)
         memory = restore_image.getRequiredAvailableMemory(
             dominfo.info['memory_dynamic_max'] / 1024)

      parent reply	other threads:[~2013-03-18 16:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 16:40 [PATCH 0 of 6] set migrate constraints from cmdline, better xend.log logging Olaf Hering
2013-03-18 16:40 ` [PATCH 1 of 6] tools/xc: print messages from xc_save with xc_report Olaf Hering
2013-03-18 16:40 ` [PATCH 2 of 6] tools/xc: document printf calls in xc_restore Olaf Hering
2013-03-18 16:40 ` [PATCH 3 of 6] tools/xc: rework xc_save.c:switch_qemu_logdirty Olaf Hering
2013-03-18 16:40 ` [PATCH 4 of 6] tools: set migration constraints from cmdline Olaf Hering
2013-03-18 16:40 ` [PATCH 5 of 6] tools: add xm migrate --log_progress option Olaf Hering
2013-03-18 16:40 ` Olaf Hering [this message]

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=07a436dc7cbd710f219f.1363624811@probook.site \
    --to=olaf@aepfle.de \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.