messages/MMonProbe: fix uninitialized variables

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
messages/MMonHealth: remove unused flag field

This was initialized in (one of) the ctor(s), but not encoded/decoded,
and not used.  Remove it.  This makes valgrind a happy.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix leak of loopback Connection

The accessor returns a reference.  Instead of taking+dropping it each
time, take one ref in Monitor ctor and release it in the dtor.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/next-leaks' into next

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: fix preforker exit behavior behavior

In 3c5706163b72245768958155d767abf561e6d96d we made exit() not actually
exit so that the leak checking would behave for a non-forking case.
That is only needed for the normal exit case; every other case expects
exit() to actually terminate and not continue execution.

Instead, make a signal_exit() method that signals the parent (if any)
and then lets you return.  exit() goes back to it's usual behavior,
fixing the many other calls in main().

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: do not include logbl in scrub map

This is a potentially use object/file, usually prefixed by a zeroed region
on disk, that is not used by scrub at all.  It dates back to
f51348dc8bdd5071b7baaf3f0e4d2e0496618f08 (2008) and the original version of
scrub.

This *might* fix #4179.  It is not a leak per se, but I observed 1GB
scrub messages going over the write.  Maybe the allocations are causing
fragmentation, or the sub_op queues are growing.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
rgw: add 'cors' to the list of sub-resources

Fixes: #5261
Backport: cuttlefish
Add 'cors' to the list of sub-resources, otherwise auth signing
is wrong.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
rgw: fix get_resource_mgr() to correctly identify resource

Fixes: #5262
The original test was not comparing the correct string, ended up
with the effect of just checking the substring of the uri to match
the resource.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
rgw: handle deep uri resources

In case of deep uri resources (ones created beyond a single level
of hierarchy, e.g. auth/v1.0) we want to create a new empty
handlers for the path if no handlers exists. E.g., for
auth/v1.0 we need to have a handler for 'auth', otherwise
the default S3 handler will be used, which we don't want.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge remote-tracking branch 'gh/next'

Conflicts:
	src/messages/MMonProbe.h