rgw: fix up signal handling

OMG libfcgi is annoying with shutdown and signals.  You need to close
the fd *and* resend a signal to ensure that you kick the accept loop
hard enough to make it shut down.

Document this, and switch to the async signal handlers.  Put them
tightly around the runtime loop as we do with other daemons.

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: free resolver on shutdown

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: fix leak of RGWDataChangesLog::renew_thread

Signed-off-by: Sage Weil <sage@inktank.com>
v0.67-rc3
Make all AdminSocket commands use argparse/cmdmap.

Fixes regression in daemon commands with arguments; also resolves
reported bug with existing daemon code for arguments with
embedded spaces.

Fixes: #5503
Fixes: #5800

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
cephtool/test.sh: add tests for mon daemon command

[Also move into a separatate test script; validate result -sage]

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
ceph: developer mode: set PATH, too

Otherwise the call to ceph-conf may fail if it is not installed on the
local machine.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: Add workunit that hangs for manual thrasher testing

Signed-off-by: David Zafman <david.zafman@inktank.com>
test: Fix valgrind found "Mismatched free() / delete / delete []"

Use delete[] in set_argv() so that valgrind runs clean

Signed-off-by: David Zafman <david.zafman@inktank.com>
osdc: Add asserts that client_lock is held

Clarify locking by indicating that client_lock is held

Signed-off-by: David Zafman <david.zafman@inktank.com>
qa/workunits/cephtool/test_daemon.sh: sudo

Fixes: #5814
Signed-off-by: Sage Weil <sage@inktank.com>
osdc: op left in check_lastest_map_ops

Call op_cancel_map_check before cancel_op() in send_linger()

Fixes: #5784

Signed-off-by: David Zafman <david.zafman@inktank.com>
Verify that deleting op never in check_latest_map_ops map

Signed-off-by: David Zafman <david.zafman@inktank.com>
Merge tag 'v0.67-rc3' into next

v0.67-rc3
rest/test.py: expect_nofail() to allow examination of reason

Also remove unused MyException

Signed-off-by: Dan Mick <dan.mick@inktank.com>
rest/test.py: retry mds setmap in case epoch has changed

Loop 10 times retrying mds dump/getmap/setmap.

Fixes: #5815
Signed-off-by: Dan Mick <dan.mick@inktank.com>
mon/MDSMonitor: don't call all EINVALs "unrecognized command"

Some of them are valid EINVALs (like mds setmap with the wrong epochnum)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge branch 'wip-5784' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge branch 'wip-5815' into next

Reviewed-by: Sage Weil <sage@inktank.com>
ceph.spec.in: add missing buildrequires for Fedora

This patch adds two buildrequires to the ceph.spec file, that are needed
to build the rpms under Fedora. Danny Al-Gaaf commented that the
snappy-devel dependency should actually be added to the leveldb-devel
package. I will try to get that fixed too, in the mean time, this patch
does make sure Ceph builds on Fedora.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>