]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerRamana Raja <rraja@redhat.com>
Wed, 17 Jul 2019 10:07:37 +0000 (15:37 +0530)
commit3aee03a0ffdcdeff7f354af53171174a864d0d7b
tree67265d5d1c48cdcb4d6f0ef8237a5b96a0332f42
parent2004ab53ae41ae4658a596f583ba26625ad50c94
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>
(cherry picked from commit dd569e22e8d1b6287207fb2d1a4269d0bef20784)
src/pybind/mgr/volumes/fs/subvolume.py