qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: Max Reitz <mreitz@redhat.com>, Qemu-block <qemu-block@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	dgilbert@redhat.com, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] Aborts in iotest 169
Date: Thu, 24 Jan 2019 11:58:16 -0600	[thread overview]
Message-ID: <414cac93-6a32-3d17-67ec-bb02cdab068e@redhat.com> (raw)
In-Reply-To: <20190124101559.GC4601@localhost.localdomain>

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

On 1/24/19 4:15 AM, Kevin Wolf wrote:

>> But how to fix Qemu not to crash? May be, forbid some transitions (FINISH_MIGRATE -> RUNNING),
>>   or at least error-out qmp_cont if runstate is  FINISH_MIGRATE?
> 

> I wonder whether the QAPI schema should have a field 'run-states' for
> commands, and by default we would only include states where the VM has
> ownership of its resources (e.g. images are activated) and which are not
> temporary states that are automatically left, like finish-migrate.

We already have 'allow-oob' and 'allow-preconfig' flags on a per-command
basis; you're basically proposing that we extend this mechanism for
marking other attributes of commands,...

> 
> Then the default for commands is to be rejected in "unusual" runstates
> where we're not expecting user intervention, and we must explicitly
> allow them if they are okay, in fact.
> 
> Instead of listing every obscure runstate, maybe we should really use
> categories of runstates instead:
> 
> 1. Running
> 2. Paused, owns all resources (like disk images)
> 3. Paused, doesn't own some resources (source VM after migration
>    completes, destination before migration completes)
> 4. Paused temporarily for internal reasons (e.g. finish-migrate,
>    restore-vm, save-vm)
> 
> Most commands should be okay with 1 and 2, but possibly not 3, and
> almost never 4.

...then enforcing that commands are only executed according to the
attributes they have (where the default attributes match categories 1
and 2, and commands have to opt-in if they are safe to run in category 3
or 4 just like they have to opt-in for preconfig or oob usage).


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-01-24 17:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 15:48 [Qemu-devel] Aborts in iotest 169 Max Reitz
2019-01-23 16:04 ` Luiz Capitulino
2019-01-23 16:12   ` Max Reitz
2019-01-23 16:24     ` Luiz Capitulino
2019-01-23 16:35       ` Dr. David Alan Gilbert
2019-01-23 17:16         ` Max Reitz
2019-01-23 18:08           ` Dr. David Alan Gilbert
2019-01-24  8:08             ` Vladimir Sementsov-Ogievskiy
2019-01-24  9:29 ` Vladimir Sementsov-Ogievskiy
2019-01-24  9:49   ` Vladimir Sementsov-Ogievskiy
2019-01-24 10:10     ` Dr. David Alan Gilbert
2019-01-24 10:23       ` Vladimir Sementsov-Ogievskiy
2019-01-24 10:52         ` Dr. David Alan Gilbert
2019-01-24 10:15   ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2019-01-24 10:32     ` Vladimir Sementsov-Ogievskiy
2019-01-24 10:45       ` Kevin Wolf
2019-01-24 10:49     ` Dr. David Alan Gilbert
2019-01-24 11:58       ` Kevin Wolf
2019-01-24 20:15         ` Dr. David Alan Gilbert
2019-01-24 11:53     ` Vladimir Sementsov-Ogievskiy
2019-01-24 17:58     ` Eric Blake [this message]
2019-04-08 14:57 ` [Qemu-devel] " Vladimir Sementsov-Ogievskiy
2019-04-08 14:57   ` Vladimir Sementsov-Ogievskiy
2019-04-08 15:08   ` Max Reitz
2019-04-08 15:08     ` Max Reitz

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=414cac93-6a32-3d17-67ec-bb02cdab068e@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mreitz@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).