qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	qemu-block@nongnu.org, qemu-devel <qemu-devel@nongnu.org>,
	Hanna Reitz <hreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>
Subject: Re: [PATCH v5 2/8] python/machine: Handle QMP errors on close more meticulously
Date: Thu, 28 Oct 2021 11:35:43 -0400	[thread overview]
Message-ID: <CAFn=p-bdJ05=z6KBiHKsMSPjDAZoJ59iJjKGnRhZ97vasyz38g@mail.gmail.com> (raw)
In-Reply-To: <YXp05svPZwSXOA/d@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

On Thu, Oct 28, 2021, 6:01 AM Kevin Wolf <kwolf@redhat.com> wrote:

> Am 27.10.2021 um 19:49 hat John Snow geschrieben:
> > This reply is long, sorry.
>
> And after writing half of a very long reply myself, I noticed that I was
> just very confused, so sorry for making you write a long text for no
> real reason (well, at least for my first point - for the second one,
> your explanation was very helpful, so thanks for that).
>
> Somehow I ended up completely ignoring the context of the code (it's run
> as part of shutdown functions) and instead thought of the general
> condition of QMP connections going away anywhere in the code.
>
> I suppose this could be a relevant concern in an actually asynchronous
> client that may read from the socket (and encounter an error if the QEMU
> process has already gone away and closed the connection) at any time,
> but that's not what machine.py is meant for, at least not for now.
>
> So I'll just delete what I already wrote. This patch should be fine.
>
> Kevin
>

No problem. The cleanup path here is quite complex, so it wasn't clear that
there *wasn't* a problem.

I'd like to upgrade machine.py to use asyncio more natively for the console
socket and qmp layers in the future and help break it apart into smaller
pieces that are easier to reason about.

You're right, though, if/when this part becomes async then needing more
precision on when we mark a vm as defunct will become important.

Thanks for looking at it!

--js

>

[-- Attachment #2: Type: text/html, Size: 2246 bytes --]

  reply	other threads:[~2021-10-28 15:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 17:56 [PATCH v5 0/8] Switch iotests to using Async QMP John Snow
2021-10-26 17:56 ` [PATCH v5 1/8] python/machine: remove has_quit argument John Snow
2021-10-26 17:56 ` [PATCH v5 2/8] python/machine: Handle QMP errors on close more meticulously John Snow
2021-10-27 11:19   ` Kevin Wolf
2021-10-27 17:49     ` John Snow
2021-10-28 10:01       ` Kevin Wolf
2021-10-28 15:35         ` John Snow [this message]
2021-10-26 17:56 ` [PATCH v5 3/8] python/aqmp: Remove scary message John Snow
2021-10-26 17:56 ` [PATCH v5 4/8] iotests: Accommodate async QMP Exception classes John Snow
2021-10-26 17:56 ` [PATCH v5 5/8] iotests: Conditionally silence certain AQMP errors John Snow
2021-10-26 17:56 ` [PATCH v5 6/8] iotests/300: avoid abnormal shutdown race condition John Snow
2021-10-27 12:56   ` Kevin Wolf
2021-10-27 17:55     ` John Snow
2021-10-26 17:56 ` [PATCH v5 7/8] python/aqmp: Create sync QMP wrapper for iotests John Snow
2021-10-26 17:56 ` [PATCH v5 8/8] python, iotests: replace qmp with aqmp John Snow
2021-10-28 10:37 ` [PATCH v5 0/8] Switch iotests to using Async QMP Kevin Wolf
2021-10-28 14:48   ` John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFn=p-bdJ05=z6KBiHKsMSPjDAZoJ59iJjKGnRhZ97vasyz38g@mail.gmail.com' \
    --to=jsnow@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).