[libvirt] [PATCH] qemu: Set migration FD blocking

Since we switched from direct host migration scheme to the one, where we connect to the destination and then just pass a FD to a qemu, we have uncovered a qemu bug. Qemu expects migration FD to block. However, we are passing a nonblocking one which results in cryptic error messages like: qemu: warning: error while loading state section id 2 load of migration failed The bug is already known to Qemu folks, but we should workaround already released Qemus. Patch has been originally proposed by Stefan Hajnoczi <stefanha@gmail.com> --- src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 537b834..15f3cef 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2657,6 +2657,13 @@ qemuMigrationConnect(virQEMUDriverPtr driver, spec->dest.fd.qemu == -1) goto cleanup; + /* Migration expects a blocking FD */ + if (virSetBlocking(spec->dest.fd.qemu, true) < 0) { + virReportSystemError(errno, _("Unable to set FD %d blocking"), + spec->dest.fd.qemu); + goto cleanup; + } + ret = 0; cleanup: -- 1.8.1.5

On 03/26/2013 08:55 AM, Michal Privoznik wrote:
Since we switched from direct host migration scheme to the one, where we connect to the destination and then just pass a FD to a qemu, we have uncovered a qemu bug. Qemu expects migration FD to block. However, we are passing a nonblocking one which results in cryptic error messages like:
qemu: warning: error while loading state section id 2 load of migration failed
The bug is already known to Qemu folks, but we should workaround already released Qemus. Patch has been originally proposed by Stefan Hajnoczi <stefanha@gmail.com> --- src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks for figuring it all out! I definitely hit this one, while trying to help someone on IRC. ACK, and definitely 1.0.4 material. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 26.03.2013 17:08, Eric Blake wrote:
On 03/26/2013 08:55 AM, Michal Privoznik wrote:
Since we switched from direct host migration scheme to the one, where we connect to the destination and then just pass a FD to a qemu, we have uncovered a qemu bug. Qemu expects migration FD to block. However, we are passing a nonblocking one which results in cryptic error messages like:
qemu: warning: error while loading state section id 2 load of migration failed
The bug is already known to Qemu folks, but we should workaround already released Qemus. Patch has been originally proposed by Stefan Hajnoczi <stefanha@gmail.com> --- src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks for figuring it all out! I definitely hit this one, while trying to help someone on IRC.
ACK, and definitely 1.0.4 material.
Thanks, pushed to master. I wonder if it should be pushed to stable branches as well. Doug, Cole - what do you think? Michal

On Tue, Mar 26, 2013 at 11:20 AM, Michal Privoznik <mprivozn@redhat.com> wrote:
On 26.03.2013 17:08, Eric Blake wrote:
On 03/26/2013 08:55 AM, Michal Privoznik wrote:
Since we switched from direct host migration scheme to the one, where we connect to the destination and then just pass a FD to a qemu, we have uncovered a qemu bug. Qemu expects migration FD to block. However, we are passing a nonblocking one which results in cryptic error messages like:
qemu: warning: error while loading state section id 2 load of migration failed
The bug is already known to Qemu folks, but we should workaround already released Qemus. Patch has been originally proposed by Stefan Hajnoczi <stefanha@gmail.com> --- src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks for figuring it all out! I definitely hit this one, while trying to help someone on IRC.
ACK, and definitely 1.0.4 material.
Thanks, pushed to master. I wonder if it should be pushed to stable branches as well. Doug, Cole - what do you think?
Michal
Agreed. That's definitely a regression since we've switched and the patch is very straight forward. -- Doug Goldstein

On 03/26/2013 12:20 PM, Michal Privoznik wrote:
On 26.03.2013 17:08, Eric Blake wrote:
On 03/26/2013 08:55 AM, Michal Privoznik wrote:
Since we switched from direct host migration scheme to the one, where we connect to the destination and then just pass a FD to a qemu, we have uncovered a qemu bug. Qemu expects migration FD to block. However, we are passing a nonblocking one which results in cryptic error messages like:
qemu: warning: error while loading state section id 2 load of migration failed
The bug is already known to Qemu folks, but we should workaround already released Qemus. Patch has been originally proposed by Stefan Hajnoczi <stefanha@gmail.com> --- src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks for figuring it all out! I definitely hit this one, while trying to help someone on IRC.
ACK, and definitely 1.0.4 material.
Thanks, pushed to master. I wonder if it should be pushed to stable branches as well. Doug, Cole - what do you think?
What's the first affected libvirt version? - Cole

On 03/26/2013 02:52 PM, Cole Robinson wrote:
src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks for figuring it all out! I definitely hit this one, while trying to help someone on IRC.
ACK, and definitely 1.0.4 material.
Thanks, pushed to master. I wonder if it should be pushed to stable branches as well. Doug, Cole - what do you think?
What's the first affected libvirt version?
Going just by commit message summaries, I'm guessing Jirka's commit 32617617 in Aug 2011, or all libvirt back to 0.9.5. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 03/26/2013 05:04 PM, Eric Blake wrote:
On 03/26/2013 02:52 PM, Cole Robinson wrote:
src/qemu/qemu_migration.c | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks for figuring it all out! I definitely hit this one, while trying to help someone on IRC.
ACK, and definitely 1.0.4 material.
Thanks, pushed to master. I wonder if it should be pushed to stable branches as well. Doug, Cole - what do you think?
What's the first affected libvirt version?
Going just by commit message summaries, I'm guessing Jirka's commit 32617617 in Aug 2011, or all libvirt back to 0.9.5.
Thanks Eric, cherry-picked to 0.9.11-maint, 0.10.2-maint in progress. - Cole
participants (4)
-
Cole Robinson
-
Doug Goldstein
-
Eric Blake
-
Michal Privoznik