Launching Instance Boot from image (creates a new volume)

Bug #1239896 reported by Quenten Grasso on 2013-10-15
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Critical
Lin Hua Cheng

Bug Description

When Launching Instance "Boot from image (creates a new volume)"

Instance launches however is only visible via the "Admin" Instances view when trying to view via the "Users" Instances view I get an error as per below.

I think it seems to be some how related to the instance not having a image-id when booting from volume. If I boot from image (not using a volume) all views are ok.

(enabled debuging /etc/openstack-dashboard/local_settings.py)

TypeError at /project/instances/
string indices must be integers
Request Method: GET
Request URL: https://dashboard.domain.com/project/instances/
Django Version: 1.5.4
Exception Type: TypeError
Exception Value:
string indices must be integers
Exception Location: /usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/views.py in get_data, line 92
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../..',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/share/openstack-dashboard/',
 '/usr/share/openstack-dashboard/openstack_dashboard']

Environment:

Request Method: GET
Request URL: https://dashboard.domain.com/project/instances/

Django Version: 1.5.4
Python Version: 2.7.3
Installed Applications:
('openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'compressor',
 'horizon',
 'openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.settings',
 'openstack_auth',
 'openstack_dashboard.dashboards.router')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  115. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  38. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  54. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  38. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  68. return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  86. return handler(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in get
  155. handled = self.construct_tables()
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in construct_tables
  146. handled = self.handle_table(table)
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in handle_table
  118. data = self._get_data_dict()
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in _get_data_dict
  182. self._data = {self.table_class._meta.name: self.get_data()}
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/views.py" in get_data
  92. and instance.image['id'] in image_map):

Exception Type: TypeError at /project/instances/
Exception Value: string indices must be integers

John Griffith (john-griffith) wrote :

Easily reproducible using devstack/milestone-proposed

Julie Pichon (jpichon) on 2013-10-15
Changed in horizon:
importance: Undecided → High
status: New → Triaged
milestone: none → icehouse-1
tags: added: havana-backport-potential
Gilles Dubreuil (gdubreui) wrote :

The same issue appears when creating an instance via "Boot from volume".

This seems to be effectively related to the image-id field being missing because when creating the instance from CLI the GUI doesn't crash.

Julie Pichon (jpichon) wrote :

Thank you for the comment. All "Boot from Volume" commands are sharing the issue, which is more serious. I'm seeing the same issue in Horizon if I try to boot from volume using the CLI with "nova boot --boot-volume <volume_id> --flavor 1 test"

Changed in horizon:
importance: High → Critical
Julie Pichon (jpichon) on 2013-10-16
Changed in horizon:
assignee: nobody → Julie Pichon (jpichon)
Julie Pichon (jpichon) wrote :

I heard reports that the instance also did not boot correctly when using the 'from volume' options but I cannot reproduce, that appears to work fine in my devstack environment. I will submit a fix for the display issue, further issues for "Boot from Volume" should probably be reported separately.

Fix proposed to branch: master
Review: https://review.openstack.org/52115

Changed in horizon:
status: Triaged → In Progress
Thierry Carrez (ttx) on 2013-10-16
tags: added: havana-rc-potential
removed: havana-backport-potential
Julie Pichon (jpichon) wrote :

Unfortunately the suggested fix also appears to reintroduce the performance regression in bug 1229128 (multiple calls to glance client).

Reviewed: https://review.openstack.org/52115
Committed: http://github.com/openstack/horizon/commit/f2927f180aadcca0f1e19881ed7d1b5cd1e53b4c
Submitter: Jenkins
Branch: master

commit f2927f180aadcca0f1e19881ed7d1b5cd1e53b4c
Author: Julie Pichon <email address hidden>
Date: Wed Oct 16 14:51:12 2013 +0100

    Display instances with no image information

    When booted from volume, instances do not have an image reference/id.

    Change-Id: I107c096a50c6a49e2a25c3b29b7d5c3273e4348e
    Closes-Bug: #1239896

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx) wrote :

Apparently this patch should be reverted and a new patch should be proposed in its place.

Changed in horizon:
status: Fix Committed → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/52203

Changed in horizon:
assignee: Julie Pichon (jpichon) → Lin Hua Cheng (lin-hua-cheng)
Thierry Carrez (ttx) on 2013-10-16
Changed in horizon:
milestone: icehouse-1 → havana-rc3

Reviewed: https://review.openstack.org/52203
Committed: http://github.com/openstack/horizon/commit/60a99fb039f605a27edbe9a4ee44ce31db5c4951
Submitter: Jenkins
Branch: master

commit 60a99fb039f605a27edbe9a4ee44ce31db5c4951
Author: Lin Hua Cheng <email address hidden>
Date: Wed Oct 16 13:08:01 2013 -0700

    Improve display of instance image information

    When instance is booted from volume image it returns a string,
    while for instance from image returns a dict. Fix is made to
    handle both cases.

    Change-Id: I23aeccd21f88a353222d3fc7dc4b5c337c2bfecb
    Closes-Bug: #1239896

Changed in horizon:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/52212
Committed: http://github.com/openstack/horizon/commit/d3e8e29f1e252e7bffc836056b52c8e4e5a0307c
Submitter: Jenkins
Branch: milestone-proposed

commit d3e8e29f1e252e7bffc836056b52c8e4e5a0307c
Author: Lin Hua Cheng <email address hidden>
Date: Wed Oct 16 13:08:01 2013 -0700

    Improve display of instance image information

    When instance is booted from volume image it returns a string,
    while for instance from image returns a dict. Fix is made to
    handle both cases.

    Change-Id: I23aeccd21f88a353222d3fc7dc4b5c337c2bfecb
    Closes-Bug: #1239896

Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in horizon:
milestone: havana-rc3 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers