From: Juan Miguel Olmo Martínez Date: Wed, 18 May 2022 16:18:16 +0000 (+0200) Subject: mgr/rook: fix error when trying to get the list of nfs services X-Git-Tag: v17.2.5~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=feeadd7e2a8ae65a8c986a592d4f7c49d3e29a6d;p=ceph.git mgr/rook: fix error when trying to get the list of nfs services Resolves: https://tracker.ceph.com/issues/55605 Signed-off-by: Juan Miguel Olmo Martínez (cherry picked from commit 1532de124a99ab0e0820850e1c2739689ccb09f0) --- diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 4300e98d502b..370cb6582199 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -351,8 +351,10 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): all_nfs = self.rook_cluster.get_resource("cephnfses") nfs_pods = self.rook_cluster.describe_pods('nfs', None, None) for nfs in all_nfs: - if nfs['spec']['rados']['pool'] != NFS_POOL_NAME: - continue + # Starting with V.17.2.0, the 'rados' spec part in 'cephnfs' resources does not contain the 'pool' item + if 'pool' in nfs['spec']['rados']: + if nfs['spec']['rados']['pool'] != NFS_POOL_NAME: + continue nfs_name = nfs['metadata']['name'] svc = 'nfs.' + nfs_name if svc in spec: