Skip to contentSkip to conversation

qemu: Improve error reporting when migration can't connect

Qemu-devel Cole Robinson 5 participants 7 messages Jun 3, 2010 – Feb 16, 2018

lore
Share & tools
lore
#0 lore raw

Public bug reported:

Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say there is no listening QEMU instance, or port is blocked by a firewall), all we get is info migrate -> Migration status: failed. This is all we have to report back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant message and strerror(). More info from 'info migrate' would be nice too, no idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs!

** Affects: qemu
Importance: Undecided
Status: New

Signature · 24 lines
qemu: Improve error reporting when migration can't connect
https://bugs.launchpad.net/bugs/589315
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say
there is no listening QEMU instance, or port is blocked by a firewall), all we
get is info migrate -> Migration status: failed. This is all we have to report
back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant
message and strerror(). More info from 'info migrate' would be nice too, no
idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs!
#1 lore raw

2010/6/4 Cole Robinson <[email protected]>:

Quoted 43 lines

Public bug reported:

Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say there is no listening QEMU instance, or port is blocked by a firewall), all we get is info migrate -> Migration status: failed. This is all we have to report back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant message and strerror(). More info from 'info migrate' would be nice too, no idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs!

** Affects: qemu
    Importance: Undecided
        Status: New

--
qemu: Improve error reporting when migration can't connect
https://bugs.launchpad.net/bugs/589315
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say there is no listening QEMU instance, or port is blocked by a firewall), all we get is info migrate -> Migration status: failed. This is all we have to report back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant message and strerror(). More info from 'info migrate' would be nice too, no idea how this will play with QMP though.

Quoted 6 lines

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs!

Hi,

Does the following patch fix the problem?

Thanks,

Yoshi

[PATCH] migration-tcp: call migrate_fd_error() instead of close() and free().

This patch fixes the following error report. When changing migration-tcp.c to call migrate_fd_error() instead of close() and free() by itself, monitor is resumed, and returns allocated mig_state is set to current_migration in migration.c allows us to print "info migrate".

--
qemu: Improve error reporting when migration can't connect
https://bugs.launchpad.net/bugs/589315
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say there is no listening QEMU instance, or port is blocked by a firewall), all we get is info migrate -> Migration status: failed. This is all we have to report back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant message and strerror(). More info from 'info migrate' would be nice too, no idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs! --

---
 migration-tcp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
migration-tcp.c +1 -3
index 95ce722..43af2e0 100644
@@ -128,9 +128,7 @@ MigrationState *tcp_start_outgoing_migration(Monitor *mon,
 
     if (ret < 0 && ret != -EINPROGRESS && ret != -EWOULDBLOCK) {
         DPRINTF("connect failed\n");
-        close(s->fd);
-        qemu_free(s);
-        return NULL;
+        migrate_fd_error(s);
     } else if (ret >= 0)
         migrate_fd_connect(s);
 
Signature · 1 line
1.7.0.31.g1df487
#2 lore raw
Quoted 55 lines · Yoshiaki Tamura

Hi,

Does the following patch fix the problem?

Thanks,

Yoshi

[PATCH] migration-tcp: call migrate_fd_error() instead of close() and free().

This patch fixes the following error report. When changing migration-tcp.c to call migrate_fd_error() instead of close() and free() by itself, monitor is resumed, and returns allocated mig_state is set to current_migration in migration.c allows us to print "info migrate".

--
qemu: Improve error reporting when migration can't connect
https://bugs.launchpad.net/bugs/589315
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say there is no listening QEMU instance, or port is blocked by a firewall), all we get is info migrate -> Migration status: failed. This is all we have to report back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant message and strerror(). More info from 'info migrate' would be nice too, no idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs! --

---
 migration-tcp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
migration-tcp.c +0 -0
index 95ce722..43af2e0 100644

migration-tcp.c MigrationState *tcp_start_outgoing_migration(Monitor *mon, · line 134

Quoted 10 lines
migration-tcp.c +1 -3
@@ -128,9 +128,7 @@ MigrationState *tcp_start_outgoing_migration(Monitor *mon,
 
     if (ret < 0 && ret != -EINPROGRESS && ret != -EWOULDBLOCK) {
         DPRINTF("connect failed\n");
-        close(s->fd);
-        qemu_free(s);
-        return NULL;
+        migrate_fd_error(s);
     } else if (ret >= 0)
         migrate_fd_connect(s);
 

Yes, this fixes the monitor hang. Thanks!

- Cole

#3 lore raw
In reply to Cole Robinson

** Changed in: qemu
Status: New => Confirmed

Signature · 24 lines
qemu: Improve error reporting when migration can't connect
https://bugs.launchpad.net/bugs/589315
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Confirmed

Bug description:
Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say
there is no listening QEMU instance, or port is blocked by a firewall), all we
get is info migrate -> Migration status: failed. This is all we have to report
back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant
message and strerror(). More info from 'info migrate' would be nice too, no
idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs!
#4 lore raw
In reply to Cole Robinson

** Changed in: qemu
Status: Confirmed => In Progress

Signature · 24 lines
qemu: Improve error reporting when migration can't connect
https://bugs.launchpad.net/bugs/589315
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: In Progress

Bug description:
Tested with upstream qemu as of Jun 3 2010

If the source qemu instance can't connect to the migration destination (say
there is no listening QEMU instance, or port is blocked by a firewall), all we
get is info migrate -> Migration status: failed. This is all we have to report
back to libvirt users if their firewall is misconfigured, which is crappy.

Ideally, if we can't connect, migration would fail immediately with a relevant
message and strerror(). More info from 'info migrate' would be nice too, no
idea how this will play with QMP though.

As a slightly related issue, try entering

migrate tcp:127.0.0.0:6000

We get a 'migration failed' error, and then the monitor hangs!
#5 lore raw
In reply to Cole Robinson

yep, it's been giving errors now for a while (and not hanging) and also recently gained the error text in 'info migrate':

[dgilbert@dgilbert-t530 ~]$ /usr/bin/qemu-system-x86_64 -nographic
QEMU 2.10.1 monitor - type 'help' for more information
(qemu) migrate tcp:0:12345
qemu-system-x86_64: Failed to connect socket: Connection refused
(qemu) info migrate
globals: store-global-state=1, only_migratable=0, send-configuration=1, send-section-footer=1
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: off return-path: off Migration status: failed (Failed to connect socket: Connection refused)
total time: 0 milliseconds
(qemu)

So marking as fix-release

(Note that there's a bug that causes a crash in the disconnect case on current head, but that's only been in for a week or so and I've just sent a fix for it).

Signature · 30 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/589315

Title:
  qemu: Improve error reporting when migration can't connect

Status in QEMU:
  In Progress

Bug description:
  Tested with upstream qemu as of Jun 3 2010

  If the source qemu instance can't connect to the migration destination (say
  there is no listening QEMU instance, or port is blocked by a firewall), all we
  get is info migrate -> Migration status: failed. This is all we have to report
  back to libvirt users if their firewall is misconfigured, which is crappy.

  Ideally, if we can't connect, migration would fail immediately with a relevant
  message and strerror(). More info from 'info migrate' would be nice too, no
  idea how this will play with QMP though.

  As a slightly related issue, try entering

  migrate tcp:127.0.0.0:6000

  We get a 'migration failed' error, and then the monitor hangs!

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/589315/+subscriptions
#6 lore raw
In reply to Cole Robinson

** Changed in: qemu
Status: In Progress => Fix Released

Signature · 30 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/589315

Title:
  qemu: Improve error reporting when migration can't connect

Status in QEMU:
  Fix Released

Bug description:
  Tested with upstream qemu as of Jun 3 2010

  If the source qemu instance can't connect to the migration destination (say
  there is no listening QEMU instance, or port is blocked by a firewall), all we
  get is info migrate -> Migration status: failed. This is all we have to report
  back to libvirt users if their firewall is misconfigured, which is crappy.

  Ideally, if we can't connect, migration would fail immediately with a relevant
  message and strerror(). More info from 'info migrate' would be nice too, no
  idea how this will play with QMP though.

  As a slightly related issue, try entering

  migrate tcp:127.0.0.0:6000

  We get a 'migration failed' error, and then the monitor hangs!

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/589315/+subscriptions