qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Nir Soffer <nirsof@gmail.com>
Cc: Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>, Ala Hino <ahino@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U
Date: Mon, 8 Jan 2018 18:57:29 +0100	[thread overview]
Message-ID: <20180108175729.GI8052@localhost.localdomain> (raw)
In-Reply-To: <CAMr-obsaegU2HDaH3EFoD+2EYUnPKuqsvQPk4GZ7hTdqXmpoWA@mail.gmail.com>

Am 08.01.2018 um 18:07 hat Nir Soffer geschrieben:
> On Mon, Jan 8, 2018 at 4:48 PM Kevin Wolf <kwolf@redhat.com> wrote:
> 
> > Am 05.01.2018 um 07:55 hat Fam Zheng geschrieben:
> > > Management and users are accustomed to "qemu-img info" to query status of
> > > images even when they are used by guests. Since image locking was added,
> > the -U
> > > (--force-share) option is needed for that to work. The reason has been
> > that due
> > > to possible race with image header update, the output can be misleading.
> > >
> > > But what are likely to happen after we emit the error are that, for
> > interactive
> > > users, '-U' will be used and the command retried; for management (nova,
> > RHV,
> > > etc.), the operation is broken with no knob to workaround this.
> > >
> > > This series changes that error to a warning so that it doesn't get in
> > the way.
> >
> > Are management tools actually doing this? There is no good reason to
> > call 'qemu-img info' for an image that is in use by a VM.
> >
> 
> Yes, ovirt/RHV is using this to get the qcow2 compat of an image since 4.1.
> 
> We asked about this here and in private mail, and there was an
> agreement that using qemu-img info on an image is safe for this
> purpose. We know that accessing image header when a guest is using is
> may be racy, but we control both the guest and the image. Nobody is
> modifying the image properties behind our back.

Yes, it's probably safe enough, though it's clearly a case for -U rather
than allowing it unconditionally.

> In 4.2 we will use the new flags[1], but  we cannot fix released code.
> Introducing this locking in qemu-img info will break existing
> installations.

We should have the proper deprecation process and printed a warning for
two releases. Anyway, it's too late for this and now we've already had
two releases where this was a hard error.

I'm not sure if going back to the old behaviour for a while now would be
helpful, you'd just end up with an even more confusing set of qemu
versions, for example:

    <= 2.9          - works without a warning
    2.10 and 2.11   - errors out
    2.12            - prints a warning, but works
    >= 2.13         - errors out again

Is it expected that you use old oVirt versions with newer qemu versions?
If so, why didn't we already notice this with the 2.10 release?
Basically I think it's reasonable to expect that new qemu versions may
require new management versions, too. We try to stay compatible, but
sometimes that just doesn't quite work out as we'd like.

> > If no, NACK. Automatically disabling locking because it can be
> > inconvenient defeats the purpose of locking.
> >
> > If yes, clearly indicate that this usage is deprecated and we'll turn
> > this into an error again with 2.13. Then management tools can be fixed
> > in time.
> 
> 
> This will work for us in general, but I'm not sure that when 2.13 will
> be released, no user will run code assuming the previous behavior. It
> will be best to wait with incompatible changes like this to next major
> version.

qemu doesn't currently use a versioning schema that works like that. Our
deprecation policy is to print a warning for two releases before the
feature is removed or changed incompatibly.

We messed this up this time, but the two releases after the change are
already over, so chances are that nobody would have noticed the problem
in time even if we hadn't messed up.

Kevin

  reply	other threads:[~2018-01-08 17:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05  6:55 [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U Fam Zheng
2018-01-05  6:55 ` [Qemu-devel] [PATCH 1/2] qemu-img: Move img_open error reporting to callers Fam Zheng
2018-01-05 16:03   ` Eric Blake
2018-01-05  6:55 ` [Qemu-devel] [PATCH 2/2] qemu-img: info: try -U automatically Fam Zheng
2018-01-05 16:08   ` Eric Blake
2018-01-08 14:41 ` [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U Kevin Wolf
2018-01-08 17:07   ` [Qemu-devel] [Qemu-block] " Nir Soffer
2018-01-08 17:57     ` Kevin Wolf [this message]
2018-01-09  6:24       ` Fam Zheng
2018-01-09  9:58         ` Kevin Wolf
2018-01-09 19:58           ` Ala Hino
2018-01-09 20:11             ` Eric Blake
2018-01-09 20:29               ` Ala Hino
2018-01-10 12:51       ` Daniel P. Berrange
2018-01-10 12:49   ` [Qemu-devel] " Daniel P. Berrange
2018-01-10 14:07     ` Kevin Wolf
2018-01-10 14:13       ` Daniel P. Berrange
2018-01-10 14:03   ` Kashyap Chamarthy
2018-01-10 16:43     ` [Qemu-devel] [Qemu-block] " Nir Soffer
2018-01-11  9:26       ` Kashyap Chamarthy

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=20180108175729.GI8052@localhost.localdomain \
    --to=kwolf@redhat.com \
    --cc=ahino@redhat.com \
    --cc=famz@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nirsof@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).