Skip to content
  • Hanna Czenczek's avatar
    81624867
    block: Be more verbose in create fallback · 81624867
    Hanna Czenczek authored
    For image creation code, we have central fallback code for protocols
    that do not support creating new images (like NBD or iscsi).  So for
    them, you can only specify existing paths/exports that are overwritten
    to make clean new images.  In such a case, if the given path cannot be
    opened (assuming a pre-existing image there), we print an error message
    that tries to describe what is going on: That with this protocol, you
    cannot create new images, but only overwrite existing ones; and the
    given path could not be opened as a pre-existing image.
    
    However, the current message is confusing, because it does not say that
    the protocol in question does not support creating new images, but
    instead that "image creation" is unsupported.  This can be interpreted
    to mean that `qemu-img create` will not work in principle, which is not
    true.  Be more verbose for clarity.
    
    Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2217204
    
    
    Signed-off-by: default avatarHanna Czenczek <hreitz@redhat.com>
    Message-ID: <20230720140024.46836-1-hreitz@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    81624867
    block: Be more verbose in create fallback
    Hanna Czenczek authored
    For image creation code, we have central fallback code for protocols
    that do not support creating new images (like NBD or iscsi).  So for
    them, you can only specify existing paths/exports that are overwritten
    to make clean new images.  In such a case, if the given path cannot be
    opened (assuming a pre-existing image there), we print an error message
    that tries to describe what is going on: That with this protocol, you
    cannot create new images, but only overwrite existing ones; and the
    given path could not be opened as a pre-existing image.
    
    However, the current message is confusing, because it does not say that
    the protocol in question does not support creating new images, but
    instead that "image creation" is unsupported.  This can be interpreted
    to mean that `qemu-img create` will not work in principle, which is not
    true.  Be more verbose for clarity.
    
    Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2217204
    
    
    Signed-off-by: default avatarHanna Czenczek <hreitz@redhat.com>
    Message-ID: <20230720140024.46836-1-hreitz@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading