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):
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
in the "Available" list the instance snapshot is not listed even when adding a filter on the image name
the image snapshot should be listed, at least when filtering by name
I tried with a few snapshots appearing before the 333rd entry and they all seem to be listed as expected.
Created attachment 1592645 [details]
The same snapshot listed on the "Images" page
Created attachment 1592646 [details]
List of snapshots with line numbers
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.
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.