[Bug 1816721] Re: [SRU] Python3 librados incompatibility
Brian Murray
brian at ubuntu.com
Tue Jun 18 18:50:17 UTC 2019
Hello Michal, or anyone else affected,
Accepted python-glance-store into cosmic-proposed. The package will
build now and be available at https://launchpad.net/ubuntu/+source
/python-glance-store/0.26.1-0ubuntu2.2 in a few hours, and then in the
-proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-cosmic to verification-done-cosmic. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-cosmic. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: python-glance-store (Ubuntu Cosmic)
Status: Triaged => Fix Committed
** Tags added: verification-needed verification-needed-cosmic
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1816721
Title:
[SRU] Python3 librados incompatibility
Status in Ubuntu Cloud Archive:
Fix Released
Status in Ubuntu Cloud Archive rocky series:
Triaged
Status in Ubuntu Cloud Archive stein series:
Fix Released
Status in glance_store:
Fix Released
Status in python-glance-store package in Ubuntu:
Invalid
Status in python-glance-store source package in Cosmic:
Fix Committed
Status in python-glance-store source package in Disco:
Fix Released
Bug description:
[Impact]
For >= rocky (i.e. if using py3 packages) librados.cluster.get_fsid() is returning a binary string which results in spurious/invalid invalid characters being stored in the database e.g. for the image_location. This patch ensures that the value is converted to a normal string.
[Test Case]
* deploy openstack rocky (using p3 packages)
* deploy ceph and use for glance backend
* set
/etc/glance/glance-api.conf:show_multiple_locations = True
/etc/glance/glance-api.conf:show_image_direct_url = True
* upload image
* query image_locations table in glance db
mysql -h$host -u${user} -p$passwd glance -e'select * from image_locations;'
* ensure that the stored value is correct i.e. does not have "b%27" at the beginning.
[Regression Potential]
None expected
[Other Info]
Upgrading to this patch won't fix existing images, they will need to be manually updated in the database.
----------------------------------------------------------------------------
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 at openstack-controller:/tmp# openstack image create --container-
format bare --disk-format raw --file cirros-0.3.4-x86_64-disk.img
cirros-test-1
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2019-02-20T09:08:45Z |
| disk_format | raw |
| file | /v2/images/7b1f429e-ad2f-40b2-be9e-8552edae8938/file |
| id | 7b1f429e-ad2f-40b2-be9e-8552edae8938 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-test-1 |
| owner | ba5ef70fd99642fdb75c9307c88b1164 |
| properties | direct_url='rbd://b%27868c2b5d-12f1-4f3f-aa2a-5701a3bb1041%27/images/7b1f429e-ad2f-40b2-be9e-8552edae8938/snap', os_hash_algo='sha512', os_hash_value='1b03ca1bc3fafe448b90583c12f367949f8b0e665685979d95b004e48574b953316799e23240f4f739d1b5eb4c4ca24d38fdc6f4f9d8247a2bc64db25d6bbdb2', os_hidden='False' |
| protected | False |
| schema | /v2/schemas/image |
| size | 13287936 |
| status | active |
| tags | |
| updated_at | 2019-02-20T09:08:48Z |
| virtual_size | None |
| visibility | shared |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
mysql> select * from image_locations where image_id = '7b1f429e-ad2f-40b2-be9e-8552edae8938'\G;
*************************** 1. row ***************************
id: 32
image_id: 7b1f429e-ad2f-40b2-be9e-8552edae8938
value: rbd://b%27868c2b5d-12f1-4f3f-aa2a-5701a3bb1041%27/images/7b1f429e-ad2f-40b2-be9e-8552edae8938/snap
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1816721/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list