]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/orchestrator: just keep a single count value in StatelessServiceSpec
authorJeff Layton <jlayton@redhat.com>
Tue, 26 Feb 2019 19:53:45 +0000 (14:53 -0500)
committerJeff Layton <jlayton@redhat.com>
Wed, 6 Mar 2019 12:14:46 +0000 (07:14 -0500)
We currently have a min_size/max_size values in here, but we don't have
any orchestrators that can take advantage of two values. Let's just keep
a simple count for now, until we do.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/pybind/mgr/orchestrator.py
src/pybind/mgr/rook/rook_cluster.py

index abfd321b089b6e8bbb400f17c793e056c4efcb79..1f3e8f2782b468c854226f431948fd4b8d9f4971 100644 (file)
@@ -658,9 +658,8 @@ class StatelessServiceSpec(object):
         # within one ceph cluster.
         self.name = ""
 
-        # Minimum and maximum number of service instances
-        self.min_size = 1
-        self.max_size = 1
+        # Count of service instances
+        self.count = 1
 
         # Arbitrary JSON-serializable object.
         # Maybe you're using e.g. kubenetes and you want to pass through
index f42b95a0b5d006a899ec816538e9d8542b06d61b..b180dcfb30e4b1f65214c0f2313e437f8a3cf40c 100644 (file)
@@ -209,7 +209,6 @@ class RookCluster(object):
 
     def add_filesystem(self, spec):
         # TODO use spec.placement
-        # TODO use spec.min_size (and use max_size meaningfully)
         # TODO warn if spec.extended has entries we don't kow how
         #      to action.
 
@@ -223,7 +222,7 @@ class RookCluster(object):
             "spec": {
                 "onlyManageDaemons": True,
                 "metadataServer": {
-                    "activeCount": spec.max_size,
+                    "activeCount": spec.count,
                     "activeStandby": True
 
                 }
@@ -235,7 +234,6 @@ class RookCluster(object):
 
     def add_nfsgw(self, spec):
         # TODO use spec.placement
-        # TODO use spec.min_size (and use max_size meaningfully)
         # TODO warn if spec.extended has entries we don't kow how
         #      to action.
 
@@ -251,7 +249,7 @@ class RookCluster(object):
                     "pool": spec.extended["pool"]
                 },
                 "server": {
-                    "active": spec.max_size,
+                    "active": spec.count,
                 }
             }
         }
@@ -263,7 +261,6 @@ class RookCluster(object):
             self.rook_api_post("cephnfses/", body=rook_nfsgw)
 
     def add_objectstore(self, spec):
-  
         rook_os = {
             "apiVersion": ROOK_API_NAME,
             "kind": "CephObjectStore",