From db7353b4bebfca9119d21015d60f5a3e6347f658 Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Thu, 17 Sep 2020 16:09:52 +0530 Subject: [PATCH] mgr/volumes/nfs: Check if orchestrator spec service_id is valid Fixes: https://tracker.ceph.com/issues/47512 Signed-off-by: Varsha Rao --- src/pybind/mgr/volumes/fs/nfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.47.3