mon: Remove global version code introduced around bobtail's release

This patch reverts most of the global version (gv) related patches that
were introduced around bobtail's release as a prelude to the single-paxos
patches.

The gv infrastructure allowed us to gather version information on the
monitors, essential to the move to a single-paxos implementation on
existing clusters -- this means that for an existing cluster to upgrade
to the a single-paxos monitor, it will first have to be upgraded to a
version prior to this patch.  This patch strips the monitor subsystem of
all the gv-related code that is of no use for upcoming versions.

Furthermore, from this patch onwards until all single-paxos patches
are merged, ceph-mon won't work as expected, and may not compile at some
point in the git history.

These patches are not retro-compatible, and the monitors are not expected
to work with earlier versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
auth: cephx: KeyServer: add 'has_secrets()' function

We need this in the AuthMonitor to assess if we should encode a full version
of the KeyServer and submit it to the Paxos along with the incrementals.

Not performing such a check will lead us to an erroneous version, from which
we won't be able to recover.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Strip any trailing whitespace from rbd showmapped

More recent versions of ceph append a bit of whitespace to the line
after the name of the /dev/rbdX device; this causes the monitor check
to fail as it can't find the device name due to the whitespace.

This fix excludes any characters after the /dev/rbdN match.
Merge pull request #65 from javacruft/wip-ocf-rbd

Strip any trailing whitespace from rbd showmapped

Reviewed-by: Sage Weil <sage@inktank.com>
osd: log weirdness if caller_ops hash gets bigger than the log

Signed-off-by: Sage Weil <sage@inktank.com>
qa: fix quoting of wget URLs

Broke this in ae0c2bbb50ab04467b5223a4f61bfca4b0830142.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: rbd/map-snapshot-io: remove image when done

Signed-off-by: Sage Weil <sage@inktank.com>
debian: allow extra args to get passed to ./configure via the environment

Signed-off-by: Sage Weil <sage@inktank.com>
qa: rbd map-snapshot-io: udevadm settle

Udev runs blkid on device close, thwarting any rbd unmap that
immediately follows use of the device.  Explicitly settle for now.

See #4183.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: restrict pool size to 1..10

See: #4159
Signed-off-by: Sage Weil <sage@inktank.com>
testing: adding a Hadoop wordcount test

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
test: correcting hadoop-internal tests

Changing the hadoop-internal tests to use the
newly added $TESTDIR environment variable.
Also, removed unneeded variables.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
rbd: udevadm settle before unmap

udev runs blkid on device close, and other such nonsense that can
make unmap fail with EBUSY.  Settle before we unmap to avoid this if
possible.  See #4183.

Closes: #4186
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
qa: mon/workloadgen.sh: drop TEST_CEPH_CONF code

The binaries already pick up on CEPH_CONF, which will be set as needed.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: test_mon_workloadgen: use default config file path

I'm not sure why we wouldn't.  Also, this makes this test work without
annoying plumbing to pass the explicit path through.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: fix printf warning on pg_log_entry_t::get_key_name

warning: osd/osd_types.cc:1716:76: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'version_t {aka long long unsigned int}' [-Wformat]
warning: osd/osd_types.cc:1716:76: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'version_t {aka long long unsigned int}' [-Wformat]

Signed-off-by: Sage Weil <sage@inktank.com>
v0.57
osd: pull requeued requests off one at a time

Pull items off the finished queue on at a time.  In certain cases, an
event may result in new items betting added to the finished queue that
will be put at the *front* instead of the back.  See latest incarnation
of #2947.

Note that this is a significant changed in behavior in that we can
theoretically starve if an event keeps resulting in new events getting
generated.  Beware!

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
osd: requeue pg waiters at the front of the finished queue

We could have a sequence like:

- op1
- notify
- op2

in the finished queue.  Op1 gets put on waiting_for_pg, the notify
creates the pg and requeues op1 (and the end), op2 is handled, and
finally op1 is handled.  That breaks ordering; see #2947.

Instead, when we wake up a pg, queue the waiting messages at the front
of the dispatch queue.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
os/FileStore: check replay guard on src for collection rename

This avoids a problematic sequence like:

     - rename A/ -> B/
     - remove B/1...100
     - destroy B/
     - create A/
     - write A/101...
     <crash>
     - replay A/ -> B/
     - remove B/1...100  (fails but tolerated)
     - destroy B/        (fails with ENOTEMPTY)

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>