vm-migration: improve debuggability on receiver for failed migrations

We cannot reliably send Request::abandon() on every kind of failure on
the sender side, as we might be in the middle of a memory transmission.
The receiver would not reliably know what to do with that. So instead,
when the receiver cannot read from the socket, we log that the migration
sender failed, which is the only likely cause of that failure.

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-06-29 11:20:32 +02:00
committed by Bo Chen
parent 81022ab087
commit 013981b649
5 changed files with 35 additions and 14 deletions
+3 -3
View File
@@ -3026,9 +3026,9 @@ impl Vm {
.context("Error sending memory fd")
.map_err(MigratableError::MigrateSend)?;
Response::read_from(socket)?.ok_or_error(MigratableError::MigrateSend(anyhow!(
"Error during memory fd migration"
)))?;
Response::read_from(socket)?.ok_or_fatal_error(MigratableError::MigrateSend(
anyhow!("Error during memory fd migration"),
))?;
}
Ok(())