Bug 1732109

Summary: "Launch instance" dialog does not filter correctly some "Instance snapshots" when listing available images
Product: Red Hat OpenStack Reporter: Maurizio Porrato <mporrato>
Component: python-django-horizonAssignee: RHOS Maint <rhos-maint>
Status: CLOSED WONTFIX QA Contact: Beth White <beth.white>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: athomas, jmelvin, jrist, kforde, mporrato, rdopiera, yuzheng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-24 11:01:05 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:
Attachments:
Description Flags
The "Launch Instance" dialog not showing the snapshot
none
The same snapshot listed on the "Images" page
none
List of snapshots with line numbers none

Description Maurizio Porrato 2019-07-22 17:42:18 UTC
Created attachment 1592644 [details]
The "Launch Instance" dialog not showing the snapshot

Description of problem:

The "Launch instance" dialog with "Boot source" set to "Instance Snapshot" does not show all the snapshots in the "Availabe" list, even when filtering by image name.
It looks like only the matching images in the first 332 snapshots (as listed by openstack image list --property image_type=snapshot) are shown.

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

rhosp13/openstack-horizon:13.0-71.1557945103

How reproducible:

It seems to be reproducible only when more than 332 instance snapshost are present on glance.

Steps to Reproduce:
1. take the name of the 333rd (or greater) instance snapshot:
        openstack image list --property image_type=snapshot -c Name -f value | head -n 333 | tail -n 1
2. from horizon, open the "Launch instance" dialog and select "Instance Snapshot" as the boot source

Actual results:

in the "Available" list the instance snapshot is not listed even when adding a filter on the image name


Expected results:

the image snapshot should be listed, at least when filtering by name

Additional info:

I tried with a few snapshots appearing before the 333rd entry and they all seem to be listed as expected.

Comment 1 Maurizio Porrato 2019-07-22 17:43:40 UTC
Created attachment 1592645 [details]
The same snapshot listed on the "Images" page

Comment 2 Maurizio Porrato 2019-07-22 17:47:05 UTC
Created attachment 1592646 [details]
List of snapshots with line numbers

Comment 3 Maurizio Porrato 2019-07-23 15:09:59 UTC
Increasing severity since it's also affecting the dialog shown when clicking "Launch" from the image list page. Also it does not matter if the image is tagged as a snapshot or not.
This prevents end users from creating instances from horizon for about 85% of the images in our environment.

Comment 4 Radomir Dopieralski 2019-07-24 11:01:05 UTC
This happens because the filtering is implemented on the client side, not on the server side. I think the reason for this is that the relevant API doesn't support filtering, so we have to download the whole list (which is limited on the server side for performance reasons) and filter it on our side.

This kind of thing happens in many places in Horizon, and there is an ongoing effort upstream to gradually improve the APIs and move the filtering and pagination onto the server side, but it's slow, because it often involves API changes.