Refresh service states for a group
Prior to an action resulting from missing service owners, all of the
services for a group should be refreshed to ensure they are in the most
up-to-date state. Ensuring the service states are current allows the
action to be correctly taken since owners of services could change at
anytime.
Change-Id: I59c59c6fcf456fa9c0a733d6406c90ea11f6e2b2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/actions.cpp b/control/actions.cpp
index 66bba2b..8ecd30c 100644
--- a/control/actions.cpp
+++ b/control/actions.cpp
@@ -83,6 +83,8 @@
void default_floor_on_missing_owner(Zone& zone, const Group& group)
{
+ // Set/update the services of the group
+ zone.setServices(&group);
auto services = zone.getGroupServices(&group);
auto defFloor = std::any_of(
services.begin(),
@@ -103,6 +105,8 @@
{
return [speed](control::Zone& zone, const Group& group)
{
+ // Set/update the services of the group
+ zone.setServices(&group);
auto services = zone.getGroupServices(&group);
auto missingOwner = std::any_of(
services.begin(),