fix tempurl's valid check

Bug #1747384 reported by yan97ao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
New
Undecided
Unassigned
python-swiftclient
Invalid
Undecided
Unassigned

Bug Description

While using radosgw as ironic images backend[1], ironic will generate swift temp url like /{api_version}/{container}/{object_id}[2]
And swiftclient will check tempurl for valid object path[3]
"If the supplied path is not of the form /v1/a/c/o then swift tempurl subcommand will now return an error message."[4]

This conflict and lead to an error when create a baremetal instance[5]

[1] https://docs.openstack.org/ironic/pike/admin/radosgw.html
[2] https://github.com/openstack/ironic/blob/214b694f05d200ac1e2ce6db631546f2831c01f7/ironic/common/glance_service/v2/image_service.py#L164
[3] https://github.com/openstack/python-swiftclient/blob/73f0259dbc847eee027f76a9e867fe8c53bf9918/swiftclient/utils.py#L141
[4] https://review.openstack.org/#/c/367377/
[5] https://bugs.launchpad.net/ironic/+bug/1704497

Revision history for this message
Fan Zhang (fanzhang) wrote :

I guess it's either a ironic bug, or swiftclient bug. Looks you've got the answer. Hope someone from swiftclien team would work on it :)

Revision history for this message
Matthew Thode (prometheanfire) wrote :

https://github.com/openstack/python-swiftclient/commit/4c955751d340a8f71a2eebdb3c58d90b36874a66#diff-65fb059e01befb2bd60268c230a0c989R103

broken in that commit on that line

radosgw expects this format /v1/container/object but swiftclient only supports /v1/account/container/object since the above commit. Which is in ocata+

Revision history for this message
John Dickinson (notmyname) wrote :

/v1/container/object is not a valid Swift URL for temporary URLs. (Pedantically, it *is* a valid url, but it refers to an account named "container" and a container named "object".) Temporary URLs must refer to a specific object or a set of objects with a common prefix. This requires the signed URL to be of the form `/v1/{acct}/{container}/{object or prefix}`.

Changed in python-swiftclient:
status: New → Invalid
Revision history for this message
John Dickinson (notmyname) wrote :
Revision history for this message
Matthew Thode (prometheanfire) wrote :

I can't close this as invalid, but with a ceph config change rgw accepts and uses the `/v1/a/c/o` format.

ceph_conf_overrides_rgw_extra:
  rgw_swift_account_in_url: true

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.