]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/smb: Replace "clusters" with "shares" in error status
authorAnoop C S <anoopcs@cryptolab.net>
Wed, 10 Jul 2024 17:29:51 +0000 (22:59 +0530)
committerAnoop C S <anoopcs@cryptolab.net>
Thu, 11 Jul 2024 12:42:35 +0000 (18:12 +0530)
In the following error response the list of active shares is incorrectly
displayed with "clusters" field.
{
  "resource": {
    "resource_type": "ceph.smb.cluster",
    "cluster_id": "smbcluster",
    "intent": "removed"
  },
  "clusters": [
    "smbshare"
  ],
  "msg": "cluster in use by shares",
  "success": false
}

Replace "clusters" with "shares" to avoid confusion.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
src/pybind/mgr/smb/handler.py

index 84702e72f7885a5d99ee517ddae01e7671d049b4..510715bb2b6fe9b077f28c11c50ba99c4e6ebaf3 100644 (file)
@@ -758,7 +758,7 @@ def _check_cluster(cluster: ClusterRef, staging: _Staging) -> None:
                 cluster,
                 msg="cluster in use by shares",
                 status={
-                    'clusters': [
+                    'shares': [
                         shid
                         for cid, shid in share_ids
                         if cid == cluster.cluster_id