qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] block/rbd: report a better error when namespace does not


From: Kevin Wolf
Subject: Re: [PATCH v2] block/rbd: report a better error when namespace does not exist
Date: Mon, 30 May 2022 13:21:26 +0200

Am 17.05.2022 um 09:10 hat Stefano Garzarella geschrieben:
> If the namespace does not exist, rbd_create() fails with -ENOENT and
> QEMU reports a generic "error rbd create: No such file or directory":
> 
>     $ qemu-img create rbd:rbd/namespace/image 1M
>     Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
>     qemu-img: rbd:rbd/namespace/image: error rbd create: No such file or 
> directory
> 
> Unfortunately rados_ioctx_set_namespace() does not fail if the namespace
> does not exist, so let's use rbd_namespace_exists() in qemu_rbd_connect()
> to check if the namespace exists, reporting a more understandable error:
> 
>     $ qemu-img create rbd:rbd/namespace/image 1M
>     Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
>     qemu-img: rbd:rbd/namespace/image: namespace 'namespace' does not exist
> 
> Reported-by: Tingting Mao <timao@redhat.com>
> Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks, applied to the block branch.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]