Project

General

Profile

Bug #43249

cephfs-shell: exit failure when non-interactive command fails

Added by Patrick Donnelly 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
High
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):
task(easy)
Pull request ID:
Crash signature:

Description

If a one-shot command fails, the cephfs-shell should exit with a non-zero status:

CephFS:~/>>> pdonnell@senta03 ~/ceph/build$ cephfs-shell mkdir /a/b
error in mkdir /a/b: No such file or directory [Errno 2]
CephFS:~/>>> pdonnell@senta03 ~/ceph/build$ echo $?
0

(#43248 deals with the shell dropping into interactive mode after executing the command.)

The shell should exit with 1 if the command fails.


Related issues

Related to fs - Bug #43248: cephfs-shell: do not drop into shell after running command-line command Fix Under Review

History

#1 Updated by Patrick Donnelly 2 months ago

  • Related to Bug #43248: cephfs-shell: do not drop into shell after running command-line command added

#2 Updated by Rishabh Dave 2 months ago

  • Status changed from New to In Progress

#3 Updated by Rishabh Dave 2 months ago

  • Status changed from In Progress to Fix Under Review

#4 Updated by Patrick Donnelly 2 months ago

  • Pull request ID set to 32213

#5 Updated by Patrick Donnelly about 1 month ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF