]> 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>
Tue, 25 May 2021 14:15:45 +0000 (10:15 -0400)
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>
doc/cephfs/fs-nfs-exports.rst
src/pybind/mgr/nfs/cluster.py
src/pybind/mgr/nfs/module.py

index 346b9cbe3154f73f8b5309e9af3a16f1f317d978..77d3f7e410661a7aabca1b74abec8d61e1604ba3 100644 (file)
@@ -53,15 +53,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"""