Peter Xu <pet...@redhat.com> writes:

> On Wed, Sep 17, 2025 at 05:56:40PM -0300, Fabiano Rosas wrote:
>> Peter Xu <pet...@redhat.com> writes:
>> 
>> > On Wed, Sep 10, 2025 at 12:01:41PM -0400, Peter Xu wrote:
>> >> Fabiano fixed graceful shutdowns for multifd channels previously:
>> >> 
>> >> https://lore.kernel.org/qemu-devel/20250206175824.22664-1-faro...@suse.de/
>> >> 
>> >> However we likely forgot the rest channels.  Do it the same for the main
>> >> and postcopy channels.  This fixes a warning message when running unit 
>> >> test
>> >> /ARCH/migration/postcopy/preempt/tls/psk.
>> >> 
>> >> Thanks,
>> >> 
>> >> Peter Xu (3):
>> >>   migration/tls: Gracefully shutdown main and preempt channels
>> >>   migration: Make migration_has_failed() work even for CANCELLING
>> >>   migration/multifd: Use the new graceful termination helper
>> >
>> > Please hold off the review on this one.  Juraj reported the issue wasn't
>> > resolved by the changes, and I can also reproduce.  I'll have a look and
>> > repost..
>> 
>> I'm wondering if the assumption that only succeeded migrations should
>> gracefully exit is correct. My understanding is that we need to always
>> exit gracefully, but after failure, the channel might not be there, so
>> we ignore failures. But that does not seem to mean a failed migration
>> can simply not exit gracefully.
>
> Currently tls channels will ignore premature terminations whenever there's
> a shutdown() on READ.  So when failed / cancelled and whenever there's a
> shutdown(), iochannel already does the bypass no matter what migration does.
>

I'm thinking if it's possible for a premature termination to be detected
by TLS before we did the shutdown(). So my suggestion was to always
bye() before shutdown(), not matter the state migration is in. But maybe
your way is ok, I'm not sure now. Let me read the other versions of the
series...

> Or do you mean we should remove that, and still try to do graceful
> shutdowns even if the channel was shutdown()?
>
> Feel free to have a look at v2 of this series, especially patch 1. v3 will
> come soon, but just to say, v2 is hugely different from v1, and should be
> fairly close to upcoming v3, at least on patch 1 which is the real fix.
>

Ah, sorry, I didn't see the v2 on my list. But it's there.

> I should have mentioned that earlier.. :(

Reply via email to