commit 88c51bde8c47b14e2750c5eb48f9c37b3a1c2ef7
Author: Matt Riedemann <email address hidden>
Date: Sun Feb 11 16:58:02 2018 -0500
Handle volume-backed instances in IsolatedHostsFilter
The RequestSpec.image object for a volume-backed instance will
not have the 'id' attribute set because the
nova.utils.get_image_metadata_from_volume() method doesn't convert
the volume['volume_image_metadata']['image_id'] into the ImageMeta.id
field. It is unclear if there are intentional reasons for omitting
this information, but the IsolatedHostsFilter has just never supported
filtering for volume-backed instances based on a provided image id.
The logic within the filter depends on the
restrict_isolated_hosts_to_isolated_images config option, which
defaults to True. When True, a volume-backed instance will not be
put on an isolated host. When False, a volume-backed instance can
go on any host, isolated or not.
Again, it's unclear if we should actually be filtering volume-backed
servers using the image_id from the volume_image_metadata or not,
but it's not what we've historically done so this change simply
fixes the regression bug.
Change-Id: Ieb8abb1a3f04ce008f9617e051e4d720dbe6917a
Closes-Bug: #1746483
(cherry picked from commit 0a7427dc58eeb271646a962604106e0e84b870b6)
(cherry picked from commit 4c6443c0b5579853f4b87eb8302d24aca99dddab)
(cherry picked from commit fb723851707d6a764cb8154343087affc19e5db0)
Reviewed: https:/ /review. openstack. org/543635 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=88c51bde8c4 7b14e2750c5eb48 f9c37b3a1c2ef7
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 88c51bde8c47b14 e2750c5eb48f9c3 7b3a1c2ef7
Author: Matt Riedemann <email address hidden>
Date: Sun Feb 11 16:58:02 2018 -0500
Handle volume-backed instances in IsolatedHostsFilter
The RequestSpec.image object for a volume-backed instance will utils.get_ image_metadata_ from_volume( ) method doesn't convert 'volume_ image_metadata' ]['image_ id'] into the ImageMeta.id
not have the 'id' attribute set because the
nova.
the volume[
field. It is unclear if there are intentional reasons for omitting
this information, but the IsolatedHostsFilter has just never supported
filtering for volume-backed instances based on a provided image id.
The logic within the filter depends on the isolated_ hosts_to_ isolated_ images config option, which
restrict_
defaults to True. When True, a volume-backed instance will not be
put on an isolated host. When False, a volume-backed instance can
go on any host, isolated or not.
Again, it's unclear if we should actually be filtering volume-backed image_metadata or not,
servers using the image_id from the volume_
but it's not what we've historically done so this change simply
fixes the regression bug.
Change-Id: Ieb8abb1a3f04ce 008f9617e051e4d 720dbe6917a 1646a962604106e 0e84b870b6) 3f4b87eb8302d24 aca99dddab) 64cb8154343087a ffc19e5db0)
Closes-Bug: #1746483
(cherry picked from commit 0a7427dc58eeb27
(cherry picked from commit 4c6443c0b557985
(cherry picked from commit fb723851707d6a7