Bug 1092583
Summary: | guestfish removes query string from URI | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Matthew Booth <mbooth> |
Component: | libguestfs | Assignee: | Pino Toscano <ptoscano> |
Status: | NEW --- | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | ptoscano, rjones |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matthew Booth
2014-04-29 13:59:47 UTC
Note the API description: http://libguestfs.org/guestfs.3.html#guestfs_add_drive_opts Simple example of this: $ guestfish -x --ro -a 'http://example.com/test?q=1&s=2' |& grep example libguestfs: trace: add_drive "/test" "readonly:true" "protocol:http" "server:tcp:example.com" libguestfs: trace: disk_create "/tmp/libguestfsHD6cEm/overlay1" "qcow2" -1 "backingfile:http://example.com/test" Notice that the query string "?q=1&s=2" completely disappears. I think it ought to be added to the filename. Quoting may be a problem? There's another bug here too, which is that guestfish parses the username and password together. Note in the output above: "username:devel:password" The guestfs_add_drive_opts API has a "secret" parameter which is only used by RBD at the moment but is intended for passwords. We should probably use this for curl too. (In reply to Richard W.M. Jones from comment #1) > Note the API description: > > http://libguestfs.org/guestfs.3.html#guestfs_add_drive_opts > > Simple example of this: > > $ guestfish -x --ro -a 'http://example.com/test?q=1&s=2' |& grep example > libguestfs: trace: add_drive "/test" "readonly:true" "protocol:http" > "server:tcp:example.com" > libguestfs: trace: disk_create "/tmp/libguestfsHD6cEm/overlay1" "qcow2" -1 > "backingfile:http://example.com/test" > > Notice that the query string "?q=1&s=2" completely disappears. > I think it ought to be added to the filename. Quoting may be a > problem? Not sure about quoting, but for sure our URI parser discards the query string, so when creating the URL for qemu the result lacks it. Most probably we need a new optional argument in add-drive for the query string, otherwise the query string does not get past the URL string specified to guestfish and thus not even getting into the drive struct within the library. > There's another bug here too, which is that guestfish parses > the username and password together. Note in the output above: > > "username:devel:password" > > The guestfs_add_drive_opts API has a "secret" parameter which is > only used by RBD at the moment but is intended for passwords. We > should probably use this for curl too. Password handling fixed with https://www.redhat.com/archives/libguestfs/2014-May/msg00007.html (In reply to Pino Toscano from comment #2) > (In reply to Richard W.M. Jones from comment #1) > > There's another bug here too, which is that guestfish parses > > the username and password together. Note in the output above: > > > > "username:devel:password" > > > > The guestfs_add_drive_opts API has a "secret" parameter which is > > only used by RBD at the moment but is intended for passwords. We > > should probably use this for curl too. > > Password handling fixed with > https://www.redhat.com/archives/libguestfs/2014-May/msg00007.html ... and committed as https://github.com/libguestfs/libguestfs/commit/3633109ff35f1d0f6bc72ed129911db6c4ae5c8e which is in libguestfs >= 1.27.9. *** Bug 1232476 has been marked as a duplicate of this bug. *** |