Set group_members when converting to legacy request spec
In Pike we converted the affinity filter code to use the RequestSpec
object instead of legacy dicts. The filter used to populate server
group info in the filter_properties and the conversion removed that.
However, in the conductor, we are still converting RequestSpec back
and forth between object and primitive, and there is a mismatch
between the keys being set/get in filter_properties. So during a
reschedule with a server group, we hit an exception
"'NoneType' object is not iterable" in the RequestSpec.from_primitives
method and the reschedule fails.
This adds 'group_members' to the _to_legacy_group_info method to set
the key.
Closes-Bug: #1719730
NOTE(mriedem): In Ocata, the DiskFilter is still enabled by default
even though the FilterScheduler is using Placement and filtering
resources by DISK_GB inventory, which makes the functional test fail.
So in this backport, the enabled_filters are specifically set without
the RamFilter and DiskFilter since Placement handles those.
Change-Id: Icb418f2be575bb2ba82756fdeb67b24a28950746
(cherry picked from commit 9d6632a67d91fb3c5145c14ac38011e919d6d8c0)
(cherry picked from commit d288132dca7cc76dfc6679eda17bb8fcc62577de)
Reviewed: https:/ /review. openstack. org/517860 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=96ad6043bba cf47b29d46288ca 0d755541eb1d0e
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 96ad6043bbacf47 b29d46288ca0d75 5541eb1d0e
Author: melanie witt <email address hidden>
Date: Wed Sep 27 17:27:56 2017 +0000
Set group_members when converting to legacy request spec
In Pike we converted the affinity filter code to use the RequestSpec from_primitives
object instead of legacy dicts. The filter used to populate server
group info in the filter_properties and the conversion removed that.
However, in the conductor, we are still converting RequestSpec back
and forth between object and primitive, and there is a mismatch
between the keys being set/get in filter_properties. So during a
reschedule with a server group, we hit an exception
"'NoneType' object is not iterable" in the RequestSpec.
method and the reschedule fails.
This adds 'group_members' to the _to_legacy_ group_info method to set
the key.
Closes-Bug: #1719730
NOTE(mriedem): In Ocata, the DiskFilter is still enabled by default
even though the FilterScheduler is using Placement and filtering
resources by DISK_GB inventory, which makes the functional test fail.
So in this backport, the enabled_filters are specifically set without
the RamFilter and DiskFilter since Placement handles those.
Change-Id: Icb418f2be575bb 2ba82756fdeb67b 24a28950746 c5145c14ac38011 e919d6d8c0) dfc6679eda17bb8 fcc62577de)
(cherry picked from commit 9d6632a67d91fb3
(cherry picked from commit d288132dca7cc76