From e6674c76f4fde875374b31c4c0d629b16368439f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 18 Jan 2019 10:23:21 -0500 Subject: [PATCH] mgr/rook: remove init_rook 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 Signed-off-by: Jeff Layton --- src/pybind/mgr/rook/module.py | 5 ----- src/pybind/mgr/rook/rook_cluster.py | 26 -------------------------- 2 files changed, 31 deletions(-) diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 9e56c94d01e..a364c75e19f 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -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(): diff --git a/src/pybind/mgr/rook/rook_cluster.py b/src/pybind/mgr/rook/rook_cluster.py index aa1e969ceef..1b0dbe2bad4 100644 --- a/src/pybind/mgr/rook/rook_cluster.py +++ b/src/pybind/mgr/rook/rook_cluster.py @@ -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) -- 2.39.5