Server list in both dashboard and command line takes a long time with many images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
OpenStack Dashboard (Horizon) |
New
|
Undecided
|
Unassigned |
Bug Description
First, please pardon me if this has already been dealt with in newer releases. Our OpenStack is Train.
Our environment has thousands of images including snapshots.
When listing instances, both by command line and in the dashboard, the instance list takes quite a while and apparently goes through all images in the background. Please see the attached text file for an example, a project with five instances taking over 21 seconds to list the instances.
In contrast, using '-n' in the command will list those same instances in less than a second. Of course, the dashboard has no such option.
If feasible, can Nova only pull the images related to the instances rather than pulling every single image in the Glance repository?
This is unfortunately a known issue and is not an issue in Nova but rather is an issue related to the python- openstackclient .
There are a couple of CLI options that can be passed to improve performance:
* --no-name-lookup (which you already found)
or
* --name- lookup- one-by- one (this will lookup only related images as you mention)
I have long thought the second option should be the default behavior but in the past there was some pushback about changing it. It might be worth checking again whether the python- openstackclient project might be open to accepting such a change now. They use the following bug tracker:
https:/ /storyboard. openstack. org/#!/ project/ openstack/ python- openstackclient
I'm going to mark this as Invalid for Nova and then add Horizon because maybe they could update their internal call to use one of the above options when they call openstackclient to improve the UX.
Update: It looks like Horizon might not be using OSC to do the server list ... so a different change might be needed.
I'll also check if python-novaclient could somehow be responsible for the slow image call and if so, I'll add python-novaclient to this bug and remove Horizon.
[1] https:/ /docs.openstack .org/python- openstackclient /latest/ cli/command- objects/ server. html#cmdoption- openstack- server- list-n /docs.openstack .org/python- openstackclient /latest/ cli/command- objects/ server. html#cmdoption- openstack- server- list-name- lookup- one-by- one
[2] https:/