Make host_aggregate_map dictionary case-insensitive
As of now, if hostname is set as "compute0.example.com" (in lower case)
and user tries to add this host to host-aggregate but by-mistake types
"COMPUTE0.example.com" (in capital case), then instead of throwing
HostNotFound error, that host is successfully added to host-aggregate
as "COMPUTE0.example.com". And after that if instance creation request
with flavor matching metadata as host-aggregate metadata comes, this
host is not filtered by scheduler, since there is no host with hostname
COMPUTE0.example.com, as added in host-aggregate.
Fixed the issue by lowercasing all hostnames in host_aggregate_map
dictionary.
Reviewed: https:/ /review. openstack. org/498334 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0dc0db932e3 ad5ad911f207201 5cb9854f6e4e23
Committed: https:/
Submitter: Zuul
Branch: master
commit 0dc0db932e3ad5a d911f2072015cb9 854f6e4e23
Author: Rajesh Tailor <email address hidden>
Date: Fri Aug 18 12:33:09 2017 +0530
Make host_aggregate_map dictionary case-insensitive
As of now, if hostname is set as "compute0. example. com" (in lower case) example. com" (in capital case), then instead of throwing example. com". And after that if instance creation request example. com, as added in host-aggregate.
and user tries to add this host to host-aggregate but by-mistake types
"COMPUTE0.
HostNotFound error, that host is successfully added to host-aggregate
as "COMPUTE0.
with flavor matching metadata as host-aggregate metadata comes, this
host is not filtered by scheduler, since there is no host with hostname
COMPUTE0.
Fixed the issue by lowercasing all hostnames in host_aggregate_map
dictionary.
Change-Id: Iee4b9bbf412adf dc6fdc62ea3429f b960d6ac2a2
Closes-Bug: 1709260