mirror of
https://passt.top/passt
synced 2025-06-17 04:35:35 +02:00
vhost_user: Make source quit after reporting migration state
This will close all the sockets we currently have open in repair mode, and completes our migration tasks as source. If the hypervisor wants to have us back at this point, somebody needs to restart us. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
b899141ad5
commit
f3fe795ff5
1 changed files with 7 additions and 0 deletions
|
@ -1203,4 +1203,11 @@ void vu_control_handler(struct vu_dev *vdev, int fd, uint32_t events)
|
|||
|
||||
if (reply_requested)
|
||||
vu_send_reply(fd, &msg);
|
||||
|
||||
if (msg.hdr.request == VHOST_USER_CHECK_DEVICE_STATE &&
|
||||
vdev->context->device_state_result == 0 &&
|
||||
!vdev->context->migrate_target) {
|
||||
info("Migration complete, exiting");
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue