← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1871409] [NEW] cannot filter the list servers to show only those that does not have config drive

 

Public bug reported:

The server's config_drive field is "True" if there is a config drive
attached to the server and an empty string if there is no config drive
attached. Nova API allow filtering the list of servers returned by GET
/servers/details by config_drive, but the API does not allow specifying
an empty string in the filter. So there is no way to filter for servers
without config drive.

stack@aio:~$ curl -g -i -X GET 'http://192.168.121.129/compute/v2.1/servers/detail?config_drive=&;' -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.83" -H "User-Agent: python-novaclient" -H "X-Auth-Token: $TOKEN" -H "X-OpenStack-Nova-API-Version: 2.83" 
HTTP/1.1 400 Bad Request
Date: Tue, 07 Apr 2020 14:35:24 GMT
Server: Apache/2.4.29 (Ubuntu)
OpenStack-API-Version: compute 2.83
X-OpenStack-Nova-API-Version: 2.83
Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version
Content-Type: application/json; charset=UTF-8
Content-Length: 121
x-openstack-request-id: req-7d10c44b-9c9b-463e-8cbc-99f5bd68390a
x-compute-request-id: req-7d10c44b-9c9b-463e-8cbc-99f5bd68390a
Connection: close

{"badRequest": {"code": 400, "message": "Invalid input for query
parameters config_drive. Value: . '' is not a 'regex'"}}

stack@aio:~$

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: api

** Tags added: api

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1871409

Title:
  cannot filter the list servers to show only those that does not have
  config drive

Status in OpenStack Compute (nova):
  New

Bug description:
  The server's config_drive field is "True" if there is a config drive
  attached to the server and an empty string if there is no config drive
  attached. Nova API allow filtering the list of servers returned by GET
  /servers/details by config_drive, but the API does not allow
  specifying an empty string in the filter. So there is no way to filter
  for servers without config drive.

  stack@aio:~$ curl -g -i -X GET 'http://192.168.121.129/compute/v2.1/servers/detail?config_drive=&;' -H "Accept: application/json" -H "OpenStack-API-Version: compute 2.83" -H "User-Agent: python-novaclient" -H "X-Auth-Token: $TOKEN" -H "X-OpenStack-Nova-API-Version: 2.83" 
  HTTP/1.1 400 Bad Request
  Date: Tue, 07 Apr 2020 14:35:24 GMT
  Server: Apache/2.4.29 (Ubuntu)
  OpenStack-API-Version: compute 2.83
  X-OpenStack-Nova-API-Version: 2.83
  Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version
  Content-Type: application/json; charset=UTF-8
  Content-Length: 121
  x-openstack-request-id: req-7d10c44b-9c9b-463e-8cbc-99f5bd68390a
  x-compute-request-id: req-7d10c44b-9c9b-463e-8cbc-99f5bd68390a
  Connection: close

  {"badRequest": {"code": 400, "message": "Invalid input for query
  parameters config_drive. Value: . '' is not a 'regex'"}}

  stack@aio:~$

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1871409/+subscriptions