Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information