← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2081023] [NEW] evacuate with microversion 2.95 fails with BadRequest {'currently': 0, 'expected': 62}

 

Public bug reported:

stack@aio:/opt/stack/python-openstackclient$ openstack server evacuate vm1
BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}


* osc 7.1.1
* single node devstack from master
* create an instance
* disable and force down the compute
* try to evacuate the instance


client log:
```
REQ: curl -g -i -X POST http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action -H "Accept: " -H "Content-Type: application/json" -H "OpenStack-API-Version: compute 2.96" -H "User-Agent: openstacksdk/4.1.0 keystoneauth1/5.8.0 python-requests/2.32.3 CPython/3.12.3" -H "X-Auth-Token: {SHA256}7377cce62f0cb1078b3614b9a11845b1aadd0bd1f05c6c708b353cbeb23c3677" -H "X-OpenStack-Nova-API-Version: 2.96" -d '{"evacuate": {}}'
Resetting dropped connection: 192.168.121.9
http://192.168.121.9:80 "POST /compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action HTTP/1.1" 400 76
RESP: [400] Connection: close Content-Length: 76 Content-Type: application/json; charset=UTF-8 Date: Wed, 18 Sep 2024 06:53:55 GMT OpenStack-API-Version: compute 2.96 Server: Apache/2.4.58 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.96 x-compute-request-id: req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae x-openstack-request-id: req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae
RESP BODY: {"badRequest": {"code": 400, "message": "{'currently': 0, 'expected': 62}"}}
POST call to compute for http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action used request id req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae
BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}
Traceback (most recent call last):
  File "/opt/stack/data/venv/lib/python3.12/site-packages/cliff/app.py", line 431, in run_subcommand
    result = cmd.run(parsed_args)
             ^^^^^^^^^^^^^^^^^^^^
  File "/opt/stack/data/venv/lib/python3.12/site-packages/osc_lib/command/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/stack/data/venv/lib/python3.12/site-packages/cliff/display.py", line 121, in run
    column_names, data = self.take_action(parsed_args)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/stack/python-openstackclient/openstackclient/compute/v2/server.py", line 3884, in take_action
    compute_client.evacuate_server(server, **kwargs)
  File "/opt/stack/openstacksdk/openstack/compute/v2/_proxy.py", line 1114, in evacuate_server
    server.evacuate(
  File "/opt/stack/openstacksdk/openstack/compute/v2/server.py", line 772, in evacuate
    self._action(session, body)
  File "/opt/stack/openstacksdk/openstack/compute/v2/server.py", line 343, in _action
    exceptions.raise_from_response(response)
  File "/opt/stack/openstacksdk/openstack/exceptions.py", line 244, in raise_from_response
    raise cls(
openstack.exceptions.BadRequestException: BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}
clean_up EvacuateServer: BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}
```

nova-api log:
```
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG nova.api.openstack.wsgi [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Action: 'action', calling method: <bound method EvacuateController._evacuate of <nova.api.openstack.compute.evacuate.EvacuateController object at 0x72087167cb90>>, body: {"evacuate": {}} {{(pid=87253) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:518}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG nova.compute.api [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] [instance: 2ed7c251-fbd2-47e5-acc9-090a32baffec] Fetching instance by UUID {{(pid=87253) get /opt/stack/nova/nova/compute/api.py:2981}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "00000000-0000-0000-0000-000000000000" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "00000000-0000-0000-0000-000000000000" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "00000000-0000-0000-0000-000000000000" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: INFO nova.api.openstack.wsgi [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] HTTP exception thrown: {'currently': 0, 'expected': 62}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG nova.api.openstack.wsgi [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Returning 400 to user: {'currently': 0, 'expected': 62} {{(pid=87253) __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:956}}
Sep 18 06:53:55 aio devstack@n-api.service[87253]: INFO nova.api.openstack.requestlog [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] 192.168.121.9 "POST /compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action" status: 400 len: 76 microversion: 2.96 time: 0.011445
```

Using older microversion works:
```
stack@aio:/opt/stack/python-openstackclient$ openstack --os-compute-api-version 2.94  server evacuate vm1
compute version 2.94 is not in supported versions: 2, 2.1
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                               | Value                                                                                                                                                                      |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                                                                                                                                                     |
| OS-EXT-AZ:availability_zone         | nova                                                                                                                                                                       |
| OS-EXT-SRV-ATTR:host                | aio                                                                                                                                                                        |
| OS-EXT-SRV-ATTR:hostname            | vm1                                                                                                                                                                        |
| OS-EXT-SRV-ATTR:hypervisor_hostname | aio                                                                                                                                                                        |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000001                                                                                                                                                          |
| OS-EXT-SRV-ATTR:kernel_id           |                                                                                                                                                                            |
| OS-EXT-SRV-ATTR:launch_index        | 0                                                                                                                                                                          |
| OS-EXT-SRV-ATTR:ramdisk_id          |                                                                                                                                                                            |
| OS-EXT-SRV-ATTR:reservation_id      | r-4nynd1i3                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:root_device_name    | /dev/vda                                                                                                                                                                   |
| OS-EXT-SRV-ATTR:user_data           | None                                                                                                                                                                       |
| OS-EXT-STS:power_state              | Running                                                                                                                                                                    |
| OS-EXT-STS:task_state               | rebuilding                                                                                                                                                                 |
| OS-EXT-STS:vm_state                 | active                                                                                                                                                                     |
| OS-SRV-USG:launched_at              | 2024-09-18T06:50:27.000000                                                                                                                                                 |
| OS-SRV-USG:terminated_at            | None                                                                                                                                                                       |
| accessIPv4                          |                                                                                                                                                                            |
| accessIPv6                          |                                                                                                                                                                            |
| addresses                           |                                                                                                                                                                            |
| config_drive                        |                                                                                                                                                                            |
| created                             | 2024-09-18T06:50:18Z                                                                                                                                                       |
| description                         | None                                                                                                                                                                       |
| flavor                              | description=, disk='1', ephemeral='0', extra_specs.hw_rng:allowed='True', id='cirros256', is_disabled=, is_public='True', location=, name='cirros256',                     |
|                                     | original_name='cirros256', ram='256', rxtx_factor=, swap='0', vcpus='1'                                                                                                    |
| hostId                              | 33f32221dc88921a2357f89abfaa8ff5833af1806f0df79ee3ea05d4                                                                                                                   |
| host_status                         | DOWN                                                                                                                                                                       |
| id                                  | 2ed7c251-fbd2-47e5-acc9-090a32baffec                                                                                                                                       |
| image                               | cirros-0.6.2-x86_64-disk (fb2499b2-c5dd-48d2-8493-b52741253912)                                                                                                            |
| key_name                            | None                                                                                                                                                                       |
| locked                              | False                                                                                                                                                                      |
| locked_reason                       | None                                                                                                                                                                       |
| name                                | vm1                                                                                                                                                                        |
| pinned_availability_zone            | None                                                                                                                                                                       |
| progress                            | 0                                                                                                                                                                          |
| project_id                          | b98570e0e8204322a3528e65024d9045                                                                                                                                           |
| properties                          |                                                                                                                                                                            |
| server_groups                       | None                                                                                                                                                                       |
| status                              | REBUILD                                                                                                                                                                    |
| tags                                |                                                                                                                                                                            |
| trusted_image_certificates          | None                                                                                                                                                                       |
| updated                             | 2024-09-18T06:58:13Z                                                                                                                                                       |
| user_id                             | 5bd4392f854b41ec8dd6e053d6d778ec                                                                                                                                           |
| volumes_attached                    |                                                                                                                                                                            |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```


The error message is totally useless for the user as it does not state what are those numbers returned. Based on the code this is the current and the minimum service version required for evacuation to stopped state. https://github.com/openstack/nova/blob/b16445df86e76fa4ed299f4002d78f03dbfd0921/nova/api/openstack/compute/evacuate.py#L107-L113

In a system where all the computes are forced down the minimum service
version returns 0 causing the rejected evacuation. Such evacuation would
fail anyhow as all the compute is forced down so probably having a
proper error returned would be enough.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/2081023

Title:
  evacuate with microversion 2.95 fails with BadRequest {'currently': 0,
  'expected': 62}

Status in OpenStack Compute (nova):
  New

Bug description:
  stack@aio:/opt/stack/python-openstackclient$ openstack server evacuate vm1
  BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}

  
  * osc 7.1.1
  * single node devstack from master
  * create an instance
  * disable and force down the compute
  * try to evacuate the instance

  
  client log:
  ```
  REQ: curl -g -i -X POST http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action -H "Accept: " -H "Content-Type: application/json" -H "OpenStack-API-Version: compute 2.96" -H "User-Agent: openstacksdk/4.1.0 keystoneauth1/5.8.0 python-requests/2.32.3 CPython/3.12.3" -H "X-Auth-Token: {SHA256}7377cce62f0cb1078b3614b9a11845b1aadd0bd1f05c6c708b353cbeb23c3677" -H "X-OpenStack-Nova-API-Version: 2.96" -d '{"evacuate": {}}'
  Resetting dropped connection: 192.168.121.9
  http://192.168.121.9:80 "POST /compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action HTTP/1.1" 400 76
  RESP: [400] Connection: close Content-Length: 76 Content-Type: application/json; charset=UTF-8 Date: Wed, 18 Sep 2024 06:53:55 GMT OpenStack-API-Version: compute 2.96 Server: Apache/2.4.58 (Ubuntu) Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version X-OpenStack-Nova-API-Version: 2.96 x-compute-request-id: req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae x-openstack-request-id: req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae
  RESP BODY: {"badRequest": {"code": 400, "message": "{'currently': 0, 'expected': 62}"}}
  POST call to compute for http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action used request id req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae
  BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}
  Traceback (most recent call last):
    File "/opt/stack/data/venv/lib/python3.12/site-packages/cliff/app.py", line 431, in run_subcommand
      result = cmd.run(parsed_args)
               ^^^^^^^^^^^^^^^^^^^^
    File "/opt/stack/data/venv/lib/python3.12/site-packages/osc_lib/command/command.py", line 38, in run
      return super(Command, self).run(parsed_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/stack/data/venv/lib/python3.12/site-packages/cliff/display.py", line 121, in run
      column_names, data = self.take_action(parsed_args)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/stack/python-openstackclient/openstackclient/compute/v2/server.py", line 3884, in take_action
      compute_client.evacuate_server(server, **kwargs)
    File "/opt/stack/openstacksdk/openstack/compute/v2/_proxy.py", line 1114, in evacuate_server
      server.evacuate(
    File "/opt/stack/openstacksdk/openstack/compute/v2/server.py", line 772, in evacuate
      self._action(session, body)
    File "/opt/stack/openstacksdk/openstack/compute/v2/server.py", line 343, in _action
      exceptions.raise_from_response(response)
    File "/opt/stack/openstacksdk/openstack/exceptions.py", line 244, in raise_from_response
      raise cls(
  openstack.exceptions.BadRequestException: BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}
  clean_up EvacuateServer: BadRequestException: 400: Client Error for url: http://192.168.121.9/compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action, {'currently': 0, 'expected': 62}
  ```

  nova-api log:
  ```
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG nova.api.openstack.wsgi [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Action: 'action', calling method: <bound method EvacuateController._evacuate of <nova.api.openstack.compute.evacuate.EvacuateController object at 0x72087167cb90>>, body: {"evacuate": {}} {{(pid=87253) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:518}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG nova.compute.api [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] [instance: 2ed7c251-fbd2-47e5-acc9-090a32baffec] Fetching instance by UUID {{(pid=87253) get /opt/stack/nova/nova/compute/api.py:2981}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "00000000-0000-0000-0000-000000000000" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "00000000-0000-0000-0000-000000000000" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "00000000-0000-0000-0000-000000000000" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Acquiring lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:402}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:407}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG oslo_concurrency.lockutils [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Lock "747fb487-bfc9-47fb-b68a-9cecdacd6573" "released" by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.000s {{(pid=87253) inner /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:421}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: INFO nova.api.openstack.wsgi [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] HTTP exception thrown: {'currently': 0, 'expected': 62}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: DEBUG nova.api.openstack.wsgi [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] Returning 400 to user: {'currently': 0, 'expected': 62} {{(pid=87253) __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:956}}
  Sep 18 06:53:55 aio devstack@n-api.service[87253]: INFO nova.api.openstack.requestlog [None req-748963e3-cbe0-4e4a-a25a-df67efc8f4ae admin admin] 192.168.121.9 "POST /compute/v2.1/servers/2ed7c251-fbd2-47e5-acc9-090a32baffec/action" status: 400 len: 76 microversion: 2.96 time: 0.011445
  ```

  Using older microversion works:
  ```
  stack@aio:/opt/stack/python-openstackclient$ openstack --os-compute-api-version 2.94  server evacuate vm1
  compute version 2.94 is not in supported versions: 2, 2.1
  +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Field                               | Value                                                                                                                                                                      |
  +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | OS-DCF:diskConfig                   | MANUAL                                                                                                                                                                     |
  | OS-EXT-AZ:availability_zone         | nova                                                                                                                                                                       |
  | OS-EXT-SRV-ATTR:host                | aio                                                                                                                                                                        |
  | OS-EXT-SRV-ATTR:hostname            | vm1                                                                                                                                                                        |
  | OS-EXT-SRV-ATTR:hypervisor_hostname | aio                                                                                                                                                                        |
  | OS-EXT-SRV-ATTR:instance_name       | instance-00000001                                                                                                                                                          |
  | OS-EXT-SRV-ATTR:kernel_id           |                                                                                                                                                                            |
  | OS-EXT-SRV-ATTR:launch_index        | 0                                                                                                                                                                          |
  | OS-EXT-SRV-ATTR:ramdisk_id          |                                                                                                                                                                            |
  | OS-EXT-SRV-ATTR:reservation_id      | r-4nynd1i3                                                                                                                                                                 |
  | OS-EXT-SRV-ATTR:root_device_name    | /dev/vda                                                                                                                                                                   |
  | OS-EXT-SRV-ATTR:user_data           | None                                                                                                                                                                       |
  | OS-EXT-STS:power_state              | Running                                                                                                                                                                    |
  | OS-EXT-STS:task_state               | rebuilding                                                                                                                                                                 |
  | OS-EXT-STS:vm_state                 | active                                                                                                                                                                     |
  | OS-SRV-USG:launched_at              | 2024-09-18T06:50:27.000000                                                                                                                                                 |
  | OS-SRV-USG:terminated_at            | None                                                                                                                                                                       |
  | accessIPv4                          |                                                                                                                                                                            |
  | accessIPv6                          |                                                                                                                                                                            |
  | addresses                           |                                                                                                                                                                            |
  | config_drive                        |                                                                                                                                                                            |
  | created                             | 2024-09-18T06:50:18Z                                                                                                                                                       |
  | description                         | None                                                                                                                                                                       |
  | flavor                              | description=, disk='1', ephemeral='0', extra_specs.hw_rng:allowed='True', id='cirros256', is_disabled=, is_public='True', location=, name='cirros256',                     |
  |                                     | original_name='cirros256', ram='256', rxtx_factor=, swap='0', vcpus='1'                                                                                                    |
  | hostId                              | 33f32221dc88921a2357f89abfaa8ff5833af1806f0df79ee3ea05d4                                                                                                                   |
  | host_status                         | DOWN                                                                                                                                                                       |
  | id                                  | 2ed7c251-fbd2-47e5-acc9-090a32baffec                                                                                                                                       |
  | image                               | cirros-0.6.2-x86_64-disk (fb2499b2-c5dd-48d2-8493-b52741253912)                                                                                                            |
  | key_name                            | None                                                                                                                                                                       |
  | locked                              | False                                                                                                                                                                      |
  | locked_reason                       | None                                                                                                                                                                       |
  | name                                | vm1                                                                                                                                                                        |
  | pinned_availability_zone            | None                                                                                                                                                                       |
  | progress                            | 0                                                                                                                                                                          |
  | project_id                          | b98570e0e8204322a3528e65024d9045                                                                                                                                           |
  | properties                          |                                                                                                                                                                            |
  | server_groups                       | None                                                                                                                                                                       |
  | status                              | REBUILD                                                                                                                                                                    |
  | tags                                |                                                                                                                                                                            |
  | trusted_image_certificates          | None                                                                                                                                                                       |
  | updated                             | 2024-09-18T06:58:13Z                                                                                                                                                       |
  | user_id                             | 5bd4392f854b41ec8dd6e053d6d778ec                                                                                                                                           |
  | volumes_attached                    |                                                                                                                                                                            |
  +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  ```

  
  The error message is totally useless for the user as it does not state what are those numbers returned. Based on the code this is the current and the minimum service version required for evacuation to stopped state. https://github.com/openstack/nova/blob/b16445df86e76fa4ed299f4002d78f03dbfd0921/nova/api/openstack/compute/evacuate.py#L107-L113

  In a system where all the computes are forced down the minimum service
  version returns 0 causing the rejected evacuation. Such evacuation
  would fail anyhow as all the compute is forced down so probably having
  a proper error returned would be enough.

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