commit 4c6443c0b5579853f4b87eb8302d24aca99dddab
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)
Reviewed: https:/ /review. openstack. org/543595 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4c6443c0b55 79853f4b87eb830 2d24aca99dddab
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 4c6443c0b557985 3f4b87eb8302d24 aca99dddab
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)
Closes-Bug: #1746483
(cherry picked from commit 0a7427dc58eeb27