Project

General

Profile

Fix #42508

cephfs-shell: print a helpful message instead of a Python backtrace when no config file has been found

Added by Lenz Grimmer 5 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
task(easy)
Pull request ID:
Crash signature:

Description

Currently, running cephfs-shell on a blank system without any configuration file fails with a Python backtrace:

cephfs-shell       
Traceback (most recent call last):
  File "/usr/bin/cephfs-shell", line 1268, in <module>
    setup_cephfs(config_file)
  File "/usr/bin/cephfs-shell", line 66, in setup_cephfs
    cephfs = libcephfs.LibCephFS(conffile=config_file)
  File "cephfs.pyx", line 419, in cephfs.LibCephFS.__cinit__
  File "cephfs.pyx", line 457, in cephfs.LibCephFS.create
  File "cephfs.pyx", line 474, in cephfs.LibCephFS.conf_read_file
cephfs.ObjectNotFound: [Errno 2] error calling conf_read_file

It would be nice if the tool would print out a more helpful/meaningful error message, e.g. "Config file <file> not found."

History

#1 Updated by Patrick Donnelly 5 months ago

  • Subject changed from fs/cephfs-shell: cephfs-shell should print a helpful message instead of a Python backtrace when no config file has been found to cephfs-shell: print a helpful message instead of a Python backtrace when no config file has been found
  • Assignee set to Rishabh Dave
  • Target version set to v15.0.0
  • Start date deleted (10/28/2019)
  • Source set to Development

#2 Updated by Rishabh Dave 5 months ago

  • Pull request ID set to 31460

#3 Updated by Rishabh Dave 5 months ago

  • Status changed from New to In Progress

#4 Updated by Patrick Donnelly 5 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF