On Mon, Jan 8, 2018 at 4:48 PM Kevin Wolf <kw...@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. 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. > 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. [1] https://gerrit.ovirt.org/85874/ Nir