Project

General

Profile

Bug #11354

ceph: cli throws exception on unrecognized errno

Added by Sage Weil over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Start date:
04/09/2015
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:

Description

for example,

2015-04-09 09:46:38.098398 7ff0253d0700 1 -- 127.0.0.1:0/1017515 <== mon.0 127.0.0.1:22222/0 12 ==== mon_command_ack([{"prefix": "osd crush set"}]=-125 Failed to parse crushmap: error running crushmap through crushtool: (125) Operation canceled v24) v1 ==== 153+0+0 (2101891692 0 0) 0x7ff010000b60 con 0x7ff020011cb0
Traceback (most recent call last):
File "./ceph", line 876, in <module>
retval = main()
File "./ceph", line 832, in main
print >> sys.stderr, prefix + 'Error {0}: {1}'.format(errno.errorcode[ret], outs)
KeyError: 125


Related issues

Copied to Ceph - Backport #12331: ceph: cli throws exception on unrecognized errno Resolved 04/09/2015

Associated revisions

Revision 53514ad9 (diff)
Added by Kefu Chai over 3 years ago

ceph.in: do not throw on unknown errno

some of the errnos are not listed in errno.errorcode. if we happen
to run into them, print 'Unknown' instead.

Fixes: #11354
Signed-off-by: Kefu Chai <>

Revision add0f1e5 (diff)
Added by Kefu Chai about 3 years ago

ceph.in: do not throw on unknown errno

some of the errnos are not listed in errno.errorcode. if we happen
to run into them, print 'Unknown' instead.

Fixes: #11354
Signed-off-by: Kefu Chai <>
(cherry picked from commit 53514ad97f6f75746613f09d464f69a7c31bed55)

History

#1 Updated by Kefu Chai over 3 years ago

  • Status changed from New to Need Review
  • Assignee set to Kefu Chai

the ECANCELED is not defined until python 3.3.

will print Unknown if the errno is not listed in errno.errorcode .

#2 Updated by Loic Dachary over 3 years ago

  • Status changed from Need Review to Resolved
  • Regression set to No

#3 Updated by Kefu Chai over 3 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to hammer

#4 Updated by Loic Dachary over 3 years ago

  • Subject changed from ceph: cli throws exceptoin on unrecognized errno to ceph: cli throws exception on unrecognized errno

#5 Updated by Loic Dachary about 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF