]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr: don't write to output if EOPNOTSUPP
authorKefu Chai <kchai@redhat.com>
Thu, 29 Nov 2018 07:44:55 +0000 (15:44 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 29 Nov 2018 07:45:37 +0000 (15:45 +0800)
commit8010d919603f2631637f85bef600bf926ca436fc
treeaa35ee81775b944dd91db4495a034cf508cf4a6a
parent232a89069beb611c54947925b6d84ffa15936e8b
mgr: don't write to output if EOPNOTSUPP

if process_pg_map_command() fails to fulfill the request, we should keep
the odata intact. and let the module take care of it.

before this change, we always write to odata even if
process_pg_map_command() returns -EOPNOTSUPP, this leaves unnecessary
leftover in the output, like pg_info,pg_ready.

after this change, we won't touch odata if process_pg_map_command()
returns -EOPNOTSUPP. and odata will be filled with whatever the python
module returns.

Fixes: http://tracker.ceph.com/issues/37444
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/DaemonServer.cc