Project

General

Profile

Actions

Bug #5594

closed

ceph cli in compat mode should always add status+newline, even when status is blank

Added by Dan Mick almost 11 years ago. Updated almost 11 years ago.

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

0%

Source:
Q/A
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The new CLI outputs the status message to stdout for compatibility with the old tool, but it
only does so if the status message is not empty. It should always do that, for the sake of the
newline, so that tests that rely on the blank line to stdout don't fail.

i.e.

        if outs:
            if compat and ret == 0:
                # old cli/mon would send status string to stdout on non-error
                print outs
            else:
                print >> sys.stderr, prefix + outs

should probably be

        if compat:
            if ret == 0:
                # old cli/mon would send status string to stdout on non-error
                print outs
        elif outs:
            print >> sys.stderr, prefix + outs
Actions #1

Updated by Dan Mick almost 11 years ago

  • Status changed from 12 to Resolved
Actions

Also available in: Atom PDF