Project

General

Profile

Bug #43329

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

Added by Rishabh Dave 4 months ago. Updated 3 months 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:

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

History

#1 Updated by Rishabh Dave 4 months ago

  • Pull request ID set to 32347

#2 Updated by Rishabh Dave 4 months ago

  • Status changed from In Progress to Fix Under Review

#3 Updated by Patrick Donnelly 3 months 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

Also available in: Atom PDF