Return -EBUSY instead. After the header is removed, the snapshots
can't be removed or read, so make sure they're gone before proceeding.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This was broken in fa722de670.
Fix it by checking if the mapping was correct in the sender's epoch, and
either drop it (if valid) or handle_misdirected_request() if not.
Also fix the documentation for op_is_queueable() to not be a gigantic lie.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
testrados can act as testreadwrite or testsnaps by changing the
command line options for the weight of each operation type.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
A single WriteOp already does multiple aio_writes. Each aio_write
gets a unique tid that is checked upon completion. There's no reason
to loop over the ranges twice since we can use the done flag instead
of the set of completions in WriteOp::finished().
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This will allow nested writes to keep track of which write actually
completed. Also remove finish() and _finish() from TestOp subclasses
that had the same implementation as the superclass.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Keep track of when we have outstanding updates, and while we do, make
sure the monitor responds within a timeout (default 30 seconds). If
it doesn't, reconnect!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Put OCF resource agents in a separate subpackage,
to be enabled with a separate build conditional
(--with ocf).
Make the subpackage depend on the resource-agents
package, which provides the ocf-shellfuncs library
that the Ceph RAs use.
Signed-off-by: Florian Haas <florian@hastexo.com>
Add a wrapper around the ceph init script that makes
MDS, OSD and MON configurable as Open Cluster Framework
(OCF) compliant cluster resources. Allows Ceph
daemons to tie in with cluster resource managers that
support OCF, such as Pacemaker (http://www.clusterlabs.org).
Disabled by default, configure --with-ocf to enable.
Signed-off-by: Florian Haas <florian@hastexo.com>
We can't propose_pending() from any context; do this in the tick() thread,
with the proper locking. Among other things, this fixes the crash on
startup that is now triggered due to eba235f2.
Signed-off-by: Sage Weil <sage@newdream.net>
An exit code of 1 on status is defined in LSB as
"program is dead, but pid file exists". Check for existence
of this pid file, and only set the exit status 1 if it's still there.
Set it to 3 ("program is not running") otherwise.
Reference: http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
Signed-off-by: Florian Haas <florian@hastexo.com>
We may not have a valid OSDMap in all of these cases (notably, during
boot). Always take the fsid from the monmap, which will be valid after
we've authenticated.
This fixes messages like
2011-12-29 08:53:44.530830 7ff3595e2700 mon.a@0(leader).pg v5 handle_statfs on fsid 00000000-0000-0000-0000-000000000000 != f8a6383d-5fbe-4f65-907e-f8d09e1d540d
on the monitor from MPGStats messages with a bad fsid right after osd boot.
Signed-off-by: Sage Weil <sage@newdream.net>
Tell the monitor which monmap version we have in our initial auth message.
Make the monitor send the latest monmap if it has something newer. This
ensures that once authentication completes the monclient has the latest
monmap and a valid fsid.
Fixes: #1848
Signed-off-by: Sage Weil <sage@newdream.net>