Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 976334

Summary: "glance image-create" should require at least one parameter
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-glanceclientAssignee: Jakub Ruzicka <jruzicka>
Status: CLOSED UPSTREAM QA Contact: Dafna Ron <dron>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abaron, dallan, eglynn, fpercoco, hateya, jruzicka, yeylon
Target Milestone: ---Keywords: MoveUpstream
Target Release: 4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-04 18:12:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1003984    
Attachments:
Description Flags
logs none

Description Dafna Ron 2013-06-20 12:02:44 UTC
Created attachment 763449 [details]
logs

Description of problem:

I ran glance image-create expecting a list of possible options to appear and instead the command ran and was trying to create an empty image which is stuck in status queued. 

Version-Release number of selected component (if applicable):

python-glanceclient-0.9.0-1.el6ost.noarch
python-glance-2013.1.2-1.el6ost.noarch
openstack-glance-2013.1.2-1.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. run glance image-create
2.
3.

Actual results:

glance runs the command although we are missing params from the command

Expected results:

we should see a list of available options
--name, --disk-format, --container-format bare, --location atc. 

Additional info: log


[root@opens-vdsb log(keystone_admin)]# glance image-create
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | None                                 |
| created_at       | 2013-06-20T11:47:13                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | None                                 |
| id               | 6588ee02-d655-46c9-81c5-fa305e29c48a |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | None                                 |
| owner            | a1abae75e5454a428a80517fa73c391a     |
| protected        | False                                |
| size             | 0                                    |
| status           | queued                               |
| updated_at       | 2013-06-20T11:47:13                  |
+------------------+--------------------------------------+

[root@opens-vdsb log(keystone_admin)]# glance image-list
+--------------------------------------+------+-------------+------------------+------+--------+
| ID                                   | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+------+-------------+------------------+------+--------+
| 6588ee02-d655-46c9-81c5-fa305e29c48a |      |             |                  |      | queued |
+--------------------------------------+------+-------------+------------------+------+--------+

Comment 5 Dafna Ron 2013-09-03 15:44:00 UTC
same thing with missing parameters: 

[root@opens-vdsb lvm(keystone_admin)]# glance image-list
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| ID                                   | Name                        | Disk Format | Container Format | Size       | Status |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| dc79349e-de25-4ec5-8b12-5a6145270c47 |                             |             |                  |            | queued |
| 3ca51afa-531f-428a-9b9c-6dab33da85cd | dafna was here              |             |                  |            | queued |
| 6981621e-673d-48a5-8c08-ca35eeac0c20 | dafna was here              |             |                  |            | queued |
| 1264d201-f083-488f-b703-b2d428fefe21 | dafna*was@;ll-9bla-==+ here |             |                  |            | queued |
| 64593e6b-6edc-4d1f-ad64-0c2a0d8fe8f6 | dafna_was_here              |             |                  |            | queued |
| 8c5fdb82-d85a-49df-8441-0c940aa62950 | dafna_was_here              |             |                  |            | queued |
| 05c9b5e2-3082-4ad3-8d03-faf74b61234c | rhel64                      | qcow2       | bare             | 1974140928 | active |
| a32222e7-f879-41ab-b66b-5cad299b0b8d | test                        | qcow2       | bare             | 31357907   | active |
| 9a611a39-b028-44dd-a8d0-027bbb3ce1eb | testttt                     | qcow2       | bare             | 699592704  | active |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
[root@opens-vdsb lvm(keystone_admin)]# glance image-list
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| ID                                   | Name                        | Disk Format | Container Format | Size       | Status |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| dc79349e-de25-4ec5-8b12-5a6145270c47 |                             |             |                  |            | queued |
| 3ca51afa-531f-428a-9b9c-6dab33da85cd | dafna was here              |             |                  |            | queued |
| 6981621e-673d-48a5-8c08-ca35eeac0c20 | dafna was here              |             |                  |            | queued |
| 1264d201-f083-488f-b703-b2d428fefe21 | dafna*was@;ll-9bla-==+ here |             |                  |            | queued |
| 64593e6b-6edc-4d1f-ad64-0c2a0d8fe8f6 | dafna_was_here              |             |                  |            | queued |
| 8c5fdb82-d85a-49df-8441-0c940aa62950 | dafna_was_here              |             |                  |            | queued |
| 05c9b5e2-3082-4ad3-8d03-faf74b61234c | rhel64                      | qcow2       | bare             | 1974140928 | active |
| a32222e7-f879-41ab-b66b-5cad299b0b8d | test                        | qcow2       | bare             | 31357907   | active |
| 9a611a39-b028-44dd-a8d0-027bbb3ce1eb | testttt                     | qcow2       | bare             | 699592704  | active |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+

Comment 7 Jakub Ruzicka 2013-09-13 15:51:14 UTC
To clarify, glance is not "trying to create empty image". When no image data are supplied, it is in queued state by desing until the data are provided.

Name and other arguments are optional.

However, it doesn't make sense to supply no arguments, so at least one argument should be required.

Comment 8 Jakub Ruzicka 2013-11-04 18:12:19 UTC
I commented on the upstream bug and proposed a patch but no one seems interested.

Nevertheless, there is no need to track this upstream bug here, closing.