[openstack-dev] [nova] How to debug no valid host failures with placement

Ben Nemec openstack at nemebean.com
Wed Aug 1 17:06:52 UTC 2018


Aha, thanks!  That explains why I couldn't find any client commands for 
placement before.

To close the loop on the problem I was having, it looks like the 
allocation_ratio config opts are now just defaults, and if you want to 
change ratios after the initial deployment you need to do so with the 
client.  This is what I used:

openstack resource provider inventory class set 
f931b646-ce18-43f6-8c95-bd3ba82fb9a8 DISK_GB --total 111 
--allocation_ratio 2.0

I will note that it's a little annoying that you have to specify all of 
the fields on this call.  To change allocation_ratio I also had to pass 
total even though I didn't want to change total.  MEMORY_MB is even 
worse because not passing max_unit and reserved as well will cause those 
to revert to max_int and 0, which I can't imagine ever being right.  I 
guess this isn't something that users would do a lot, but it could be a 
nasty surprise if they tried to update something, had reserved go to 
zero but didn't notice, and suddenly find they're overcommitting more 
than they intended.

Anyway, thanks again for the help.  I hope this thread will be useful to 
other people who are learning placement too.

-Ben

On 08/01/2018 10:58 AM, Andrey Volkov wrote:
> Hi,
> 
> It seems you need first to check what placement knows about resources of 
> your cloud.
> This can be done either with REST API [1] or with osc-placement [2].
> For osc-placement you could use:
> 
> pip install osc-placement
> openstack allocation candidate list --resource DISK_GB=20 --resource 
> MEMORY_MB=2048 --resource VCPU=1 --os-placement-api-version 1.10
> 
> And you can explore placement state with other commands like openstack 
> resource provider list, resource provider inventory list, resource 
> provider usage show.
> 
> [1] https://developer.openstack.org/api-ref/placement/
> [2] https://docs.openstack.org/osc-placement/latest/index.html
> 
> On Wed, Aug 1, 2018 at 6:16 PM Ben Nemec <openstack at nemebean.com 
> <mailto:openstack at nemebean.com>> wrote:
> 
>     Hi,
> 
>     I'm having an issue with no valid host errors when starting instances
>     and I'm struggling to figure out why.  I thought the problem was disk
>     space, but I changed the disk_allocation_ratio and I'm still getting no
>     valid host.  The host does have plenty of disk space free, so that
>     shouldn't be a problem.
> 
>     However, I'm not even sure it's disk that's causing the failures
>     because
>     I can't find any information in the logs about why the no valid host is
>     happening.  All I get from the scheduler is:
> 
>     "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."
> 
>     While in placement I see:
> 
>     2018-08-01 15:02:22.062 20 DEBUG
>     nova.api.openstack.placement.requestlog
>     [req-0a830ce9-e2af-413a-86cb-b47ae129b676
>     fc44fe5cefef43f4b921b9123c95e694 b07e6dc2e6284b00ac7070aa3457c15e -
>     default default] Starting request: 10.2.2.201 "GET
>     /placement/allocation_candidates?limit=1000&resources=DISK_GB%3A20%2CMEMORY_MB%3A2048%2CVCPU%3A1"
> 
>     __call__
>     /usr/lib/python2.7/site-packages/nova/api/openstack/placement/requestlog.py:38
>     2018-08-01 15:02:22.103 20 INFO nova.api.openstack.placement.requestlog
>     [req-0a830ce9-e2af-413a-86cb-b47ae129b676
>     fc44fe5cefef43f4b921b9123c95e694 b07e6dc2e6284b00ac7070aa3457c15e -
>     default default] 10.2.2.201 "GET
>     /placement/allocation_candidates?limit=1000&resources=DISK_GB%3A20%2CMEMORY_MB%3A2048%2CVCPU%3A1"
> 
>     status: 200 len: 53 microversion: 1.25
> 
>     Basically it just seems to be logging that it got a request, but
>     there's
>     no information about what it did with that request.
> 
>     So where do I go from here?  Is there somewhere else I can look to see
>     why placement returned no candidates?
> 
>     Thanks.
> 
>     -Ben
> 
>     __________________________________________________________________________
>     OpenStack Development Mailing List (not for usage questions)
>     Unsubscribe:
>     OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>     <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
>     http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> 
> 
> -- 
> Thanks,
> 
> Andrey Volkov,
> Software Engineer, Mirantis, Inc.
> 
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 



More information about the OpenStack-dev mailing list