This was pretty pointless since each Messenger has a well-defined
exit point and shutdown process.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
With that, remove the set_nonce function and the gratuitous passing
of nonce around through layers of functions.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Instead, have a settable nonce value that you can fill in any time
after construction and that it uses during regular start().
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This function has been vestigial for a long time. Remove it and move
its remaining functionality into the constructor.
Update users to the new interface (this is remarkably easy and
simplifies the code).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
The atomic get/put scheme was retrying writes in case where it lost
races (head object was rewritten by another client). Instead we can
just back off and return success.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
- two connect() threads
- both hit if (need_addr) check
- one takes lock, sets addr, need_addr = false, unlocks
- continues to ::encode(ms_addr, ...);
- meanwhile, second thread set ms_addr _again_, but copies peer port into
place before adjusting it. racing ::encode() sees bad port and sends it
to the peer.
Fix this two ways:
- don't copy bad port into place; set it first
- re-check need_addr after taking lock
Fixes: #1747
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
To facilitate this, we do two things:
1) actually identify the number of special code values we pass around
2) use that to prevent trying to put() those non-pointer values in
Pipe::discard_queue().
Then we just call local_pipe.discard_queue() in wait() like happens
(indirectly, via reaping) with all the normal Pipes in rank_pipe.
But this does make me think that we may be approaching the point
where it's appropriate to create a subclass LocalPipe (against a
RemotePipe like our current Pipe implementation is mostly intended
to be).
Should fix#2086.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
automake seems to have difficulty with the .la dependency on another .la.
Since libjson_spirit.la is only used by libcommon.la anyway, just build it
directly into that. Sigh.
...
CXXLD libjson_spirit.la
AR libmds.a
CXXLD libcls_rbd.la
CXXLD libcls_rgw.la
CXXLD cephfs
CCLD test_ioctls
CC libcommon_la-ceph_ver.lo
CXX libcommon_la-version.lo
CXX ceph_dencoder.o
CCLD mount.ceph
CC ceph_ver.o
CXX test_libhadoopcephfs_build-version.o
CXXLD test_libhadoopcephfs_build
CXXLD libcommon.la
libtool: link: cannot find the library `libjson_spirit.la' or unhandled argument `libjson_spirit.la'
Signed-off-by: Sage Weil <sage@newdream.net>
A bug in my previous patch prevented any daemon with auto_start set to false from starting.
This patch allows:
* /etc/init.d/ceph start osd|mds|mon
* service ceph start osd|mds|mon
It however does not start daemons if auto_start is disabled when you invoke:
* /etc/init.d/ceph start
* service ceph start
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Don't generate high-level log spam on every open error.
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
Until it is fully implemented. It's also disabled in the monitor
currently, but just in case it gets into the OSDMap, do nothing for now.
Signed-off-by: Sage Weil <sage@newdream.net>
Two things we need to handle:
- callers who already hold map_lock (split_pg())
- callers who already hold another pg->lock, and want to skip the lockdep
check for this one.
Signed-off-by: Sage Weil <sage@newdream.net>
This partially refactors the OSD split code to do the split synchronously
when processing a new OSDMap. It is incomplete in that it does not yet
do anything useful for the PG. The full solution needs to:
- Do the split synchronously when applying the map update.
- Reset the parent pg so that it repeers. This will cause problems until
we consistently consider this a new interval when looking backwards in
time; this needs to be fixed. Anybody doing generate_past_intervals()
or similar will need to consider a split/merge event as an interval
boundary.
- The recovery state machine should trigger appropriately when this
happens.
- The old PG that was split should probably be handle identically to the
new children. That means deleting the old PG instance and creating a new
PG object for the newly-split child. Ditto for merge.
Signed-off-by: Sage Weil <sage@newdream.net>
When we calculate the object's new pg, take the locator key into
consideration, to avoid a crash like
osd/OSD.cc: In function 'void OSD::split_pg(PG*, std::map<pg_t, PG*>&,ObjectStore::Transaction&)' thread 7fe3df8c4700 time 2012-02-20 18:22:19.900886
osd/OSD.cc: 4066: FAILED assert(child)
Signed-off-by: Sage Weil <sage@newdream.net>
/run isn't present on older systems. Stick with the old location until it
is more pervasive, or we add an autoconf option to control it.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
/run/ceph should exists for creating UNIX domain sockets
ceph uses UNIX domain sockets for internal communication. Create their
directory on startup as /run is on a virtual filesystem.
Last-Update: <2012-02-26>
Bug-Debian: http://bugs.debian.org/660238
Forwarded: <ceph-devel@vger.kernel.org>
Signed-off-by: Laszlo Boszormenyi (GCS) <gcs@debian.hu>