On Fri, Feb 07, 2025 at 03:15:48PM -0300, Fabiano Rosas wrote:
> >> + for (i = 0; i < migrate_multifd_channels(); i++) {
> >> + MultiFDSendParams *p = &multifd_send_state->params[i];
> >> +
> >> + /* thread_created implies the TLS handshake has succeeded */
> >> + if (p->tls_thread_created && p->thread_created) {
> >> + Error *local_err = NULL;
> >> + /*
> >> + * The destination expects the TLS session to always be
> >> + * properly terminated. This helps to detect a premature
> >> + * termination in the middle of the stream. Note that
> >> + * older QEMUs always break the connection on the source
> >> + * and the destination always sees
> >> + * GNUTLS_E_PREMATURE_TERMINATION.
> >> + */
> >> + migration_tls_channel_end(p->c, &local_err);
> >> +
> >> + if (local_err) {
> >> + /*
> >> + * The above can fail with broken pipe due to a
> >> + * previous migration error, ignore the error.
> >> + */
> >> + assert(migration_has_failed(migrate_get_current()));
> >
> > Considering this is still src, do we want to be softer on this by
> > error_report?
> >
> > Logically !migration_has_failed() means it succeeded, so we can throw src
> > qemu way now, that shouldn't be a huge deal. More of thinking out loud kind
> > of comment.. Your call.
> >
>
> Maybe even a warning? If at this point migration succeeded, it's probably
> best to let cleanup carry on.
Yep, warning sounds good too.
--
Peter Xu