Commit 6d22ee2a authored by Leonardo Brás's avatar Leonardo Brás
Browse files

migration: Unregister yank if migration setup fails

Currently, if a qemu instance is started with "-incoming defer" and
an incorect parameter is passed to "migrate_incoming", it will print the
expected error and reply with "duplicate yank instance" for any upcoming
"migrate_incoming" command.

This renders current qemu process unusable, and requires a new qemu
process to be started before accepting a migration.

This is caused by a yank_register_instance() that happens in
qemu_start_incoming_migration() but is never reverted if any error
happens.

Solves this by unregistering the instance if anything goes wrong
in the function, allowing a new "migrate_incoming" command to be
accepted.

Fixes: b5eea99e ("migration: Add yank feature", 2021-01-13)
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1974366


Signed-off-by: Leonardo Brás's avatarLeonardo Bras <leobras@redhat.com>
parent 0add99ea
Pipeline #324849647 passed with stages
in 1 hour, 8 minutes, and 13 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment