From d6cddcca1580f16c5c89cb37ea336e8a6d71619f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 16 Jan 2019 10:45:08 -0500 Subject: [PATCH] mgr/orchestrator: add a service field to ServiceDescription service_instances that have this set are considered to be grouped. Signed-off-by: Jeff Layton --- src/pybind/mgr/orchestrator.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 1c0855c8b04..87f604287bf 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -406,6 +406,17 @@ class ServiceDescription(object): # justify having this field here. self.container_id = None + # Some services can be deployed in groups. For example, mds's can + # have an active and standby daemons, and nfs-ganesha can run daemons + # in parallel. This tag refers to a group of daemons as a whole. + # + # For instance, a cluster of mds' all service the same fs, and they + # will all have the same service_group (which may be the + # Filesystem name in the FSMap). + # + # Single-instance services should leave this set to None + self.service = None + # The orchestrator will have picked some names for daemons, # typically either based on hostnames or on pod names. # This is the in mds., the ID that will appear @@ -436,6 +447,7 @@ class ServiceDescription(object): out = { 'nodename': self.nodename, 'container_id': self.container_id, + 'service': self.service, 'service_instance': self.service_instance, 'service_type': self.service_type, 'version': self.version, -- 2.39.5