error when trying to add image with missing or no params

Bug #1220315 reported by Dafna Ron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Gabriel Hurley

Bug Description

I created an image through cli with missing params (glance image-create --name bla)
the image is stuck in queued state (different glance bug).
if I try to edit it through horizon we get an error:

[root@opens-vdsb lvm(keystone_admin)]# tail -f /var/log/httpd/access_log |grep 3e27c842-24d2-426d-9db4-74fa405a13eb

10.35.203.14 - - [03/Sep/2013:19:01:07 +0300] "GET /dashboard/admin/images/3e27c842-24d2-426d-9db4-74fa405a13eb/update/ HTTP/1.1" 500 809 "http://10.35.101.10/dashboard/admin/images/images/" "Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130619 Firefox/17.0"

but I am able to update the image from glance cli:

Image bla:

[root@opens-vdsb lvm(keystone_admin)]# glance image-list
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| dc79349e-de25-4ec5-8b12-5a6145270c47 | | qcow2 | bare | 1974140928 | active |
| 3e27c842-24d2-426d-9db4-74fa405a13eb | bla | | | | 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 |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+

update through glance:

[root@opens-vdsb lvm(keystone_admin)]# glance image-update 3e27c842-24d2-426d-9db4-74fa405a13eb --disk-format qcow2 --container-format bare --location http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | bare |
| created_at | 2013-09-03T16:00:13 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 3e27c842-24d2-426d-9db4-74fa405a13eb |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | bla |
| owner | ad326a6c11a742c6bfdf4ad63be0c889 |
| protected | False |
| size | 1974140928 |
| status | active |
| updated_at | 2013-09-03T16:01:23 |
+------------------+--------------------------------------+
[root@opens-vdsb lvm(keystone_admin)]# glance image-list
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+
| dc79349e-de25-4ec5-8b12-5a6145270c47 | | qcow2 | bare | 1974140928 | active |
| 3e27c842-24d2-426d-9db4-74fa405a13eb | bla | qcow2 | bare | 1974140928 | active |
| 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 |
+--------------------------------------+-----------------------------+-------------+------------------+------------+--------+

Revision history for this message
Julie Pichon (jpichon) wrote :

Thanks for the report. Could you also link to the related Glance bug report for the stuck 'queued' state? Depending on how Glance decides to handle it, it may affect how we fix this on the Horizon side. Thank you.

Traceback:
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/forms/views.py" in get_form
  87. return form_class(self.request, **self.get_form_kwargs())
File "/usr/lib/python2.7/site-packages/django/views/generic/edit.py" in get_form_kwargs
  40. kwargs = {'initial': self.get_initial()}
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/images_and_snapshots/images/views.py" in get_initial
  82. 'disk_format': image.disk_format,
File "/opt/stack/python-glanceclient/glanceclient/common/base.py" in __getattr__
  95. return self.__getattr__(k)
File "/opt/stack/python-glanceclient/glanceclient/common/base.py" in __getattr__
  97. raise AttributeError(k)

Exception Type: AttributeError at /admin/images/2bf3b41e-8693-47c9-a461-4d1c9392b7f7/update/
Exception Value: disk_format

Changed in horizon:
status: New → Confirmed
Revision history for this message
Dafna Ron (dron-3) wrote :

linked the bugs.
thanks

Revision history for this message
Dafna Ron (dron-3) wrote :

this is the glance bug from bugzilla :
https://bugzilla.redhat.com/show_bug.cgi?id=976334

Revision history for this message
Dafna Ron (dron-3) wrote :

horizon bug on edit of image from UI:
https://bugzilla.redhat.com/show_bug.cgi?id=1003984

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This is almost definitely related to bug #1223921

Changed in horizon:
importance: Undecided → High
milestone: none → havana-rc1
Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :
Changed in horizon:
status: Confirmed → In Progress
Thierry Carrez (ttx)
Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.