yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #69377
[Bug 1733816] [NEW] Import api, image becomes active if disk-format and container format are not set
Public bug reported:
If you run image-import api on any image which is in saving 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_n(import_task.run, task_executor)
+ import_task.run(task_executor)
[1] https://bugs.launchpad.net/glance/+bug/1712463
[2] https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L106
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/local.conf
3. Run image-import call
$ glance image-import <ID of image created in 1st step> --import-method glance-direct
Output:
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 527294ab8d1550529d6e5ef853cf1933 |
| container_format | None |
| created_at | 2017-11-22T09:28:42Z |
| disk_format | None |
| id | 303e1af0-4273-4a40-a719-9bd2e6a89864 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros_image |
| owner | 40ab3e7ce43e4b6bb31a912b434490b5 |
| protected | False |
| size | 314 |
| status | active |
| tags | [] |
| updated_at | 2017-11-22T09:29:46Z |
| 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.
** Affects: glance
Importance: Undecided
Assignee: Abhishek Kekane (abhishek-kekane)
Status: New
** Changed in: glance
Assignee: (unassigned) => Abhishek Kekane (abhishek-kekane)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1733816
Title:
Import api, image becomes active if disk-format and container format
are not set
Status in Glance:
New
Bug description:
If you run image-import api on any image which is in saving 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_n(import_task.run, task_executor)
+ import_task.run(task_executor)
[1] https://bugs.launchpad.net/glance/+bug/1712463
[2] https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L106
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/local.conf
3. Run image-import call
$ glance image-import <ID of image created in 1st step> --import-method glance-direct
Output:
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 527294ab8d1550529d6e5ef853cf1933 |
| container_format | None |
| created_at | 2017-11-22T09:28:42Z |
| disk_format | None |
| id | 303e1af0-4273-4a40-a719-9bd2e6a89864 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros_image |
| owner | 40ab3e7ce43e4b6bb31a912b434490b5 |
| protected | False |
| size | 314 |
| status | active |
| tags | [] |
| updated_at | 2017-11-22T09:29:46Z |
| 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1733816/+subscriptions
Follow ups