All replicas to be associated with a given glance ID. For example, a file:// swift:// and http:// physical location could be associated with a single glance ID. The consumer of this information (nova-compute) could then pick the one that best suites it. https://blueprints.launchpad.net/glance/+spec/multiple-image-locations
I missing information on the blueprint, this makes it difficult for us to come up with meaningful test plan, can you add information for the blueprint?
(In reply to Haim from comment #2) > I missing information on the blueprint, this makes it difficult for us to > come up with meaningful test plan, can you add information for the blueprint? I added this information on how to test this to the blueprint: User level test plan ------------------------------ 1) Install glance 2) add the following line to glance-api.conf show_multiple_locations = True 3) use glance client to 'show' an image with the v2 protocol: glance --os-image-api-version 2 image-show <image id> 4) see at least 1 location listed in the output please let me know if more is needed
Here is a sample session using curl that shows the following: 1) Add an image without a location 2) Add a http location 3) Add a file location 4) Look up the locations More v2 API commands are described here: https://etherpad.openstack.org/glance_v1_vs_v2 [jbresnah@localhost devstack]$ curl -i -X POST -H 'Content-Type: application/json' -H "X-Auth-Token: $AUTH" http://localhost:9292/v2/images -d '{"name": "my_image", "disk_format": "vhd", "container_format": "bare"}' HTTP/1.1 201 Created Content-Length: 452 Content-Type: application/json; charset=UTF-8 Location: http://localhost:9292/v2/images/41717c78-c926-47aa-922e-295596959e5b X-Openstack-Request-Id: req-cb438ca5-f083-44cf-b112-980b72fe017e Date: Thu, 08 Aug 2013 17:25:06 GMT {"status": "queued", "name": "my_image", "tags": [], "container_format": "bare", "created_at": "2013-08-08T17:25:06Z", "disk_format": "vhd", "updated_at": "2013-08-08T17:25:06Z", "visibility": "private", "self": "/v2/images/41717c78-c926-47aa-922e-295596959e5b", "protected": false, "id": "41717c78-c926-47aa-922e-295596959e5b", "file": "/v2/images/41717c78-c926-47aa-922e-295596959e5b/file", "min_disk": 0, "min_ram": 0, "schema": "/v2/schemas/image"}[jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ curl -i -X PATCH -H 'Content-Type: application/openstack-images-v2.1-json-patch' -H "X-Auth-Token: $AUTH" http://localhost:9292/v2/images/41717c78-c926-47aa-922e-295596959e5b -d '[{"op": "add", "path": "/locations/-", "value": {"url": "http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2", "metadata": {}}}]' HTTP/1.1 200 OK Content-Length: 549 Content-Type: application/json; charset=UTF-8 X-Openstack-Request-Id: req-754191db-2441-4929-bfb0-08935469a1fa Date: Thu, 08 Aug 2013 17:25:39 GMT {"status": "active", "name": "my_image", "tags": [], "container_format": "bare", "created_at": "2013-08-08T17:25:06Z", "disk_format": "vhd", "updated_at": "2013-08-08T17:25:39Z", "visibility": "private", "locations": [{"url": "http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2", "metadata": {}}], "self": "/v2/images/41717c78-c926-47aa-922e-295596959e5b", "protected": false, "id": "41717c78-c926-47aa-922e-295596959e5b", "file": "/v2/images/41717c78-c926-47aa-922e-295596959e5b/file", "min_disk": 0, "min_ram": 0, "schema": "/v2/schemas/image"}[jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ curl -i -X PATCH -H 'Content-Type: application/openstack-images-v2.1-json-patch' -H "X-Auth-Token: $AUTH" http://localhost:9292/v2/images/41717c78-c926-47aa-922e-295596959e5b -d '[{"op": "add", "path": "/locations/-", "value": {"url": "file:///etc/group", "metadata": {}}}]'HTTP/1.1 200 OK Content-Length: 595 Content-Type: application/json; charset=UTF-8 X-Openstack-Request-Id: req-4958f566-66bf-4a65-8fe0-43006d2040d2 Date: Thu, 08 Aug 2013 17:25:54 GMT {"status": "active", "name": "my_image", "tags": [], "container_format": "bare", "created_at": "2013-08-08T17:25:06Z", "disk_format": "vhd", "updated_at": "2013-08-08T17:25:54Z", "visibility": "private", "locations": [{"url": "http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2", "metadata": {}}, {"url": "file:///etc/group", "metadata": {}}], "self": "/v2/images/41717c78-c926-47aa-922e-295596959e5b", "protected": false, "id": "41717c78-c926-47aa-922e-295596959e5b", "file": "/v2/images/41717c78-c926-47aa-922e-295596959e5b/file", "min_disk": 0, "min_ram": 0, "schema": "/v2/schemas/image"}[jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$ curl -i -X GET -H 'Content-Type: application/openstack-images-v2.1-json-patch' -H "X-Auth-Token: $AUTH" http://localhost:9292/v2/images/41717c78-c926-47aa-922e-295596959e5b HTTP/1.1 200 OK Content-Length: 595 Content-Type: application/json; charset=UTF-8 X-Openstack-Request-Id: req-aeb70882-80fa-4947-8606-d253b180e0a3 Date: Thu, 08 Aug 2013 17:26:16 GMT {"status": "active", "name": "my_image", "tags": [], "container_format": "bare", "created_at": "2013-08-08T17:25:06Z", "disk_format": "vhd", "updated_at": "2013-08-08T17:25:54Z", "visibility": "private", "locations": [{"url": "http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2", "metadata": {}}, {"url": "file:///etc/group", "metadata": {}}], "self": "/v2/images/41717c78-c926-47aa-922e-295596959e5b", "protected": false, "id": "41717c78-c926-47aa-922e-295596959e5b", "file": "/v2/images/41717c78-c926-47aa-922e-295596959e5b/file", "min_disk": 0, "min_ram": 0, "schema": "/v2/schemas/image"}[jbresnah@localhost devstack]$ [jbresnah@localhost devstack]$
Test plan: https://github.com/mkollaro/openstack-testplans/blob/master/glance/multilocation.rst
The RFE has been verified but with the following bugs opened: 1. Bug 1022549 - openstack-glance: can't configure a location of image manually with a CLI command 2. Bug 1027286 - openstack-glance: api v2 fail to add a second location in the localfs 3. Bug 1027316 - openstack-glance: api v2 allow to add the same location twice
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. http://rhn.redhat.com/errata/RHEA-2013-1859.html