I can not see all images from Horizon "Images & Snapshots" view

Bug #1257180 reported by chenhaiq
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
chenhaiq

Bug Description

In devstack env, there are three images from glance api:

$ glance image-list
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
| e85d6c66-45bb-4dd0-a011-3d45fabafcea | cirros-0.3.1-x86_64-uec | ami | ami | 25165824 | active |
| e18e8dde-ee1d-4d22-a369-80f91862d0e5 | cirros-0.3.1-x86_64-uec-kernel | aki | aki | 4955792 | active |
| df84b759-396b-4923-94fb-76f58f9a3a67 | cirros-0.3.1-x86_64-uec-ramdisk | ari | ari | 3714968 | active |
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+

However, I can only see the first one in Horizon, because the images list is filtered in Horizon:
            images = [im for im in all_images
                      if im.container_format not in ['aki', 'ari']]

Horizon should display exactly the same result as API.

Revision history for this message
Zhenguo Niu (niu-zglinux) wrote :

https://bugzilla.redhat.com/show_bug.cgi?id=918552

Horizon specifically hides images with an AKI or ARI type because they're not launchable and generally shouldn't be edited by regular users. They should still be visible in the Admin dashboard if you need to edit them.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I think image list in Dashboard should display all images regardless of launchable image or not. Of course if we make such change, images in instance launch form should be filtered properly and "Launch" button in image list should be enabled only for launchable images.

I would like to know opinions from more folks.

Revision history for this message
Zhenguo Niu (niu-zglinux) wrote :

IMHO, Admin dashboard list all images is enough, images with AKI or ARI type are not useful to regular user and also maybe we should disable regular user to upload images with these types.

Revision history for this message
chenhaiq (chenhaiq) wrote :

Why glance allow user upload AKI or ARI type of images?
A regular user should be able to manage images in Horizon the same with glance cli.

For example, if the user added the image in glance cli, he/she should be able to delete it in Horizon.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I don't think we need to distinguish admin panel and regular user panel because regular users can upload their own image. Horizon allows to upload AKI and ARI image so Horizon should list these images too (though this feature does work as expected because there is no way to specify AKI/ARI when uploading AMI image). If we hide AKI/ARI images, it brings us to another confusion to users.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: nobody → chenhaiq (chenhaiq)
status: New → In Progress
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/59935
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d6068065cb3d02af37ad662dfc587557273fbaf6
Submitter: Jenkins
Branch: master

commit d6068065cb3d02af37ad662dfc587557273fbaf6
Author: chenhaiq <email address hidden>
Date: Wed Dec 4 17:54:25 2013 +0800

    Do not filter image list from glance api

    Horizon filter glance image list because 'aki', 'ari' type of images
    can not be launchable.

    However, it is better to provide full capacity with glance in
    Horizon.

    Reasons:
    1. Horizon allow upload those images. It brings confusion if not
    show them
    2. The filtering strange behavior when pagination is enabled

    Changed to show all images in Horizon, but 'aki', 'ari' type of
    images are not allowed to launch or create volume.

    Change-Id: Ic92fc97d7327bb2525c0155646487dd685e99c79
    Closes-Bug: #1257180

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
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.