MOSDOpReply: set reassert_version for very old clients

I think this must make every sufficiently-old client fail on replay --
very bad!

Signed-off-by: Greg Farnum <greg@inktank.com>
osd: install admin socket commands after signals

This lets us tell by the presence of the admin socket commands whether
a signal will make us shut down cleanly.  See #5924.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge remote-tracking branch 'gh/next'
common: move SharedPtrRegistry test after t.join

The thread created to test SharedPtrRegistry race conditions updates a
value ( ptr ) that is tested by the main gtest thread but is not
protected by a lock. Instead of adding a lock, the main thread tests
the value after pthread_join() on the child thread.

http://tracker.ceph.com/issues/6130 fixes #6130

Signed-off-by: Loic Dachary <loic@dachary.org>
doc : erasure code developer notes updates

* unify conventions to match those used by jerasure ( data chunk = K,
  coding chunk = M, use coding instead of parity, use erasures instead
  of erased )

* make lines 80 characters long

* modify the descriptions to take into account that the chunk rank
  will encoded in the pool name and not on a per object basis

* remove the doxygen link to ErasureCodeInterface because it fails
  doc: asphyxiate does not support class
  http://tracker.ceph.com/issues/6115

* only systematic codes are considered at this point ( all jerasure
  techniques are systematic). Although the API could be extended to
  include non systematic codes, it is probably a case of over
  engineering at this point.

* add link to
  http://tracker.ceph.com/issues/6113
  add ceph osd pool create [name] [key=value]

* update the plugin system description to match the proposed
  implementation http://tracker.ceph.com/issues/5877

http://tracker.ceph.com/issues/4929 refs #4929

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>

Signed-off-by: Loic Dachary <loic@dachary.org>
SharedPtrRegistry: get_next must not delete while holding the lock

    bool get_next(const K &key, pair<K, VPtr> *next)

may indirectly delete the object pointed by next->second when
doing :

    *next = make_pair(i->first, next_val);

and it will deadlock (EDEADLK) when

    void operator()(V *to_remove) {
      {
	Mutex::Locker l(parent->lock);

tries to acquire the lock because it is already held. The
Mutex::Locker is isolated in a block and the *next* parameter is set
outside of the block.

A test case demonstrating the problem is added to test_sharedptr_registry.cc

http://tracker.ceph.com/issues/6117 fixes #6117

Signed-off-by: Loic Dachary <loic@dachary.org>
cleanup: removed last references to g_conf from auth

Trivial cleanup. There were still 3 references to g_conf in CephxKeyServer.
Replaced them in favor of cct->_conf.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
librbd: fix debug print in aio_write

Reported-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Sage Weil <sage@inktank.com>
ceph.spec.in:  radosgw package doesn't require mod_fcgi

Fixes #5702

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
doc: Updated to accurately reflect that upstart applies to a single node.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge pull request #545 from dachary/wip-6117

SharedPtrRegistry: get_next must not delete while holding the lock

Reviewed-by: Samuel Just <sam.just@inktank.com>
docs: document how the current OSD PG/object versions work

Signed-off-by: Greg Farnum <greg@inktank.com>
MOSDOpReply: rename reassert_version -> replay_version

Because that's what it's for. reassert_version is a bit ambiguous.

Signed-off-by: Greg Farnum <greg@inktank.com>
MOSDOpReply: rename *_version() -> *_replay_version()

We have been returning the object's "user version" and using that
for replay, but that is in fact incorrect. In preparation for fixing
up the user version semantics, rename get_version to get_replay_version
and set_version to set_replay_version.

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: remove long-dead branch

This was confusing the heck out of me when trying to figure out
why I was hitting an assert. So replace the if-else block with
a more appropriate assert and don't include any misleading calls
to prepare_transaction() from sub_op_modify().

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: do not do a redundant set of ctx->new_obs.oi.version

We set this in the if below for writes, and for reads it doesn't need to
be updated (and isn't). Remove the confusing double-set so future code
inspectors don't get concerned there's a bug like I did.

Signed-off-by: Greg Farnum <greg@inktank.com>
doc: include plan for new user_version support

Signed-off-by: Greg Farnum <greg@inktank.com>
MOSDOpReply: add user_version field

Signed-off-by: Greg Farnum <greg@inktank.com>
Objecter: rename Op::version to Op::replay_version

This is used for replay, so let's be more precise!

Signed-off-by: Greg Farnum <greg@inktank.com>
Objecter: librados: mass switch from eversion_t to version_t

There are a lot of pointers throughout our request infrastructure used solely
for exporting the version to users. The interfaces we actually expose only
provide a uint64_t (leaving off eversion_t's epoch), and that's all we're
going to maintain in our new user_version scheme, so don't pretend we'll
have more in our internal interfaces.

I audited this pretty carefully; in particular:
Op::objver is only used for passing data back to users via the calling
functions IoCtxImpl::last_objver, etc
IoCtxImpl::last_objver is used only for the set_sync_op_version() call, which
provides data only for the uint64_t get_last_version() and
rados_get_last_version() calls.
AioCompletionImpl::objver is used only for the uint64_t get_version() call.
LingerOp::pobjver is used only for referencing things that are now version_t.

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