diff --git a/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py b/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py index 0494843ffb728..9020f8a619e3c 100644 --- a/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py +++ b/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py @@ -285,8 +285,6 @@ def get_cephfs_data_pool_details(self): self._arg_parser.cephfs_filesystem_name = str(json_out[0]['name']) matching_json_out = json_out[0] if type(matching_json_out['data_pools']) == list: - if len(matching_json_out['data_pools']) == 0: - raise ExecutionFailureException("No 'data_pools' found.") # if the user has already provided data-pool-name, # through --cephfs-data-pool-name if self._arg_parser.cephfs_data_pool_name: @@ -298,6 +296,7 @@ def get_cephfs_data_pool_details(self): self._arg_parser.cephfs_data_pool_name, [str(x) for x in matching_json_out['data_pools']])) else: + # if nothing is provided, try to find a default data pool name self._arg_parser.cephfs_data_pool_name = str( matching_json_out['data_pools'][0]) if len(matching_json_out['data_pools']) > 1: