yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72962
[Bug 1772018] [NEW] can't upload image into Glance using Swift backend
Public bug reported:
Trying to create a Glance image fails with the following error:
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi Traceback (most recent call last):
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/common/wsgi.py", line 1227, in __call__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi request, **action_args)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/common/wsgi.py", line 1270, in dispatch
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return method(*args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/common/utils.py", line 414, in wrapped
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/api/v2/image_data.py", line 267, in upload
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self._restore(image_repo, image)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.force_reraise()
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi raise value
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/api/v2/image_data.py", line 132, in upload
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi image.set_data(data, size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/domain/proxy.py", line 195, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.base.set_data(data, size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/notifier.py", line 480, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi _send_notification(notify_error, 'image.upload', msg)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.force_reraise()
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi raise value
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/notifier.py", line 427, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.repo.set_data(data, size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/api/policy.py", line 193, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return self.image.set_data(*args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/quota/__init__.py", line 304, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.image.set_data(data, size=size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/location.py", line 439, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi verifier=verifier)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/backend.py", line 453, in add_to_backend
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi verifier)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/backend.py", line 426, in store_add_to_backend
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi verifier=verifier)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/capabilities.py", line 225, in op_checker
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return store_op_fun(store, *args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/_drivers/swift/store.py", line 965, in add
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi written_chunks)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.force_reraise()
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi raise value
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/_drivers/swift/store.py", line 954, in add
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi content_length=content_length)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 1842, in put_object
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi response_dict=response_dict)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 1691, in _retry
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi service_token=self.service_token, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 1320, in put_object
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi conn.putrequest(path, headers=headers, data=data)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 449, in putrequest
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return self.request('PUT', full_path, data, headers, files)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 439, in request
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi files=files, **self.requests_args)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 422, in _request
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return self.request_session.request(*arg, **kwarg)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/requests/sessions.py", line 508, in request
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi resp = self.send(prep, **send_kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/requests/sessions.py", line 618, in send
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi r = adapter.send(request, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/requests/adapters.py", line 460, in send
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi for i in request.body:
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/utils.py", line 279, in __next__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi chunk = self.content.read(self.chunk_size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/_drivers/swift/store.py", line 1537, in read
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.checksum.update(result)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi TypeError: Unicode-objects must be encoded before hashing
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi
Version used:
ii glance-api 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - API server
ii glance-common 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - common files
ii glance-registry 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - registry server
ii glance-store-common 0.23.0-2~bpo9+1 all OpenStack Image Service store library - common files
ii python3-glance 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - Python library
ii python3-glance-store 0.23.0-2~bpo9+1 all OpenStack Image Service store library - Python 3.x
ii python3-glanceclient 1:2.9.1-2~bpo9+1 all Client library for Openstack glance server - Python 3.x
ii python-swift 2.17.0-3~bpo9+1 all distributed virtual object store - Python libraries
ii python-swiftclient 1:3.5.0-2~bpo9+1 all Client library for Openstack Swift API - Python 2.7
ii python3-swiftclient 1:3.5.0-2~bpo9+1 all Client library for Openstack Swift API - Python 3.x
ii swift 2.17.0-3~bpo9+1 all distributed virtual object store - common files
ii swift-account 2.17.0-3~bpo9+1 all distributed virtual object store - account server
ii swift-container 2.17.0-3~bpo9+1 all distributed virtual object store - container server
ii swift-object 2.17.0-3~bpo9+1 all distributed virtual object store - object server
ii swift-proxy 2.17.0-3~bpo9+1 all distributed virtual object store - proxy server
** Affects: glance
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1772018
Title:
can't upload image into Glance using Swift backend
Status in Glance:
New
Bug description:
Trying to create a Glance image fails with the following error:
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi Traceback (most recent call last):
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/common/wsgi.py", line 1227, in __call__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi request, **action_args)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/common/wsgi.py", line 1270, in dispatch
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return method(*args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/common/utils.py", line 414, in wrapped
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/api/v2/image_data.py", line 267, in upload
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self._restore(image_repo, image)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.force_reraise()
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi raise value
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/api/v2/image_data.py", line 132, in upload
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi image.set_data(data, size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/domain/proxy.py", line 195, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.base.set_data(data, size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/notifier.py", line 480, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi _send_notification(notify_error, 'image.upload', msg)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.force_reraise()
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi raise value
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/notifier.py", line 427, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.repo.set_data(data, size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/api/policy.py", line 193, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return self.image.set_data(*args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/quota/__init__.py", line 304, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.image.set_data(data, size=size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance/location.py", line 439, in set_data
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi verifier=verifier)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/backend.py", line 453, in add_to_backend
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi verifier)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/backend.py", line 426, in store_add_to_backend
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi verifier=verifier)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/capabilities.py", line 225, in op_checker
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return store_op_fun(store, *args, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/_drivers/swift/store.py", line 965, in add
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi written_chunks)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.force_reraise()
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi six.reraise(self.type_, self.value, self.tb)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi raise value
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/_drivers/swift/store.py", line 954, in add
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi content_length=content_length)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 1842, in put_object
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi response_dict=response_dict)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 1691, in _retry
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi service_token=self.service_token, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 1320, in put_object
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi conn.putrequest(path, headers=headers, data=data)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 449, in putrequest
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return self.request('PUT', full_path, data, headers, files)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 439, in request
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi files=files, **self.requests_args)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/client.py", line 422, in _request
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi return self.request_session.request(*arg, **kwarg)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/requests/sessions.py", line 508, in request
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi resp = self.send(prep, **send_kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/requests/sessions.py", line 618, in send
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi r = adapter.send(request, **kwargs)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/requests/adapters.py", line 460, in send
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi for i in request.body:
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/swiftclient/utils.py", line 279, in __next__
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi chunk = self.content.read(self.chunk_size)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi File "/usr/lib/python3/dist-packages/glance_store/_drivers/swift/store.py", line 1537, in read
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi self.checksum.update(result)
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi TypeError: Unicode-objects must be encoded before hashing
2018-05-18 13:15:06.278 20265 ERROR glance.common.wsgi
Version used:
ii glance-api 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - API server
ii glance-common 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - common files
ii glance-registry 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - registry server
ii glance-store-common 0.23.0-2~bpo9+1 all OpenStack Image Service store library - common files
ii python3-glance 2:16.0.1-2~bpo9+1 all OpenStack Image Registry and Delivery Service - Python library
ii python3-glance-store 0.23.0-2~bpo9+1 all OpenStack Image Service store library - Python 3.x
ii python3-glanceclient 1:2.9.1-2~bpo9+1 all Client library for Openstack glance server - Python 3.x
ii python-swift 2.17.0-3~bpo9+1 all distributed virtual object store - Python libraries
ii python-swiftclient 1:3.5.0-2~bpo9+1 all Client library for Openstack Swift API - Python 2.7
ii python3-swiftclient 1:3.5.0-2~bpo9+1 all Client library for Openstack Swift API - Python 3.x
ii swift 2.17.0-3~bpo9+1 all distributed virtual object store - common files
ii swift-account 2.17.0-3~bpo9+1 all distributed virtual object store - account server
ii swift-container 2.17.0-3~bpo9+1 all distributed virtual object store - container server
ii swift-object 2.17.0-3~bpo9+1 all distributed virtual object store - object server
ii swift-proxy 2.17.0-3~bpo9+1 all distributed virtual object store - proxy server
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1772018/+subscriptions