]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: remove 'nfs cluster update'
authorSage Weil <sage@newdream.net>
Wed, 5 May 2021 16:59:44 +0000 (12:59 -0400)
committerSage Weil <sage@newdream.net>
Thu, 3 Jun 2021 12:37:59 +0000 (07:37 -0500)
This command is very awkward to implement unless all service spec fields
are always required.  That will soon mean both the placement *and*
virtual_ip (if any), making it much less useful for a human to make use
of.

Instead, let them update yaml, or adjust the nfs and/or ingress specs
directly.  I don't think this command is needed.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit e5c1d4aa71ddf24304ec5d18b22bea739c20226d)

doc/cephfs/fs-nfs-exports.rst
src/pybind/mgr/nfs/cluster.py
src/pybind/mgr/nfs/module.py

index edf9e76cd46f18876b462f7ec836f58b25a0bb87..dfb665e7d6134f93db6697d588872fd6e7251b4f 100644 (file)
@@ -50,15 +50,6 @@ cluster)::
 For more details, refer :ref:`orchestrator-cli-placement-spec` but keep
 in mind that specifying the placement via a YAML file is not supported.
 
-Update NFS Ganesha Cluster
-==========================
-
-.. code:: bash
-
-    $ ceph nfs cluster update <clusterid> <placement>
-
-This updates the deployed cluster according to the placement value.
-
 Delete NFS Ganesha Cluster
 ==========================
 
index d7da069cd7bb69be1b75a3456e25e37b345941d6..a409d2cb0672d0acaa978d46d4346280791f5425 100644 (file)
@@ -85,16 +85,6 @@ class NFSCluster:
         except Exception as e:
             return exception_handler(e, f"NFS Cluster {cluster_id} could not be created")
 
-    @cluster_setter
-    def update_nfs_cluster(self, cluster_id, placement):
-        try:
-            if cluster_id in available_clusters(self.mgr):
-                self._call_orch_apply_nfs(placement)
-                return 0, "NFS Cluster Updated Successfully", ""
-            raise ClusterNotFound()
-        except Exception as e:
-            return exception_handler(e, f"NFS Cluster {cluster_id} could not be updated")
-
     @cluster_setter
     def delete_nfs_cluster(self, cluster_id):
         try:
index 20437e3216197a321c5e63dce299f00d7b493f37..4e597602f0059aa1b3700e66f3b7402a3edd0cf6 100644 (file)
@@ -68,11 +68,6 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         """Create an NFS Cluster"""
         return self.nfs.create_nfs_cluster(cluster_id=clusterid, placement=placement)
 
-    @CLICommand('nfs cluster update', perm='rw')
-    def _cmd_nfs_cluster_update(self, clusterid: str, placement: str) -> Tuple[int, str, str]:
-        """Updates an NFS Cluster"""
-        return self.nfs.update_nfs_cluster(cluster_id=clusterid, placement=placement)
-
     @CLICommand('nfs cluster rm', perm='rw')
     def _cmd_nfs_cluster_rm(self, clusterid: str) -> Tuple[int, str, str]:
         """Removes an NFS Cluster"""