rgw: fix memory leaks

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix xml parser leak

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
crypto: fix nss related leak

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: signal shuts down fcgi socket

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix cleanup

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
README: add the libboost-thread-dev dep to the list

Signed-off-by: Sam Lang <sam.lang@inktank.com>
test_rados_api_misc: fix TMAPPUT sorting test

Several things wrong here.

Signed-off-by: Sage Weil <sage@inktank.com>
config: make $pid a metavariable

Signed-off-by: Sage Weil <sage@inktank.com>
mon: do not crash on invalid 'mon tell N ...' target

Fixes: #3545
Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix compiler warning

signed/unsigned comparison

Signed-off-by: Sage Weil <sage@inktank.com>
rbd: allow export to stdout, add tests

Fixes: #3502
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit a738f44bc4e23c8ad18f24a835fe253d5b27b9d9)
rbd: fix import from stdin, add test

Make import work; do I/O in image native block size.
Note: creating sparse images is not currently attempted; could
scan for runs of zeros and write discontiguous chunks to image.

Fixes: #3503
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit c99d9c3ae782597984f0c67dd1488fb95bd2ce54)
mon: check all uses of fsync in the MonitorStore for errors

This can sometimes return errors since it's a storage access, and
we're pretty sure ignoring it is the cause of a broken store we've seen.

Signed-off-by: Greg Farnum <greg@inktank.com>
log: fix log_max_recent config

<facepalm>

Signed-off-by: Sage Weil <sage@inktank.com>
log: 10,000 recent log entries

This is what we were (wrongly) doing before, so there are no memory
utilization surprises.

Signed-off-by: Sage Weil <sage@inktank.com>
create qa/workunits/rbd/map-unmap.sh

This adds a bash script that creates an rbd image, then repeatedly
maps and unmaps it for a specified duration (5 minutes by default).

Signed-off-by: Alex Elder <elder@inktank.com>
mon: In MonitorStore, wrap all uses of ::close and assert success

Signed-off-by: Greg Farnum <greg@inktank.com>
mon: add new get_bl_[sn|ss]_safe functions

These functions are like the non-safe versions, but assert that
there were no disk errors and have void return types. Change a
bunch of callers who weren't checking the return code to use
these variants instead.
(Unfortunately we can't make them default safe because several of
the callers depend on getting back the length, and are perfectly happy
with ENOENT producing a 0 return value.)

Signed-off-by: Greg Farnum <greg@inktank.com>
mon: update Paxos::read()'s successful read check

It was returning success if it got back an error code; don't do that!

Signed-off-by: Greg Farnum <greg@inktank.com>
mon: convert store users with unchecked return codes to just assert on issues

This will make them much more noticeable and reduce the odds of something
writing data which assumes the previous op succeeded.

Signed-off-by: Greg Farnum <greg@inktank.com>