mon/MonClient: release pending outgoing messages on shutdown

This fixes a small memory leak when we have messages queued for the mon
when we shut down.  It is harmless except for the valgrind leak check
noise that obscures real leaks.

Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
ceph.in: add to $PATH if needed regardless of LD_LIBRARY_PATH state

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

ceph.in: add to $PATH if needed regardless of LD_LIBRARY_PATH state

Reviewed-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: check if pool is on unmanaged snaps mode on mk/rmsnap

Backport: dumpling
Fixes: #6047

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
mon: OSDMonitor: don't propose on prepare_pool_op()

Except in very special cases, we should let PaxosService take its course
and trigger the proposals itself.  In this case, we were proposing right
before returning to PaxosService, and we were returning false on top of it
(most likely to guarantee that PaxosService wouldn't try to propose).

This doesn't make much sense, so let's do it like all the other cool kids
are doing and let PaxosService decide what's best for us.

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
mon: OSDMonitor: return earlier on no-ops over currently committed state

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
qa: workunits: mon: test snaps ops using rbd.

Regression test for #6047

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
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>
ceph.spec.in:  Don't invoke debug_package macro on centos.

If the redhat-rpm-config package is installed, the debuginfo rpms will
be built by default.   The build will fail when the package installed
and the specfile also invokes the macro.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
ceph.spec.in:  remove trailing paren in previous commit

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
rgw: Fix S3 auth when using response-* query string params

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
ceph-post-file: use mktemp instead of tempfile

tempfile is a debian thing, apparently; mktemp is present everywhere.

Signed-off-by: Sage Weil <sage@inktank.com>
os: LevelDBStore: ignore ENOENT files when estimating store size

While iterating over the store files we race against leveldb, which may
be shuffling data around thus removing some files.

By ignoring missing files on stat, we'll get to not account those files
but that's okay -- this is just an estimate.

Fixes: #6178

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
Merge pull request #530 from ceph/wip-monc-leak

mon/MonClient: release pending outgoing messages on shutdown

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
os/ObjectStore: add bufferlist variant of setattrs

And hopefully we can kill the bufferptr ones someday!

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: drop src_obc.clear() calls

These are all about to go out of scope; no need to clear them
explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
osd, objecter: clean up assert_ver()

Create a separate union in the args and clean up the code a bit so that
this doesn't reuse the (unrelated) watch helpers.  No change in
protocol.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: only request map on startup if epoch == 0

Normal clients have no map and need one to get started.  If we are the
OSD, we will already have one and will get fed maps as they come in.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: allow ops to be canceled

This is useful in general, and specifically will be useful for the
rados COPY operation.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: less whitespace

Signed-off-by: Sage Weil <sage@inktank.com>