Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
If the secret for remote image contains a character '/',The virt-inspector command could not parse the URL. After asked rjone's help,
he suggested replacing the ‘/‘ with ’%2f‘ as a temporary solution.
Version-Release number of selected component (if applicable):
libguestfs-1.36.3-3.el7.x86_64
How reproducible:
100%
Steps:
1.
#virt-inspector --format=raw -v -x -a rbd://libvirt:AQAnRRBZpEOYJhAA/rJEZap2KJAqOOAshIMJPg==.144.70:6789/libvirt-pool/rbd-sr.img
virt-inspector: --add: could not parse URI 'rbd://libvirt:AQAnRRBZpEOYJhAA/rJEZap2KJAqOOAshIMJPg==.144.70:6789/libvirt-pool/rbd-sr.img'
libguestfs: trace: close
libguestfs: closing guestfs handle 0x7f194ca4c750 (state 0)
2.
#virt-inspector --format=raw -a rbd://libvirt:AQAnRRBZpEOYJhAA%2frJEZap2KJAqOOAshIMJPg==.144.70:6789/libvirt-pool/rbd-sr.img
This command is executed successfully.
Expected results:
virt-inspector should parse the secret which contains '/' of remote image.
Additional info:
Comment 2Richard W.M. Jones
2017-05-12 09:27:30 UTC
Probably sufficient to have a docs fix. "/" has magical properties
in URLs and must be quoted, but when/how to quote it isn't obvious.
The URI follows the format of RFC 3986 [1] for URLs.
In particular, the userinfo part (i.e. user + password) is defined as following (see §3.2.1 in the RFC):
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
and the components are:
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded = "%" HEXDIG HEXDIG
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
So "/" is not allowed directly as character neither for the user name nor for the password, and thus it must be percent-encoded (see §2.1).
[1] https://tools.ietf.org/html/rfc3986
Hence this is not a bug, since "/" must be represented as "%2f" in both user name and password.
Verified with package:
libguestfs-1.36.6-2.el7.x86_64
Steps:
1. #man guestfish
-------------------------------------------------------------------
...
Note that the URIs follow the syntax of RFC 3986: in particular, there are restrictions on the allowed characters for the various components of the URI. Characters such as ":", "@", and "/" must be percent-encoded:
$ guestfish -a rbd://user:pass%40word[:port]/pool/disk
In this case, the password is "pass@word".
...
-------------------------------------------------------------------
Some datailed info has been added to man page. So verified this bug.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:0677