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.
Change-Id: Iee4b9bbf412adfdc6fdc62ea3429fb960d6ac2a2
Closes-Bug: 1709260
(cherry picked from commit 0dc0db932e3ad5ad911f2072015cb9854f6e4e23)
Reviewed: https:/ /review. openstack. org/585334 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2caf8f65e41 4732fb1ef1ac32a 5884a48af6655d
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 2caf8f65e414732 fb1ef1ac32a5884 a48af6655d
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 d911f2072015cb9 854f6e4e23)
Closes-Bug: 1709260
(cherry picked from commit 0dc0db932e3ad5a