[libvirt] [PATCH 0/2] Improve error message for missing backing image format

Improve the error message and mention it in the news. Peter Krempa (2): util: storage: Link to knowledge base when reporting missing image backing format news: Mention problems with backing image format probing docs/news.xml | 13 +++++++++++++ src/util/virstoragefile.c | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) -- 2.24.1

Mention the knowledge base article which has tips how to fix the backing chain to work with current libvirt. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/virstoragefile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index e46ac99219..1397f532fd 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4979,7 +4979,8 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src, */ if (report_broken) { virReportError(VIR_ERR_OPERATION_INVALID, - _("format of backing image '%s' of image '%s' was not specified in the image metadata"), + _("format of backing image '%s' of image '%s' was not specified in the image metadata " + "(See https://libvirt.org/kbase/backing_chains.html for troubleshooting)"), src->backingStoreRaw, NULLSTR(src->path)); return -1; } -- 2.24.1

On Fri, Jan 10, 2020 at 12:29:45PM +0100, Peter Krempa wrote:
Mention the knowledge base article which has tips how to fix the backing chain to work with current libvirt.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/util/virstoragefile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index e46ac99219..1397f532fd 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4979,7 +4979,8 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src, */ if (report_broken) { virReportError(VIR_ERR_OPERATION_INVALID, - _("format of backing image '%s' of image '%s' was not specified in the image metadata"), + _("format of backing image '%s' of image '%s' was not specified in the image metadata " + "(See https://libvirt.org/kbase/backing_chains.html for troubleshooting)"), src->backingStoreRaw, NULLSTR(src->path)); return -1;
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|

Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/news.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 1af57f8af0..4f1bea4fb5 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -88,6 +88,19 @@ </change> </section> <section title="Bug fixes"> + <change> + <summary> + qemu: Report error if backing image format is not specified explicitly + </summary> + <description> + For a long time libvirt was assuming that a backing file is RAW when + the format was not specified. This didn't pose a problem until blockdev + support was enabled in last release. Libivrt now requires that + the format is specified in the image metadata or domain XML and the + VM will refuse to start otherwise. Additionally the error message + now links to the knowledge base which summarizes how to fix the images. + </description> + </change> </section> <section title="Removed features"> <change> -- 2.24.1

On Fri, Jan 10, 2020 at 12:29:46PM +0100, Peter Krempa wrote:
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/news.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml index 1af57f8af0..4f1bea4fb5 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -88,6 +88,19 @@ </change> </section> <section title="Bug fixes"> + <change> + <summary> + qemu: Report error if backing image format is not specified explicitly + </summary> + <description> + For a long time libvirt was assuming that a backing file is RAW when + the format was not specified. This didn't pose a problem until blockdev + support was enabled in last release. Libivrt now requires that + the format is specified in the image metadata or domain XML and the + VM will refuse to start otherwise. Additionally the error message + now links to the knowledge base which summarizes how to fix the images. + </description> + </change> </section> <section title="Removed features"> <change>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|
participants (2)
-
Daniel P. Berrangé
-
Peter Krempa