From: Varsha Rao Date: Thu, 17 Sep 2020 10:39:52 +0000 (+0530) Subject: mgr/volumes/nfs: Check if orchestrator spec service_id is valid X-Git-Tag: v15.2.9~122^2~34^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69ff75ab6efa39caa92d30ac4c8cfd2eaaa8b853;p=ceph.git mgr/volumes/nfs: Check if orchestrator spec service_id is valid Fixes: https://tracker.ceph.com/issues/47512 Signed-off-by: Varsha Rao (cherry picked from commit db7353b4bebfca9119d21015d60f5a3e6347f658) --- diff --git a/src/pybind/mgr/volumes/fs/nfs.py b/src/pybind/mgr/volumes/fs/nfs.py index 11bcc5fd9d39..d1f355770113 100644 --- a/src/pybind/mgr/volumes/fs/nfs.py +++ b/src/pybind/mgr/volumes/fs/nfs.py @@ -29,7 +29,8 @@ def available_clusters(mgr): completion = mgr.describe_service(service_type='nfs') mgr._orchestrator_wait([completion]) orchestrator.raise_if_exception(completion) - return [cluster.spec.service_id.replace('ganesha-', '', 1) for cluster in completion.result] + return [cluster.spec.service_id.replace('ganesha-', '', 1) for cluster in completion.result + if cluster.spec.service_id] def export_cluster_checker(func):