]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr / volumes: use negative error codes everywhere
authorVenky Shankar <vshankar@redhat.com>
Fri, 5 Jul 2019 09:50:42 +0000 (05:50 -0400)
committerVenky Shankar <vshankar@redhat.com>
Mon, 8 Jul 2019 03:58:16 +0000 (23:58 -0400)
commitdd569e22e8d1b6287207fb2d1a4269d0bef20784
tree6328bca4080231466f29567ce75cc79bcdae7d23
parentae470a64ecf8ded8bbe3dbe02b5a470fecb7e2c3
mgr / volumes: use negative error codes everywhere

cephfs python binding returns positive error code. mgr/volumes
incorrectly does error code checks assuming the error codes to
be negative.

this was not an issue till now since mgr/volumes mostly does a
`raise VolumeException()` for the most part followed by the exception
being displayed to the operator (one exception is catching cephfs
ObjectNotFound error, in which case -errno.ENOENT is returned
(and checked whereever required)).

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/pybind/mgr/volumes/fs/subvolume.py