2

When I'm trying to boot instances on a specific host (sleepy) by issuing:

nova boot --image mybucket/image.manifest.xml --flavor m1.tiny --key_name mykey --hint force_hosts=sleepy test-vm

my VMs always seem to start on a random host instead on the one I targeted. Does anybody know why that might be? I'm using Essex and the simple scheduler.

My user is admin (I sourced /var/lib/nova/novarc), I also have --allow_admin_api=true in my nova.conf file. The only mention of filter in my /var/log/nova-scheduler.log is

u'filter_properties': {u'scheduler_hints': {u'force_hosts': u'sleepy'}}.

This file also says u'_context_is_admin': True and u'_context_roles': [u'admin']

ish
  • 138,666
  • 36
  • 303
  • 312
metakermit
  • 2,600
  • 3
  • 28
  • 34

1 Answers1

1

Your problem is you are using the simple scheduler, which does not support filters or hints; it only "implements a naive scheduler that tries to find the least loaded host (i.e., implements a "spread-first" algorithm)."

You need to be using the Filter Scheduler, either as the primary or as the compute sub-scheduler.

See Chapter 11: Scheduling of the Openstack manual for more information.

Bogie
  • 544
  • 2
  • 9
  • I can't try out your solution at the moment, but after looking at the code it seems to me you are right - the [filter scheduler](https://github.com/openstack/nova/blob/stable/essex/nova/scheduler/filter_scheduler.py#L193), unlike the [simple scheduler](https://github.com/openstack/nova/blob/stable/essex/nova/scheduler/simple.py), calls the host_manager to filter hosts and only inside host_manager did I see [usage of the force_hosts option](https://github.com/openstack/nova/blob/stable/essex/nova/scheduler/host_manager.py#L150). I will try it out in a couple of days and give some more feedback. – metakermit Aug 15 '12 at 11:55
  • No, unfortunately, the issue seems to be appearing with the filter scheduler as well. I have `compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler` in my nova.conf and am still having the same problem. – metakermit Oct 04 '12 at 14:38