Is there a limit on the number of VMs returned by "openstack server list --all-projects" ?
Running Rocky with a single cell; we have VMs that do not show up in "openstack server list -all-projects" I can see them with "openstack server show" or with "openstack server list -all-projects -host" or by sourcing the credentials for their project and then "openstack server list" If there is a limit on the number of results, that would explain it. Is anyone else seeing this? Here's an example: UUID: d3302d8d-3747-4665-b044-863c8d8a6855 Hostname: us01bctest-centos-57241-5 IP: 10.195.72.66 Project: vgcloud Network: vg-network root@us01odc-p02-ctrl1:~# source admin-openrc root@us01odc-p02-ctrl1:~# openstack server list --all-projects|grep 10.195.72.66 root@us01odc-p02-ctrl1:~# source vg-openrc root@us01odc-p02-ctrl1:~# openstack server list|grep 10.195.72.66 | d3302d8d-3747-4665-b044-863c8d8a6855 | us01bctest-centos-57241-5 | ACTIVE | vg-network=10.195.72.66 | QSC-P-CentOS6.6-19P1-v4 | s1.16cx120g | root@us01odc-p02-ctrl1:~# source admin-openrc root@us01odc-p02-ctrl1:~# openstack server show d3302d8d-3747-4665-b044-863c8d8a6855 +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | us01-p02-hv017 | | OS-EXT-SRV-ATTR:hypervisor_hostname | us01-p02-hv017.internal.synopsys.com | | OS-EXT-SRV-ATTR:instance_name | instance-000002b6 | | OS-EXT-STS:power_state | Running | | OS-EXT-STS:task_state | None | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2019-11-02T01:20:12.000000 | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | vg-network=10.195.72.66 | | config_drive | | | created | 2019-11-02T01:15:45Z | | flavor | s1.16cx120g (3cfd8fbc-55da-4c1d-a717-ed86d3a0219f) | | hostId | bf015a3f08917dfc7d7b4d9e429cbe714fcdd11ab788086062fe0eab | | id | d3302d8d-3747-4665-b044-863c8d8a6855 | | image | QSC-P-CentOS6.6-19P1-v4 (91497018-7b42-4448-aa2a-4c08fc9621ac) | | key_name | None | | name | us01bctest-centos-57241-5 | | progress | 0 | | project_id | 0b591e0864d04e6b8b6afa18a5a4a638 | | properties | BU='SCE', Farm='bctest', FarmProject='bnormal', Owner='joelg', Workspace='us01bctest-centos', project='BCTest' | | security_groups | name='default' | | status | ACTIVE | | updated | 2019-11-02T01:20:12Z | | user_id | 0df75a295783f2f7c3843642f3a170f500bbeb4c69806bfd53e166b772617bf4 | | volumes_attached | | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ root@us01odc-p02-ctrl1:~# openstack server list --all-projects --host us01-p02-hv017|grep 10.195.72.66 | d3302d8d-3747-4665-b044-863c8d8a6855 | us01bctest-centos-57241-5 | ACTIVE | vg-network=10.195.72.66 | QSC-P-CentOS6.6-19P1-v4 | s1.16cx120g | root@us01odc-p02-ctrl1:~# openstack server list --all-projects|grep 10.195.72.66 root@us01odc-p02-ctrl1:~#
Turns out it is max_limit in /etc/nova/nova.conf. From: Albert Braden <Albert.Braden@synopsys.com> Sent: Friday, December 20, 2019 9:41 AM To: openstack-discuss@lists.openstack.org Subject: Is there a limit on the number of VMs returned by "openstack server list --all-projects" ? Running Rocky with a single cell; we have VMs that do not show up in "openstack server list -all-projects" I can see them with "openstack server show" or with "openstack server list -all-projects -host" or by sourcing the credentials for their project and then "openstack server list" If there is a limit on the number of results, that would explain it. Is anyone else seeing this? Here's an example: UUID: d3302d8d-3747-4665-b044-863c8d8a6855 Hostname: us01bctest-centos-57241-5 IP: 10.195.72.66 Project: vgcloud Network: vg-network root@us01odc-p02-ctrl1:~# source admin-openrc root@us01odc-p02-ctrl1:~# openstack server list --all-projects|grep 10.195.72.66 root@us01odc-p02-ctrl1:~# source vg-openrc root@us01odc-p02-ctrl1:~# openstack server list|grep 10.195.72.66 | d3302d8d-3747-4665-b044-863c8d8a6855 | us01bctest-centos-57241-5 | ACTIVE | vg-network=10.195.72.66 | QSC-P-CentOS6.6-19P1-v4 | s1.16cx120g | root@us01odc-p02-ctrl1:~# source admin-openrc root@us01odc-p02-ctrl1:~# openstack server show d3302d8d-3747-4665-b044-863c8d8a6855 +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | us01-p02-hv017 | | OS-EXT-SRV-ATTR:hypervisor_hostname | us01-p02-hv017.internal.synopsys.com | | OS-EXT-SRV-ATTR:instance_name | instance-000002b6 | | OS-EXT-STS:power_state | Running | | OS-EXT-STS:task_state | None | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2019-11-02T01:20:12.000000 | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | vg-network=10.195.72.66 | | config_drive | | | created | 2019-11-02T01:15:45Z | | flavor | s1.16cx120g (3cfd8fbc-55da-4c1d-a717-ed86d3a0219f) | | hostId | bf015a3f08917dfc7d7b4d9e429cbe714fcdd11ab788086062fe0eab | | id | d3302d8d-3747-4665-b044-863c8d8a6855 | | image | QSC-P-CentOS6.6-19P1-v4 (91497018-7b42-4448-aa2a-4c08fc9621ac) | | key_name | None | | name | us01bctest-centos-57241-5 | | progress | 0 | | project_id | 0b591e0864d04e6b8b6afa18a5a4a638 | | properties | BU='SCE', Farm='bctest', FarmProject='bnormal', Owner='joelg', Workspace='us01bctest-centos', project='BCTest' | | security_groups | name='default' | | status | ACTIVE | | updated | 2019-11-02T01:20:12Z | | user_id | 0df75a295783f2f7c3843642f3a170f500bbeb4c69806bfd53e166b772617bf4 | | volumes_attached | | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ root@us01odc-p02-ctrl1:~# openstack server list --all-projects --host us01-p02-hv017|grep 10.195.72.66 | d3302d8d-3747-4665-b044-863c8d8a6855 | us01bctest-centos-57241-5 | ACTIVE | vg-network=10.195.72.66 | QSC-P-CentOS6.6-19P1-v4 | s1.16cx120g | root@us01odc-p02-ctrl1:~# openstack server list --all-projects|grep 10.195.72.66 root@us01odc-p02-ctrl1:~#
On 12/20/2019 11:54 AM, Albert Braden wrote:
Turns out it is max_limit in /etc/nova/nova.conf.
Yeah: https://docs.openstack.org/nova/latest/configuration/config.html#api.max_lim... See: https://docs.openstack.org/api-guide/compute/paginated_collections.html -- Thanks, Matt
That's very useful, thank you! Is it possible to pull the value of max_limit from the Nova API, or does my script have to grep it from the config file? -----Original Message----- From: Matt Riedemann <mriedemos@gmail.com> Sent: Friday, December 20, 2019 10:06 AM To: openstack-discuss@lists.openstack.org Subject: Re: Is there a limit on the number of VMs returned by "openstack server list --all-projects" ? On 12/20/2019 11:54 AM, Albert Braden wrote:
Turns out it is max_limit in /etc/nova/nova.conf.
Yeah: https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.openstack.org_nova_latest_configuration_config.html-23api.max-5Flimit&d=DwIC-g&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=fw4LQMotcUaOT7JswRsLNAebebvAh1OraMveMnAAg6E&s=ody0k39ys8bbjMl6E5BKbSje7S-yx760EtWiiOdDHMc&e= See: https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.openstack.org_api-2Dguide_compute_paginated-5Fcollections.html&d=DwIC-g&c=DPL6_X_6JkXFx7AXWqB0tg&r=XrJBXYlVPpvOXkMqGPz6KucRW_ils95ZMrEmlTflPm8&m=fw4LQMotcUaOT7JswRsLNAebebvAh1OraMveMnAAg6E&s=n3XKVn2O-C2KBTN0ELtRSrar8WSq57Q74SnTTj6XSuA&e= -- Thanks, Matt
On 12/20/2019 2:28 PM, Albert Braden wrote:
Is it possible to pull the value of max_limit from the Nova API, or does my script have to grep it from the config file?
You'd have to get it from config. The end user of the cloud hitting the REST API should know as little about how the actual cloud is configured as possible unless it's available in some discoverable way like the version document or if some services have things like capabilities APIs. 403 responses for what you're allowed to do by policy is another discoverability thing but doesn't really help you here. -- Thanks, Matt
participants (2)
-
Albert Braden
-
Matt Riedemann