Skip to content

Commit

Permalink
ceph: Removing any error while trying to find 'data_pool'
Browse files Browse the repository at this point in the history
If we are unable to get a default ceph data pool name,
script won't be throwing an error.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
  • Loading branch information
aruniiird committed Jul 30, 2020
1 parent ef434e8 commit cf6e4df
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit cf6e4df

Please sign in to comment.