OpenStack Server List Command Takes a Long Time to Execute
Problem
When you are trying to query the list of servers within a specific project or across the entire region, it takes a long time to get a response using the OpenStack__CLI.
Environment
- Platform9 Managed OpenStack - All Versions
- Nova
- OpenStack CLI - v3.12.0 and above
Cause
When running the openstack server list command using OpenStack CLI, GET calls are also generated to list Glance__images as well as all the flavors in the region. This is done in batches of 20 and takes a long time if there are a lot of images and flavors in the region. The reason behind querying the images and flavors is to display names instead of UUIDs in the server list output.
Resolution
- To avoid long query time, run the server list command with the --no-name-lookup (-n)flag. This will not generate any GET calls to Glance or Nova for listing images and flavors with their names. A few examples are shown below.
# openstack server list --project <project-ID> --no-name-lookup
# openstack server list --all-projects --no-name-lookup
# openstack server list --project <project-ID> -n
# openstack server list --all-projects -n
Additional Information
Was this page helpful?