On 09/11/14 21:03, Richard W.M. Jones wrote:
On Thu, Sep 11, 2014 at 07:47:46PM +0200, Peter Krempa wrote:
> Peter Krempa (6):
> util: Add function to check if a virStorageSource is "empty"
> qemu: Drop unused formatting of uuid
> util: storage: Allow metadata crawler to report useful errors
> qemu: Report better errors from broken backing chains
> storage: Improve error message when traversing backing chains
> qemu: Improve check for local storage
>
> src/libvirt_private.syms | 1 +
> src/qemu/qemu_domain.c | 38 ++++++--------------------------------
> src/qemu/qemu_process.c | 5 ++---
> src/security/virt-aa-helper.c | 2 +-
> src/storage/storage_driver.c | 40 +++++++++++++++++++++++++++++-----------
> src/storage/storage_driver.h | 3 ++-
> src/util/virstoragefile.c | 20 ++++++++++++++++++++
> src/util/virstoragefile.h | 1 +
> tests/virstoragetest.c | 2 +-
> 9 files changed, 63 insertions(+), 49 deletions(-)
I don't suppose you found a way to test this? I'd like to, but it's
difficult (especially without qemu:///session working as root).
I actually tested it. It's far simpler to hit than just with permission
problems. This also improves error messages for missing backing chain
members.
I was just in a hurry to post it before leaving so I forgot to add an
example of the errors:
If your disk image is missing/inaccessible/whatever :
$ virsh start dom
error: Failed to start domain dom
error: Cannot access storage file '/home/pipo/libvirt/dsdf.img' (as
uid:0, gid:0): No such file or directory
If a backing image of a file isn't accessible:
$ virsh start dom
error: Failed to start domain dom
error: Cannot access backing file '/home/pipo/libvirt/asdf.img' of
storage file '/home/pipo/libvirt/dsdf.img' (as uid:0, gid:0): No such
file or directory
And currently with a file with a unknown backing protocol:
$ virsh start dom
error: Failed to start domain dom
error: internal error: invalid backing protocol 'json'
I'll have to fire up a VM with a patched libvirtd at some point,
but
not today.
Rich.
Peter