]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/rook: remove init_rook
authorJeff Layton <jlayton@redhat.com>
Fri, 18 Jan 2019 15:23:21 +0000 (10:23 -0500)
committerJeff Layton <jlayton@redhat.com>
Fri, 18 Jan 2019 15:26:07 +0000 (10:26 -0500)
John evidently added this code early on in development, when we figured
we might be taking over a cluster that is already running under k8s.

I don't see how we'd ever make that work, so just remove this function
for now, and the commented-out callsite.

Reported-by: Sebastian Wagner <sebastian.wagner@suse.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/pybind/mgr/rook/module.py
src/pybind/mgr/rook/rook_cluster.py

index 9e56c94d01eb2f5ed4b78bbd210384eb18fcac70..a364c75e19fac4811120c8c73a8a1ddb9b4ff2c5 100644 (file)
@@ -270,11 +270,6 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator):
             self._k8s,
             cluster_name)
 
-
-        # In case Rook isn't already clued in to this ceph
-        # cluster's existence, initialize it.
-        # self._rook_cluster.init_rook()
-
         self._initialized.set()
 
         while not self._shutdown.is_set():
index aa1e969ceef1f8a89d5f5758784a2e6202825a6f..1b0dbe2bad40b4f409829e719eceb4d726c4ee57 100644 (file)
@@ -46,32 +46,6 @@ class RookCluster(object):
         #  be formalized at some point)
         return self.cluster_name
 
-    def init_rook(self):
-        """
-        Create a passive Rook configuration for this Ceph cluster.  This
-        will prompt Rook to start watching for other resources within
-        the cluster (e.g. Filesystem CRDs), but no other action will happen.
-        """
-
-        # TODO: complete or remove this functionality: if Rook wasn't
-        # already running, then we would need to supply it with
-        # keys and ceph.conf as well as creating the cluster CRD
-
-        cluster_crd = {
-            "apiVersion": ROOK_API_NAME,
-            "kind": "CephCluster",
-            "metadata": {
-                "name": self.cluster_name,
-                "namespace": self.cluster_name
-            },
-            "spec": {
-                "backend": "ceph",
-                "hostNetwork": True
-            }
-        }
-
-        self.rook_api_post("cephclusters", body=cluster_crd)
-
     def rook_url(self, path):
         prefix = "/apis/ceph.rook.io/%s/namespaces/%s/" % (
             ROOK_API_VERSION, self.rook_namespace)