rbd.cc: propagate some errors to user-space when they're available

There was a bunch of situations in which we would have a proper error to
propagate to user-space but we would always return '1' (EXIT_FAILURE).

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
(cherry picked from commit 7e722245a717038c49f432ae19d9874c25066bb6)
rgw: fix leak in RGWMetadataManager::remove()

Backport: dumpling
Fixes: #6445
handler->get() returns a newly allocated obj, need to delete it when
done.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Invoke python with /usr/bin/env python instead of directly

Fixes: #6311
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge pull request #662 from dmick/next

Invoke python with /usr/bin/env python instead of directly
librados: pool async create / delete does not delete completion handle

Backport: dumpling
The pool async delete / create function used to delete the internal
completion object. However, caller still holds the allocated completion
object, which it can't drop a reference to (as it'd try to deallocate
the already freed internal object). This fix removes the internal object
deletion, a following commit will fix a related leak (#6444) by having
the application (radosgw) drop the reference even if got an error.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: drop async pool create completion reference

Fixes: #6444
Backport: dumpling
If pool creation fails (e.g., due to -EEXIST) then we leak the
completion object. Earlier we couldn't just drop the reference, as
librados have already removed the internal completion object. This fix
drop the completion reference even if got an error, which is now
possible.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
PendingReleaseNotes: update regarding librados change

Fix related to issue #6444

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #665 from ceph/wip-6444

Wip 6444
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
ceph_argparse.py: clean up error reporting when required param missing

Treat "need 1, got 0" as a special case, and change the message to
"missing required parameter <x>".  Also, when failing for that reason,
print the command concise description and its helptext.

Fixes: #6384
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge pull request #664 from ceph/wip-6445

Wip 6445
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #666 from dmick/wip-6384

ceph.in: clean up error message when missing required parameter
crush: invalidate rmap on create (and thus decode)

If we have an existing CrushWrapper object and decode from a bufferlist,
reset build_rmaps so that they get rebuilt.

Remove the build_rmaps() all in decode that was useless on a redecode
(because have_rmaps == true in that case and it did nothing).

Fixes: #6442
Backport: dumpling, maybe cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge remote-tracking branch 'gh/next'

Conflicts:
	PendingReleaseNotes