[libvirt] tunnelled migration with libvirt 0.9.0

Hi, is tunnelled migration with libvirt 0.9.0 and qemu-kvm 0.14.0 broken ? all I get is an error "unknown migration protocol" while looking at the code in src/qemu/qemu_migration.c src/qemu/qemu_migration.c: /* Start the QEMU daemon, with the same command-line arguments plus * -incoming stdin (which qemu_command might convert to exec:cat or fd:n) */ internalret = qemuProcessStart(dconn, driver, vm, "stdin", true, dataFD[1], NULL, VIR_VM_OP_MIGRATE_IN_START); migrateFrom is set to "stdin" but in src/qemu/qemu_command.c there is no such match which ends in the above error. Regards, Jason

At 04/20/2011 05:41 PM, Jason Krieg Write:
Hi,
is tunnelled migration with libvirt 0.9.0 and qemu-kvm 0.14.0 broken ?
all I get is an error "unknown migration protocol"
while looking at the code in src/qemu/qemu_migration.c
src/qemu/qemu_migration.c:
/* Start the QEMU daemon, with the same command-line arguments plus * -incoming stdin (which qemu_command might convert to exec:cat or fd:n) */ internalret = qemuProcessStart(dconn, driver, vm, "stdin", true, dataFD[1], NULL, VIR_VM_OP_MIGRATE_IN_START);
migrateFrom is set to "stdin" but in src/qemu/qemu_command.c there is no such match which ends in the above error.
Yes, the tunnelled migration has been broken. Please applied the following patch and try it again:
From 55dac9d193644b7957ea730b8739633cd185d494 Mon Sep 17 00:00:00 2001 From: Wen Congyang <wency@cn.fujitsu.com> Date: Wed, 20 Apr 2011 18:20:12 +0800 Subject: [PATCH] fix tunnelled migration's regression
If the migrateFrom is "stdio" not "stdin", qemuBuildCommandLine() will convert it to exec:cat or fd:n. --- src/qemu/qemu_migration.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 43741e1..bba76d5 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -316,9 +316,9 @@ qemuMigrationPrepareTunnel(struct qemud_driver *driver, goto endjob; } /* Start the QEMU daemon, with the same command-line arguments plus - * -incoming stdin (which qemu_command might convert to exec:cat or fd:n) + * -incoming stdio (which qemu_command might convert to exec:cat or fd:n) */ - internalret = qemuProcessStart(dconn, driver, vm, "stdin", true, dataFD[1], + internalret = qemuProcessStart(dconn, driver, vm, "stdio", true, dataFD[1], NULL, VIR_VM_OP_MIGRATE_IN_START); if (internalret < 0) { qemuAuditDomainStart(vm, "migrated", false); -- 1.7.1
Regards, Jason
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 04/20/2011 12:23 PM, Wen Congyang wrote:
At 04/20/2011 05:41 PM, Jason Krieg Write:
Hi,
is tunnelled migration with libvirt 0.9.0 and qemu-kvm 0.14.0 broken ?
all I get is an error "unknown migration protocol"
while looking at the code in src/qemu/qemu_migration.c
src/qemu/qemu_migration.c:
/* Start the QEMU daemon, with the same command-line arguments plus * -incoming stdin (which qemu_command might convert to exec:cat or fd:n) */ internalret = qemuProcessStart(dconn, driver, vm, "stdin", true, dataFD[1], NULL, VIR_VM_OP_MIGRATE_IN_START);
migrateFrom is set to "stdin" but in src/qemu/qemu_command.c there is no such match which ends in the above error. Yes, the tunnelled migration has been broken.
Please applied the following patch and try it again:
From 55dac9d193644b7957ea730b8739633cd185d494 Mon Sep 17 00:00:00 2001 From: Wen Congyang<wency@cn.fujitsu.com> Date: Wed, 20 Apr 2011 18:20:12 +0800 Subject: [PATCH] fix tunnelled migration's regression
If the migrateFrom is "stdio" not "stdin", qemuBuildCommandLine() will convert it to exec:cat or fd:n.
--- src/qemu/qemu_migration.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 43741e1..bba76d5 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -316,9 +316,9 @@ qemuMigrationPrepareTunnel(struct qemud_driver *driver, goto endjob; } /* Start the QEMU daemon, with the same command-line arguments plus - * -incoming stdin (which qemu_command might convert to exec:cat or fd:n) + * -incoming stdio (which qemu_command might convert to exec:cat or fd:n) */ - internalret = qemuProcessStart(dconn, driver, vm, "stdin", true, dataFD[1], + internalret = qemuProcessStart(dconn, driver, vm, "stdio", true, dataFD[1], NULL, VIR_VM_OP_MIGRATE_IN_START); if (internalret< 0) { qemuAuditDomainStart(vm, "migrated", false);
that was my first guess but it does not work the remote monitor socket does not show up libvirt is running as root so it should not be a permission problem qemuMonitorOpenUnix:289 : monitor socket did not show up.: Connection refused qemuProcessWaitForMonitor:1059 : internal error process exited while connecting to monitor: Migration failed. Exit code fd:14(-22), exiting.

On 04/20/2011 05:13 AM, Jason Krieg wrote:
that was my first guess but it does not work the remote monitor socket does not show up
libvirt is running as root so it should not be a permission problem
qemuMonitorOpenUnix:289 : monitor socket did not show up.: Connection refused qemuProcessWaitForMonitor:1059 : internal error process exited while connecting to monitor: Migration failed. Exit code fd:14(-22), exiting.
Exit code fd:14(-22) is EBADF on fd 14; I've seen it in the past when we were incorrectly leaving FD_CLOEXEC set on fd 14, but I don't see how that would be possible in the code path for qemuMigrationPrepareTunnel. I'll have to see if I can reproduce this. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Wed, Apr 20, 2011 at 07:06:33AM -0600, Eric Blake wrote:
On 04/20/2011 05:13 AM, Jason Krieg wrote:
that was my first guess but it does not work the remote monitor socket does not show up
libvirt is running as root so it should not be a permission problem
qemuMonitorOpenUnix:289 : monitor socket did not show up.: Connection refused qemuProcessWaitForMonitor:1059 : internal error process exited while connecting to monitor: Migration failed. Exit code fd:14(-22), exiting.
Exit code fd:14(-22) is EBADF on fd 14; I've seen it in the past when we were incorrectly leaving FD_CLOEXEC set on fd 14, but I don't see how that would be possible in the code path for qemuMigrationPrepareTunnel.
The problem is that '-incoming fd:NNN' wants a file descriptor *read* from, but we're passing it the *write* end of the pipe. Thus fopen(fd, "rb") fails with EINVAL Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 04/20/2011 04:23 AM, Wen Congyang wrote:
migrateFrom is set to "stdin" but in src/qemu/qemu_command.c there is no such match which ends in the above error.
Yes, the tunnelled migration has been broken.
Aargh - another typo strikes my patches. :(
Please applied the following patch and try it again:
From 55dac9d193644b7957ea730b8739633cd185d494 Mon Sep 17 00:00:00 2001 From: Wen Congyang <wency@cn.fujitsu.com> Date: Wed, 20 Apr 2011 18:20:12 +0800 Subject: [PATCH] fix tunnelled migration's regression
If the migrateFrom is "stdio" not "stdin", qemuBuildCommandLine() will convert it to exec:cat or fd:n.
--- src/qemu/qemu_migration.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
ACK, please apply. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

At 2011-4-20 21:01, Eric Blake write:
On 04/20/2011 04:23 AM, Wen Congyang wrote:
migrateFrom is set to "stdin" but in src/qemu/qemu_command.c there is no such match which ends in the above error.
Yes, the tunnelled migration has been broken.
Aargh - another typo strikes my patches. :(
Please applied the following patch and try it again:
From 55dac9d193644b7957ea730b8739633cd185d494 Mon Sep 17 00:00:00 2001 From: Wen Congyang<wency@cn.fujitsu.com> Date: Wed, 20 Apr 2011 18:20:12 +0800 Subject: [PATCH] fix tunnelled migration's regression
If the migrateFrom is "stdio" not "stdin", qemuBuildCommandLine() will convert it to exec:cat or fd:n.
--- src/qemu/qemu_migration.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
ACK, please apply.
Thanks. Applied.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 04/20/2011 08:55 AM, Wen Congyang wrote:
If the migrateFrom is "stdio" not "stdin", qemuBuildCommandLine() will convert it to exec:cat or fd:n.
--- src/qemu/qemu_migration.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
ACK, please apply.
Thanks. Applied.
Except that your committer setup was broken, and produced an invalid email address (using spaces instead of . and @), which resulted in 'make syntax-check' complaining. I've pushed a correction to .mailmap under the build-breaker rule. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (5)
-
Daniel P. Berrange
-
Eric Blake
-
Jason Krieg
-
Wen Congyang
-
Wen Congyang