cond: reorder asserts

Make the more specific checks assert before the less specific ones, so we
are more likely to crash with useful information.

Signed-off-by: Sage Weil <sage@inktank.com>
mutex: assert we are unlocked by the same thread that locked

This only works for non-recursive locks.  (Which is probably all of them?)

Signed-off-by: Sage Weil <sage@inktank.com>
objecter: fix mon command resends

The monitor session is lossy.  Send these when the op is initiated, or
when we reconnect.  The timeout/cutoff was preventing ops from getting
resent if there was an ill-timed mon reset.

Backport: testing, stable/argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
librados: make pool create/destroy handle client-side errors

Add tests!

Signed-off-by: Sage Weil <sage@inktank.com>
objecter: make pool create/delete return EEXIST/ENOENT

Do these checks on the client side to mask monitor idempotency from
the user.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: make pool removal idempotent

Return success if pool does not exist.  Part of #2638.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: make pool creation idempotent

Return success if the pool already exists.  Part of #2638.

Also, fix this so we wait until a creating pool is created before we reply.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: simple test for pool create/delete commands

Signed-off-by: Sage Weil <sage@inktank.com>
mon: make 'osd rm ...' idempotent

Signed-off-by: Sage Weil <sage@inktank.com>
qa: simple tests for 'ceph osd create|rm' commands

Signed-off-by: Sage Weil <sage@inktank.com>
mon: check for invalid pool snap creates in preprocess_op, too

This avoids waiting for a paxos commit just to return an error.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: make snap create/destroy handle client-side errors

Signed-off-by: Sage Weil <sage@inktank.com>
objecter: return ENOENT/EEXIST on pool snap delete/create

Do these checks on the client to mask monitor idempotency from the user.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: make pool snap creation ops idempotent

Return 0 if the snap already exists, or is already deleted.

Also, avoid updating the pg_pool if we are just waiting for the current
round to commit.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: remove superfluous "can't delete except on master" comments

That's what 'return false' means for preprocess_*().

Signed-off-by: Sage Weil <sage@inktank.com>
conf: make dup lines override previous value

If you put

[some section]
 foo = 1
 ...
 foo = 2

in a .conf file, make the second key override the first.

Generate a warning if a value is overridden to sidestep some user hangbanging.

Signed-off-by: Sage Weil <sage@inktank.com>
vstart.sh: apply extra conf after the defaults

This let's you do e.g., -o 'debug ms = 100' and it will apply after
the default logging levels.

Signed-off-by: Sage Weil <sage@inktank.com>
config: send warnings to a ostream* argument

We shouldn't always send these to stderr.  (Among other things, the
warning: prefix breaks the gitbuilder error detection.)

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip-msgr-masterbits'

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