Store ID fetched from URI is incorrectly encoded under py27
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Critical
|
Alan Bishop |
Bug Description
Whenever a client updates the locations for an image, glance checks to be sure the locations metadata includes the backend store ID that it parses from the request URI. However, under py27 the parsed store ID will not be properly encoded (it will be a str, but needs to be unicode). This leads to a subsequent failure, when glance checks to verify the value isinstance(val, six.text_type) at [1].
The problem can be triggered by having nova create an image from a running VM. Under these circumstances, the store ID parsed by [2] and added at [3] will be encoded incorrectly.
[1] https:/
[2] https:/
[3] https:/
This leads to the following error:
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi [req-81008491-
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi Traceback (most recent call last):
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi request, **action_args)
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi return method(*args, **kwargs)
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi change_method(req, image, change)
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi self._do_
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi image.locations
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi return method(*args, **kwargs)
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi return self.locations.
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi store_api.
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi check_location_
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi File "/usr/lib/
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi % dict(key=key, type=type(val)))
2020-01-30 14:12:54.909 64 ERROR glance.common.wsgi BackendException: The image metadata key store has an invalid type of <type 'str'>. Only dict, list, and unicode are supported.
Changed in glance: | |
assignee: | nobody → Alan Bishop (alan-bishop) |
Changed in glance: | |
importance: | Undecided → Critical |
Fix proposed to branch: master /review. opendev. org/705229
Review: https:/