Comment 1 for bug 1816468

Revision history for this message
Michal Arbet (michalarbet) wrote : Re: Acceleration cinder - glance with ceph not working

I think problem is between glance and ceph.

Glance image show is showing corrupted location in ceph:

root@openstack-controller:/tmp# openstack image show eb816518-fac2-48f2-8197-ca7a83c89ada

direct_url='rbd://b%27868c2b5d-12f1-4f3f-aa2a-5701a3bb1041%27/images/eb816518-fac2-48f2-8197-ca7a83c89ada/snap'

Above string is constructed from b'ID' but id is returned also with apostrophes from ceph , %27 is ' encoded

>>>>>>>>

+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum | abaeff277a4e2ce7dff253ad453312a5 |
| container_format | bare |
| created_at | 2019-02-18T12:01:04Z |
| disk_format | raw |
| file | /v2/images/eb816518-fac2-48f2-8197-ca7a83c89ada/file |
| id | eb816518-fac2-48f2-8197-ca7a83c89ada |
| min_disk | 0 |
| min_ram | 0 |
| name | debian-9 |
| owner | ba5ef70fd99642fdb75c9307c88b1164 |
| properties | direct_url='rbd://b%27868c2b5d-12f1-4f3f-aa2a-5701a3bb1041%27/images/eb816518-fac2-48f2-8197-ca7a83c89ada/snap', os_hash_algo='sha512', os_hash_value='03fee9094d9720ddd51a7eb61755503a114752fbcefb10d1e5cf48a7f261ed9e36fe20e5c5bdf7e4a956910ebc6a0c0bd130b43e541d49b3b3362dd0d491851d', os_hidden='False' |
| protected | False |
| schema | /v2/schemas/image |
| size | 2147483648 |
| status | active |
| tags | |
| updated_at | 2019-02-18T12:03:22Z |
| virtual_size | None |
| visibility | shared |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

added debug /usr/lib/python3/dist-packages/glance/api/v2/images.py :

    def _format_image(self, image):

        def _get_image_locations(image):
            try:
                LOG.debug("{}".format(list(image.locations)))
                return list(image.locations)
            except exception.Forbidden:
                return []

│2019-02-18 18:06:03.640 28201 DEBUG glance.api.v2.images [req-51e11c18-e0d9-46fe-a28c-1376a744637d 664034a641e64922a1cc253e2dc39e76 ba5ef70fd99642fdb75c9307c88b1164 - default default] [{'metadata': {}, 'url': 'rbd://b%27868c2b5d-12f1-4f3f-aa2a-5701a3bb1041%27/images/eb816518-fac2-48f2-8197-ca7a83c89ada/snap', 'id'│
: 20, 'status': 'active'}] _get_image_locations /usr/lib/python3/dist-packages/glance/api/v2/images.py:893