Import api, image becomes active if disk-format and container format are not set
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 uploading state and does not have container-format and/or disk-format set goes into active state. Ideally image which does not have container-format or disk-format set should raise bad request error.
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 an image without container format and disk-format
$ glance image-create --name cirros_image
2. Run stage call to upload data in staging area
$ glance image-stage <ID of image created in 1st step> --file ~/devstack/
3. Run image-import call
$ glance image-import <ID of image created in 1st step> --import-method glance-direct
Output:
+------
| Property | Value |
+------
| checksum | 527294ab8d15505
| container_format | None |
| created_at | 2017-11-
| disk_format | None |
| id | 303e1af0-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros_image |
| owner | 40ab3e7ce43e4b6
| protected | False |
| size | 314 |
| status | active |
| tags | [] |
| updated_at | 2017-11-
| virtual_size | None |
| visibility | shared |
+------
From the above output you can easily figure out that image is in active state and container_format and disk_format are set to None.
Changed in glance: | |
assignee: | nobody → Abhishek Kekane (abhishek-kekane) |
description: | updated |
Changed in glance: | |
importance: | Undecided → High |
milestone: | none → queens-2 |
Fix proposed to branch: master /review. openstack. org/522774
Review: https:/