controller nova resize instance dont' work openstack Pike

Bug #1762596 reported by Rodolfo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Openstack Pike OpenSUSE 42.3 with KVM Hypervisor.

command exec:

nova --debug resize --poll 99624d22-b4e4-464b-98ae-f446ec6acd36 92a7eef9-9ba0-48b9-a30f-be8c835892a7

OUTPUT:

DEBUG (session:727) POST call to compute for http://controller.stack.intranet.net:8774/v2.1/servers/99624d22-b4e4-464b-98ae-f446ec6acd36/action used request id req-638be505-68ee-4ded-963c-42d805600973
DEBUG (shell:951) No valid host was found. No valid host found for resize (HTTP 400) (Request-ID: req-638be505-68ee-4ded-963c-42d805600973)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 949, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 871, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 1864, in do_resize
    server.resize(flavor, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 393, in resize
    return self.manager.resize(self, flavor, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 1566, in resize
    return self._action('resize', server, info=info, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 1931, in _action
    info=info, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 1942, in _action_return_resp_and_body
    return self.api.client.post(url, body=body)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 294, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 83, in request
    raise exceptions.from_response(resp, body, url, method)
BadRequest: No valid host was found. No valid host found for resize (HTTP 400) (Request-ID: req-638be505-68ee-4ded-963c-42d805600973)
ERROR (BadRequest): No valid host was found. No valid host found for resize (HTTP 400) (Request-ID: req-638be505-68ee-4ded-963c-42d805600973)

Log service:

nova.scheduler.manager =>

Got no allocation candidates from the Placement API. This may be a temporary occurrence as compute

nodes start up and begin reporting inventory to the Placement service. select_destinations

...
  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 232, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 139, in select_destinations
    raise exception.NoValidHost(reason="")

NoValidHost: No valid host was found.
: NoValidHost_Remote: No valid host was found.
Traceback (most recent call last):

Configuration:

Enable in Controller and Compute node:

allow_migrate_to_same_host = True
allow_resize_to_same_host = True

 nova-status upgrade check => work
+---------------------------+
| Upgrade Check Results |
+---------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+---------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+---------------------------+
| Check: Resource Providers |
| Result: Success |
| Details: None |
+---------------------------+

when deploy a instance work don't problem... but didn't resize flavor. the quota is fine, the service also for example nova-placement-api, nova-conductor, nova-compute, nova-scheduler all state up.

nova service-list

+--------------------------------------+------------------+-------------+----------+---------+-------+----------------------------+-----------------+-------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Forced down |
+--------------------------------------+------------------+-------------+----------+---------+-------+----------------------------+-----------------+-------------+
| 19d81123-4c5a-4fc4-9803-bb4a06137ece | nova-conductor | controller1 | internal | enabled | down | 2018-04-07T23:22:14.000000 | - | False |
| 42b9268b-ff71-4664-ad12-209b4fad6b56 | nova-consoleauth | controller1 | internal | enabled | down | 2018-04-07T23:22:11.000000 | - | False |
| 498724bf-9d2a-4623-93f6-75e55dbea7b1 | nova-scheduler | controller1 | internal | enabled | down | 2018-04-07T23:22:11.000000 | - | False |
| 5f0fb48f-4de8-41fd-953c-4ad0a991f2ee | nova-compute | compute2 | nova | enabled | up | 2018-04-10T02:18:40.000000 | - | False |
| 3f2a0a8b-81d5-43d6-80ce-dc419e57dfa5 | nova-scheduler | controller2 | internal | enabled | up | 2018-04-10T02:18:45.000000 | - | False |
| a6bcc0a0-184c-462e-affb-e71bb7ebb1b0 | nova-consoleauth | controller2 | internal | enabled | up | 2018-04-10T02:18:41.000000 | - | False |
| 590c6d3b-f404-4e01-b694-2df41ec34aa8 | nova-conductor | controller2 | internal | enabled | up | 2018-04-10T02:18:43.000000 | - | False |
+--------------------------------------+------------------+-------------+----------+---------+-------+----------------------------+-----------------+

...

Repositorio : Pike
Nombre : openstack-nova-scheduler
Versión : 16.1.1~dev63-1.1
Arquitectura : x86_64

Repositorio : Pike
Nombre : openstack-nova-api
Versión : 16.1.1~dev63-1.1
Arquitectura : x86_64

Repositorio : Pike
Nombre : openstack-nova-compute
Versión : 16.1.1~dev63-1.1
Arquitectura : x86_64

Repositorio : openSUSE-Leap-42.3-Update
Nombre : qemu-kvm
Versión : 2.9.1-41.1
Arquitectura : x86_64

Revision history for this message
Matt Riedemann (mriedem) wrote :

This is the main issue:

"Got no allocation candidates from the Placement API. This may be a temporary occurrence as compute
nodes start up and begin reporting inventory to the Placement service. select_destinations"

Starting in Pike, the FilterScheduler is asking the Placement service for eligible compute nodes as destinations for the resize based on the new flavor. The error is saying that Placement can't find any eligible target hosts for the resize.

You might be hitting a known issue in Pike, see the last point in the second bullet here:

https://docs.openstack.org/nova/latest/user/placement.html#pike-16-0-0

"For a resize to the same host, allocations are summed on the single compute node. This could pose a problem if the compute node has limited capacity. Since resizing to the same host is disabled by default, and generally only used in testing, this is mentioned for completeness but should not be a concern for production deployments."

You could attempt to debug this using the "openstack resource provider inventory list" CLI:

https://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-inventory-list

The resource provider UUID is the same as the compute node UUID, which you can get from the os-hypervisors API starting with microversion 2.53:

https://developer.openstack.org/api-ref/compute/#list-hypervisors

So if you're resizing to the same host, you'd want to find out which compute node the instance is currently running on, get it's UUID and then query the "openstack resource provider inventory list" CLI to check the current inventory on that node, and you can also get the current allocations against that node using:

https://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-show

Using the --allocations option. If (inventory - allocations) < new_flavor for resize, then that's why you're getting NoValidHost for that compute node.

tags: added: placement resize scheduler
Revision history for this message
Matt Riedemann (mriedem) wrote :

Looking at your service list output, you only have a single compute service, correct? So you have to resize to the same host, and the placement service is saying that host has no space left for the resize to the new flavor that you're attempting.

Changed in nova:
status: New → Invalid
Revision history for this message
Rodolfo (atomrag) wrote : Re: [Bug 1762596] Re: controller nova resize instance dont' work openstack Pike
Download full text (16.2 KiB)

Hello, i try it again after update with the new package in the controller and the compute node and after that work all the resize with same host.

i understand you about documentation but when a i tryed it didn't work may by a error with nova-scheduler or nova-placement-api with the sync service in the compute and controller. Now work all service and compute node and all instance.

this version installed:

Information for package openstack-nova-api:
-------------------------------------------
Repository : Pike
Name : openstack-nova-api
Version : 16.1.2~dev1-1.1
Arch : noarch
Vendor : obs://build.opensuse.org/Cloud:OpenStack
Installed Size : 18,0 KiB
Installed : Yes
Status : up-to-date
Source package : openstack-nova-16.1.2~dev1-1.1.src
Summary : OpenStack Compute (Nova) - API
Description :
    This package contains the OpenStack Nova API.
Information for package openstack-nova-compute:
-----------------------------------------------
Repository : Pike
Name : openstack-nova-compute
Version : 16.1.2~dev1-1.1
Arch : noarch
Vendor : obs://build.opensuse.org/Cloud:OpenStack
Installed Size : 21,4 KiB
Installed : Yes
Status : up-to-date
Source package : openstack-nova-16.1.2~dev1-1.1.src
Summary : OpenStack Compute (Nova) - Compute
Description :
    This package contains the compute part of OpenStack.

Information for package openstack-cinder-volume:
------------------------------------------------
Repository : Pike
Name : openstack-cinder-volume
Version : 11.1.1~dev23-1.2
Arch : noarch
Vendor : obs://build.opensuse.org/Cloud:OpenStack
Installed Size : 23,5 KiB
Installed : Yes
Status : out-of-date (version 11.1.1~dev23-1.1 installed)
Source package : openstack-cinder-11.1.1~dev23-1.2.src
Summary : OpenStack Block Storage (Cinder) - Volume
Description :
    This package contains the OpenStack Cinder volume manager.

Information for package openstack-neutron-openvswitch-agent:
------------------------------------------------------------
Repository : Pike
Name : openstack-neutron-openvswitch-agent
Version : 11.0.4~dev12-1.3
Arch ...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.