Filter scheduler not respecting the force_hosts hint

Bug #1061665 reported by Dražen Lučanin
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Medium
koolhead17
nova (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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. I'm using Essex and the filter scheduler (my nova.conf contains `compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler`).

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']

Here is the full request grabbed from the nova-scheduler.log file: http://paste.ubuntu.com/1260083/

The matter was also discussed in this AskUbuntu question:

http://askubuntu.com/questions/169625/why-cant-i-get-nova-openstack-to-use-a-specific-host

I'm running Ubuntu server 12.04 and nova-scheduler version 2012.1-0ubuntu2.

Revision history for this message
Matt Mullins (mokomull) wrote :

I ran into the same problem. It seems that HostState.passes_filters gets called with different data in filter_properties than it expects. The attached patch makes it work, but I doubt it's a completely correct solution, since I don't handle more than one host in the force_hosts list.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "nova_1061665.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Vish Ishaya (vishvananda) wrote :

force_hosts is not a hint meant to be exposed to a user. if you want to force a host as an admin you can use the availability zone syntax:

nova boot --image <uuid> --flavor m1.tiny --key_name mykey --availability-zone nova:sleepy

Changed in nova:
status: New → Won't Fix
Revision history for this message
Matt Mullins (mokomull) wrote :

Then perhaps this is a documentation bug instead. "--hint force_hosts" is the currently-documented method in the Compute Administration Manual: http://docs.openstack.org/trunk/openstack-compute/admin/content/specify-host-to-boot-instances-on.html

affects: nova → openstack-manuals
Revision history for this message
Tom Fifield (fifieldt) wrote :

openstacl-manuals: to fix this bug

$ nova boot --image 1 --flavor 2 --key_name test --hint force_hosts=server2 my-first-server

becomes

nova boot --image <uuid> --flavor m1.tiny --key_name mykey --availability-zone nova:server2

An extra explanation of what an 'availability zone' is is necessary.

Changed in openstack-manuals:
status: Won't Fix → Confirmed
importance: Undecided → Medium
tags: added: nova
Changed in openstack-manuals:
status: Confirmed → Triaged
Revision history for this message
Dražen Lučanin (kermit666) wrote :

Hm, I'm getting:

error: unrecognized arguments: --availability-zone
Try `nova' for more information.

I'm running Essex. Is this a Folsom-only option? No way to get around it in Essex?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nova (Ubuntu):
status: New → Confirmed
Revision history for this message
Jordan Callicoat (jcallicoat) wrote :
koolhead17 (koolhead17)
Changed in openstack-manuals:
assignee: nobody → koolhead17 (koolhead17)
koolhead17 (koolhead17)
Changed in openstack-manuals:
status: Triaged → Fix Committed
Revision history for this message
Christian Parpart (trapni) wrote :

so what is the actual syntax for OpenStack Essex?
I also did not find anything in the docs (maybe I am blind) that you can specify a hostname as part of the availability zone's name.

Revision history for this message
Anne Gentle (annegentle) wrote : Re: [Bug 1061665] Re: Filter scheduler not respecting the force_hosts hint

There is an explanatory comment on the review for the doc update but we have not back ported to Essex docs - see

https://review.openstack.org/#/c/15983/

Anne Gentle
Content Stacker
<email address hidden>

On Nov 17, 2012, at 9:23 AM, Christian Parpart <email address hidden> wrote:

> so what is the actual syntax for OpenStack Essex?
> I also did not find anything in the docs (maybe I am blind) that you can specify a hostname as part of the availability zone's name.
>
> --
> You received this bug notification because you are subscribed to
> openstack-manuals.
> https://bugs.launchpad.net/bugs/1061665
>
> Title:
> Filter scheduler not respecting the force_hosts hint
>
> Status in OpenStack Manuals:
> Fix Committed
> Status in “nova” package in Ubuntu:
> Confirmed
>
> Bug description:
> 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. I'm using Essex and the filter scheduler (my nova.conf
> contains
> `compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler`).
>
> 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']
>
> Here is the full request grabbed from the nova-scheduler.log file:
> http://paste.ubuntu.com/1260083/
>
> The matter was also discussed in this AskUbuntu question:
>
> http://askubuntu.com/questions/169625/why-cant-i-get-nova-openstack-
> to-use-a-specific-host
>
> I'm running Ubuntu server 12.04 and nova-scheduler version
> 2012.1-0ubuntu2.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openstack-manuals/+bug/1061665/+subscriptions

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/15983
Committed: http://github.com/openstack/openstack-manuals/commit/3faca61ce3c20aea60d900afaaf9a9c7a19342d6
Submitter: Jenkins
Branch: master

commit 3faca61ce3c20aea60d900afaaf9a9c7a19342d6
Author: atul jha <email address hidden>
Date: Tue Nov 13 21:10:11 2012 +0530

    Fix bug 1061665, --force_hosts hint for launching instance updates

    --force_hosts no longer available in Folsom, have to indicate
    an availability zone instead.

    Patchset attempts to explain how to get the availability zone
    name that you want. Please review.

    Patchset addresses comments about zone versus host, adding
    new section rather than replacing host section completely.

    Change-Id: Ifea0df3dc950c165718fa160bc08f1b1487c3f82

Changed in openstack-manuals:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
information type: Public Security → Public
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/21018

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (stable/folsom)

Reviewed: https://review.openstack.org/21018
Committed: http://github.com/openstack/openstack-manuals/commit/d9b0e389b94ae8972ba3404069bcb0866c53e26c
Submitter: Jenkins
Branch: stable/folsom

commit d9b0e389b94ae8972ba3404069bcb0866c53e26c
Author: atul jha <email address hidden>
Date: Tue Nov 13 21:10:11 2012 +0530

    Cherry picked from https://review.openstack.org/#/c/15983/

    Fix bug 1061665, --force_hosts hint for launching instance updates

    --force_hosts no longer available in Folsom, have to indicate
    an availability zone instead.

    Patchset attempts to explain how to get the availability zone
    name that you want. Please review.

    Patchset addresses comments about zone versus host, adding
    new section rather than replacing host section completely.

    Change-Id: Ifea0df3dc950c165718fa160bc08f1b1487c3f82

tags: added: in-stable-folsom
Chuck Short (zulcss)
Changed in nova (Ubuntu):
status: Confirmed → Fix Released
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.