Project

General

Profile

Actions

Bug #43329

closed

cephfs-shell: AttributeError when undefined an conf opt is attemptted to read

Added by Rishabh Dave over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

conf_get() from pybind/cephfs/cephfs.pyx returns None when passed argument is not present as config file option which in turn leads to AttributeError.

        shell.debug = get_bool_vals_for_boolopts(cephfs.\
conf_get('debug_shell')

This happens because get_bool_vals_for_boolopts() accesses as args assuming that it'll be string which is not that the case when arg is undefined in Ceph.

def get_bool_vals_for_boolopts(val):
    if val.lower() in ['true', 'yes']:
        return True
    elif val.lower() in ['false', 'no']:
        return False
    else:
return val

Actions #1

Updated by Rishabh Dave over 4 years ago

  • Pull request ID set to 32347
Actions #2

Updated by Rishabh Dave over 4 years ago

  • Status changed from In Progress to Fix Under Review
Actions #3

Updated by Patrick Donnelly over 4 years ago

  • Status changed from Fix Under Review to Resolved
  • Target version set to v15.0.0
  • Source set to Development
  • Component(FS) cephfs-shell added
Actions

Also available in: Atom PDF