Merge pull request #69169 from dparmar18/i61482

mgr/nfs: warn when deprecated export/cluster delete commands are run

Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
Venky Shankar 2026-07-20 12:19:47 +05:30 committed by GitHub
commit 192b4306b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View File

@ -495,6 +495,9 @@
to upgrade all OSDs in the cluster. For more details see tracker:
https://tracker.ceph.com/issues/73031.
* NFS: cluster/export delete commands now throw a deprecation warning when
used and will be removed in V release.
>=19.2.1
* CephFS: The `fs subvolume create` command now allows tagging subvolumes through option

View File

@ -112,14 +112,16 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
return self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=pseudo_path)
@NFSCLICommand('nfs export delete', perm='rw')
@object_format.EmptyResponder()
@object_format.ErrorResponseHandler()
def _cmd_nfs_export_delete(self,
cluster_id: str,
pseudo_path: str,
skip_notify_nfs_server: bool = False) -> None:
skip_notify_nfs_server: bool = False) -> Tuple[int, str, str]:
"""Delete a cephfs export (DEPRECATED)"""
self.export_mgr.skip_notify_nfs_server = skip_notify_nfs_server
return self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=pseudo_path)
self.export_mgr.delete_export(cluster_id=cluster_id, pseudo_path=pseudo_path)
return 0, "", ("`nfs export delete` is deprecated and will be removed "
"in a future release, please `nfs export rm` instead.")
@NFSCLICommand('nfs export ls', perm='r')
@object_format.Responder()
@ -230,10 +232,12 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
return self.nfs.delete_nfs_cluster(cluster_id=cluster_id)
@NFSCLICommand('nfs cluster delete', perm='rw')
@object_format.EmptyResponder()
def _cmd_nfs_cluster_delete(self, cluster_id: str) -> None:
@object_format.ErrorResponseHandler()
def _cmd_nfs_cluster_delete(self, cluster_id: str) -> Tuple[int, str, str]:
"""Removes an NFS Cluster (DEPRECATED)"""
return self.nfs.delete_nfs_cluster(cluster_id=cluster_id)
self.nfs.delete_nfs_cluster(cluster_id=cluster_id)
return 0, "", ("`nfs cluster delete` is deprecated and will be removed "
"in a future release, please `nfs cluster rm` instead.")
@NFSCLICommand('nfs cluster ls', perm='r')
@object_format.Responder()