On 02/12/20 14:10, Dr. David Alan Gilbert wrote:
I'm more worried about how this stops a repeated 'migrate incoming'
or a 'migrate_incoming' that's issued following a qemu that's been
started with -incoming tcp:... but which a socket hasn't yet connected
to.
Good question, fortunately it is simply handled answer:
void qmp_migrate_incoming(const char *uri, Error **errp)
{
Error *local_err = NULL;
static bool once = true;
if (!once) {
error_setg(errp, "The incoming migration has already been
started");
return;
}
if (!runstate_check(RUN_STATE_INMIGRATE)) {
error_setg(errp, "'-incoming' was not specified on the command
line");
return;
}
qemu_start_incoming_migration(uri, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
}
once = false;
}
This patch can simplify things because every incoming migrations (no
matter if '-incoming defer' or '-incoming tcp:...') goes through the
qmp_migrate_incoming function above.
Paolo