Running image-import call on active image returns 500 internal server error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Abhishek Kekane |
Bug Description
If you run image-import api on any image which is in active state will return 500 error as it raises InvalidImageSta
Ideally it should return HTTP 409 Conflict error to the user.
Prerequisites:
1. Ensure you have latest version of python-glanceclient (version 2.8.0) installed
2. Due to isssue [1] to execute taskflow you need to modify line [2] as shown below and restart glance-api service
- pool.spawn_
+ import_
[1] https:/
[2] https:/
Steps to reporoduce:
1. Create image and upload data to it
$ glance image-create --container-format ami --disk-format ami --name cirros_image --file cirros-
2. Ensure image is in active state
3. Run image-import call
$ glance image-import <ID of image created in 1st step> --import-method glance-direct
Output:
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
Glance API Logs:
Nov 22 07:21:01 devstack <email address hidden>[14229]: pdict['tenant'] = self.tenant
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi [None req-2abf2e90-
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi Traceback (most recent call last):
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi request, **action_args)
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return method(*args, **kwargs)
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi import_
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi self.base.
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi super(TaskProxy, self).run(executor)
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi self.base.
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi self.base.
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi executor.
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi super(TaskExecutor, self).begin_
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi self._run(task_id, task.type)
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi self.task_
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi self.force_
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi six.reraise(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi engine.run()
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi for _state in self.run_
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi failure.
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi failures[
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi six.reraise(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/usr/lib/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi result = task.execute(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi image.status = 'importing'
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return setattr(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return setattr(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return setattr(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return setattr(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return setattr(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi return setattr(
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi File "/opt/stack/
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi raise e
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi InvalidImageSta
Nov 22 07:21:01 devstack <email address hidden>[14229]: ERROR glance.common.wsgi
Changed in glance: | |
assignee: | nobody → Abhishek Kekane (abhishek-kekane) |
Changed in glance: | |
importance: | Undecided → High |
milestone: | none → queens-2 |
Fix proposed to branch: master /review. openstack. org/523015
Review: https:/