Hello, found a bug in glance. Glance is storing bad direct_url='rbd://b%27868c2b5d-12f1-4f3f-aa2a-5701a3bb1041%27/images/7b1f429e-ad2f-40b2-be9e-8552edae8938/snap' in database. This is causing several problems, as in https://bugs.launchpad.net/cinder/+bug/1816468
root@openstack-controller:/tmp# openstack image create --container-format bare --disk-format raw --file cirros-0.3.4-x86_64-disk.img cirros-test-1
Hello, found a bug in glance. Glance is storing bad direct_ url='rbd: //b%27868c2b5d- 12f1-4f3f- aa2a-5701a3bb10 41%27/images/ 7b1f429e- ad2f-40b2- be9e-8552edae89 38/snap' in database. This is causing several problems, as in https:/ /bugs.launchpad .net/cinder/ +bug/1816468
root@openstack- controller: /tmp# openstack image create --container-format bare --disk-format raw --file cirros- 0.3.4-x86_ 64-disk. img cirros-test-1
+------ ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ 79d8a229cc70a07 c6 | 20T09:08: 45Z | 7b1f429e- ad2f-40b2- be9e-8552edae89 38/file | ad2f-40b2- be9e-8552edae89 38 | db75c9307c88b11 64 | url='rbd: //b%27868c2b5d- 12f1-4f3f- aa2a-5701a3bb10 41%27/images/ 7b1f429e- ad2f-40b2- be9e-8552edae89 38/snap' , os_hash_ algo='sha512' , os_hash_ value=' 1b03ca1bc3fafe4 48b90583c12f367 949f8b0e6656859 79d95b004e48574 b953316799e2324 0f4f739d1b5eb4c 4ca24d38fdc6f4f 9d8247a2bc64db2 5d6bbdb2' , os_hidden='False' | 20T09:08: 48Z | ------- -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+
| Field | Value |
+------
| checksum | ee1eca47dc88f48
| container_format | bare |
| created_at | 2019-02-
| disk_format | raw |
| file | /v2/images/
| id | 7b1f429e-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-test-1 |
| owner | ba5ef70fd99642f
| properties | direct_
| protected | False |
| schema | /v2/schemas/image |
| size | 13287936 |
| status | active |
| tags | |
| updated_at | 2019-02-
| virtual_size | None |
| visibility | shared |
+------
mysql> select * from image_locations where image_id = '7b1f429e- ad2f-40b2- be9e-8552edae89 38'\G; ******* ******* ****** 1. row ******* ******* ******* ****** ad2f-40b2- be9e-8552edae89 38 27868c2b5d- 12f1-4f3f- aa2a-5701a3bb10 41%27/images/ 7b1f429e- ad2f-40b2- be9e-8552edae89 38/snap
*******
id: 32
image_id: 7b1f429e-
value: rbd://b%
created_at: 2019-02-20 09:08:48
updated_at: 2019-02-20 09:08:48
deleted_at: NULL
deleted: 0
meta_data: {}
status: active
1 row in set (0.00 sec)
ERROR:
No query specified
get_fsid function from librados returns different ID representation, in py2 it is STR, in py3 it is bytes.
It can be fixed by oslo_utils. encodeutils. safe_decode
I will post the change.