From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Best practices to handle shared objects through qemu upgrades?
Date: Fri, 1 Nov 2019 18:09:03 +0100 [thread overview]
Message-ID: <20191101170903.GA13325@redhat.com> (raw)
In-Reply-To: <CAATJJ0JrJS108ehZ8VkcYvgeNXEqev8C5vf2a+31J1eJdZ92uA@mail.gmail.com>
On Fri, Nov 01, 2019 at 10:55:29AM +0100, Christian Ehrhardt wrote:
> On Fri, Nov 1, 2019 at 10:34 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Fri, Nov 01, 2019 at 08:14:08AM +0100, Christian Ehrhardt wrote:
> > > Hi everyone,
> > > we've got a bug report recently - on handling qemu .so's through
> > > upgrades - that got me wondering how to best handle it.
> > > After checking with Paolo yesterday that there is no obvious solution
> > > that I missed we agreed this should be brought up on the list for
> > > wider discussion.
> > > Maybe there already is a good best practise out there, or if it
> > > doesn't exist we might want to agree upon one going forward.
> > > Let me outline the case and the ideas brought up so far.
> > >
> > > Case
> > > - You have qemu representing a Guest
> > > - Due to other constraints e.g. PT you can't live migrate (which would
> > > be preferred)
> > > - You haven't used a specific shared object yet - lets say RBD storage
> > > driver as example
> > > - Qemu gets an update, packaging replaces the .so files on disk
> > > - The Qemu process and the .so files on disk now have a mismatch in $buildid
> > > - If you hotplug an RBD device it will fail to load the (now new) .so
> >
> > What happens when it fails to load ? Does the user get a graceful
> > error message or does QEMU abort ? I'd hope the former.
> >
>
> It is fortunately a graceful error message, here an example:
>
> $ virsh attach-device lateload curldisk.xml
> Reported issue happens on attach:
> root@b:~# virsh attach-device lateload cdrom-curl.xml
> error: Failed to attach device from cdrom-curl.xml
> error: internal error: unable to execute QEMU command 'device_add':
> Property 'virtio-blk-device.drive' can't find value
> 'drive-virtio-disk2'
Ok, that's graceful, but horrifically useless as an error message :-)
I'd like to think there would be a way to do better.
It looks like the 'drive-add' (or whatever we run to add the
backend) is failing, and then we blindly run device_add anyway.
This means either there's some error message printed that we
are missing, or QEMU is not reporting it back to the monitor.
Either way, I think this can be improved so that libvirt can
directly report the message you found hidden in the log:
>
> In the qemu output log we can see:
> Failed to initialize module: /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
> Note: only modules from the same build can be loaded.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-11-01 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 7:14 Best practices to handle shared objects through qemu upgrades? Christian Ehrhardt
2019-11-01 9:34 ` Daniel P. Berrangé
2019-11-01 9:55 ` Christian Ehrhardt
2019-11-01 17:09 ` Daniel P. Berrangé [this message]
2020-03-04 9:37 ` Christian Ehrhardt
2020-03-04 9:39 ` [PATCH] modules: load modules from versioned /var/run dir Christian Ehrhardt
2020-03-06 10:54 ` Stefan Hajnoczi
2020-03-06 13:27 ` Christian Ehrhardt
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=20191101170903.GA13325@redhat.com \
--to=berrange@redhat.com \
--cc=christian.ehrhardt@canonical.com \
--cc=pbonzini@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.