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
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-ca7a83c89a da
direct_ url='rbd: //b%27868c2b5d- 12f1-4f3f- aa2a-5701a3bb10 41%27/images/ eb816518- fac2-48f2- 8197-ca7a83c89a da/snap'
Above string is constructed from b'ID' but id is returned also with apostrophes from ceph , %27 is ' encoded
>>>>>>>>
+------ ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ 7dff253ad453312 a5 | 18T12:01: 04Z | eb816518- fac2-48f2- 8197-ca7a83c89a da/file | fac2-48f2- 8197-ca7a83c89a da | db75c9307c88b11 64 | url='rbd: //b%27868c2b5d- 12f1-4f3f- aa2a-5701a3bb10 41%27/images/ eb816518- fac2-48f2- 8197-ca7a83c89a da/snap' , os_hash_ algo='sha512' , os_hash_ value=' 03fee9094d9720d dd51a7eb6175550 3a114752fbcefb1 0d1e5cf48a7f261 ed9e36fe20e5c5b df7e4a956910ebc 6a0c0bd130b43e5 41d49b3b3362dd0 d491851d' , os_hidden='False' | 18T12:03: 22Z | ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+
| Field | Value |
+------
| checksum | abaeff277a4e2ce
| container_format | bare |
| created_at | 2019-02-
| disk_format | raw |
| file | /v2/images/
| id | eb816518-
| min_disk | 0 |
| min_ram | 0 |
| name | debian-9 |
| owner | ba5ef70fd99642f
| properties | direct_
| protected | False |
| schema | /v2/schemas/image |
| size | 2147483648 |
| status | active |
| tags | |
| updated_at | 2019-02-
| 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):
LOG.debug( "{}".format( list(image. locations) ))
return list(image. locations) Forbidden:
return []
try:
except exception.
│2019-02-18 18:06:03.640 28201 DEBUG glance. api.v2. images [req-51e11c18- e0d9-46fe- a28c-1376a74463 7d 664034a641e6492 2a1cc253e2dc39e 76 ba5ef70fd99642f db75c9307c88b11 64 - default default] [{'metadata': {}, 'url': 'rbd:// b%27868c2b5d- 12f1-4f3f- aa2a-5701a3bb10 41%27/images/ eb816518- fac2-48f2- 8197-ca7a83c89a da/snap' , 'id'│ locations /usr/lib/ python3/ dist-packages/ glance/ api/v2/ images. py:893
: 20, 'status': 'active'}] _get_image_