hostname comparison for foced_host should be case-insensitive

Bug #1464348 reported by rick jones
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Chris Dent

Bug Description

It would appear that when the scheduler is matching the hostname provided in the --availability-zone option with the hostnames of the compute nodes in a case-sensitive manner. However, going back to the misty Dawn of Internet Time hostnames have been case-insensitive items. As such, the scheduler should be making the comparisons on a case-insensitive basis.

$ /opt/stack/venvs/nova/bin/nova-scheduler --version
2014.2.3

Tags: scheduler
tags: added: scheduler
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@rick jones:
Thanks for reporting this issue. Could you add the steps on how to reproduce this issue, please? After providing these details, please switch the status of this bug to "New" again. Thanks!

Changed in nova:
status: New → Incomplete
Revision history for this message
rick jones (perfgeek) wrote :

1) Become forced_host enabled - either by being admin or by adding the role to a mere mortal user/tenant, or by removing the is_admin:True from the Nova policy.json file
2) Armed with the hostname of a compute node, flip one or more of the characters to upper case when passing that in through the --availability-zone option of Nova boot. For example if the hostname is "foo" use "Foo"
3) You will see a "no valid host found" once the instance goes into ERROR state.

Changed in nova:
status: Incomplete → New
Changed in nova:
assignee: nobody → vishal yadav (vishalcdac07)
Changed in nova:
status: New → In Progress
Revision history for this message
Ming Yang (mingy) wrote :

It seems that the method `get_filtered_hosts` in nova.scheduler.host_manager does not deal with case insensitivity.

Revision history for this message
Ming Yang (mingy) wrote :

Is anybody still working on this? If not, can I take this?

Ming Yang (mingy)
Changed in nova:
assignee: vishal yadav (vishalcdac07) → Ming Yang (mingy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/201725

Changed in nova:
importance: Undecided → Low
Chris Dent (cdent)
Changed in nova:
assignee: Ming Yang (mingy) → Chris Dent (cdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/290532

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

Reviewed: https://review.openstack.org/290532
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a86f1d129d27f82ca514814164487d23ce728ad9
Submitter: Jenkins
Branch: master

commit a86f1d129d27f82ca514814164487d23ce728ad9
Author: Chris Dent <email address hidden>
Date: Wed Mar 9 14:16:23 2016 +0000

    Make force_ and ignore_hosts comparisons case insensitive

    Hostnames, since the dawn of time, are case insensitive so they
    should be compared thusly when preparing hosts to be filtered.

    Note that this change does not do anything with nodenames.

    Change-Id: I50e2e5cf749f0d39a05ccc373ae1d00824d927ea
    Co-Authored-By: Ming Yang <email address hidden>
    Closes-Bug: #1464348

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/nova 13.0.0.0rc1

This issue was fixed in the openstack/nova 13.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/201725
Reason: This code hasn't been updated in a long time, and is in merge conflict. I am going to abandon this review, but feel free to restore it if you're still working on this.

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.