On 18/07/13 19:47, Shriram Rajagopalan
wrote:
(Logically joining the two divergent threads, as this is the answer
to both)
This has nothing to do with the buffering mode, and that is not
where the Qemu record would be obtained from.
As the code currently stands, if a XC_SAVE_ID_LAST_CHECKPOINT chunk
is not seen in the stream, we complete the loadpages: section,
including the magic pages (TSS, console info etc).
We then read the buffer_tail() on line 171, set ctx->completed on
line 1725, but fail the ctx->last_checkpoint check on line 1758.
What we should do is pass the last_checkpoint test, and goto finish
which then calls dump_qemu(). What actually happens is a call to
pagebuf_get() on line 1766 which raises an error because of finding
a Qemu save record rather than more pages.
So this is very much a bug directly introduced by 00a4b65f85, and
can only be fixed with knowledge from the higher levels of the
toolstack.
As for the wording of the parameter, I still prefer the original "last_checkpoint_unaware"
over "checkpointed_stream" as it is more accurate.
Any migration stream started from a version of the tools after c/s
00a4b65f85 will work, whether it is checkpointed or not (as the
XC_SAVE_ID_LAST_CHECKPOINT chunk will be sent in the correct
place). Any migration started from a version of the tools before
c/s 00a4b65f85 will fail because it has no idea that the receiving
end is expecting it to insert XC_SAVE_ID_LAST_CHECKPOINT chunk. The
fault here is with the receiving end expecting to find a
XC_SAVE_ID_LAST_CHECKPOINT chunk.
The only fix is for newer toolstack to be aware that the migration
stream is from an older toolstack, and to set
last_checkpoint_unaware=1, which will set ctx->last_checkpoint to
1, allowing the receiving side of the migration to correctly read
the migration stream.
~Andrew
|