Sage Weil [Fri, 27 Apr 2012 04:51:23 +0000 (21:51 -0700)]
config: allow {get,set}_val on subsystem debug levels
This mimics the allows you to get and set subsystem debug levels via the
normal config access methods. Among other things, this allows librados
users to set debug levels.
Fixes: #2350 Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 25 Apr 2012 20:07:34 +0000 (13:07 -0700)]
osd: filter osds removed from probe set from peer_info_requested
Peef_info_requested should be a strict subset of the probe set. Filter
osds that are dropped from probe from peer_info_requested. We could also
restart peering from scratch here, but this is less expensive, because we
don't have to re-probe everyone.
Once we adjust the probe and peer_info_requested sets, (re)check if we're
done: we may have been blocedk on a previous peer_info_requested entry.
librados: call notification under different thread context
This fixes #2342. We shouldn't call notify on the dispatcher
context. We should also make sure that we don't hold
the client lock while waiting for the responses.
Also, pushed the client_lock locking into the
ctx->notify().
Sage Weil [Wed, 25 Apr 2012 20:07:34 +0000 (13:07 -0700)]
osd: filter osds removed from probe set from peer_info_requested
Peef_info_requested should be a strict subset of the probe set. Filter
osds that are dropped from probe from peer_info_requested. We could also
restart peering from scratch here, but this is less expensive, because we
don't have to re-probe everyone.
Once we adjust the probe and peer_info_requested sets, (re)check if we're
done: we may have been blocedk on a previous peer_info_requested entry.
mon: decode old PGMap Incrementals differently from new ones
We need to distinguish between the old 0 (meaning undefined) and
the new 0 (meaning switch to 0 and disable the flags). So rev the
encoding version on PGMap::Incremental, and if you decode an old
version with [near]full_ratio == 0, set the ratio to -1 instead. Then
when applying the Incremental interpret -1 as no change.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com> Reviewed-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 24 Apr 2012 16:43:44 +0000 (09:43 -0700)]
librbd: pass errors removing head back to user
In particular, the OSD may return EBUSY if there are still watchers.
Ignore ENOENT, as that may indicate we are cleaning up a previously
aborted removal.
Fixes: #2311 Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Tue, 24 Apr 2012 17:55:18 +0000 (10:55 -0700)]
mon: fix pg stats timeout
We clear out the osd entry when an osd goes up or down. Thus, if we find
it missing from an up osd, we should start the timer. Otherwise we get
behavior like this
2012-04-24 13:22:47.888291 7fa5bc587700 mon.peon5752@0(leader).osd e21633 OSDMonitor::handle_osd_timeouts: never got MOSDPGStat info from osd 521. Marking down!
2012-04-24 13:22:50.076394 7fa5bcd88700 log [INF] : osd.521 [2607:f298:4:2243::7088]:6806/53217 boot
2012-04-24 13:22:52.903558 7fa5bc587700 mon.peon5752@0(leader).osd e21638 OSDMonitor::handle_osd_timeouts: never got MOSDPGStat info from osd 521. Marking down!
2012-04-24 13:23:15.144532 7fa5bcd88700 log [INF] : osd.521 [2607:f298:4:2243::7088]:6806/53217 boot
2012-04-24 13:23:17.967118 7fa5bc587700 mon.peon5752@0(leader).osd e21663 OSDMonitor::handle_osd_timeouts: never got MOSDPGStat info from osd 521. Marking down!
2012-04-24 13:23:22.173778 7fa5bcd88700 log [INF] : osd.521 [2607:f298:4:2243::7088]:6806/53217 boot
2012-04-24 13:23:22.981556 7fa5bc587700 mon.peon5752@0(leader).osd e21668 OSDMonitor::handle_osd_timeouts: never got MOSDPGStat info from osd 521. Marking down!
2012-04-24 13:23:45.245380 7fa5bcd88700 log [INF] : osd.521 [2607:f298:4:2243::7088]:6806/53217 boot
when the pg stats message doesn't arrive quickly enough.
Fixes: #2341 Signed-off-by: Sage Weil <sage@newdream.net> Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
If this happened, we would not re-read the header with the new
snapshot, so the snapshot would not happen at the intended point
in time, but only after we re-read the header again.
* snapid should determine whether our mapped snapshot is gone, not snapname
* snap_set(<nonexistent_snap>) shouldn't reset us to CEPH_NOSNAP
* snapname should be set before using the it in the perfcounter name
* snapname and image name don't need to be passed as arguments since an
ImageCtx already contains that info
* ictx_check() doesn't need to check for non-existent snaps - only I/Os care,
so check in check_io() instead
Sage Weil [Mon, 23 Apr 2012 20:57:25 +0000 (13:57 -0700)]
run_seed_to.sh: rework the script, make it more flexible and broaden the tests.
Allow for '-h' and other options such as disabling the journal sync tests,
defining it is to be run on a btrfs FS, enabling exit on error (default is
now 'off'), and allow certain env variables to specify additional options
to each store.
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
Sage Weil [Sun, 22 Apr 2012 03:28:45 +0000 (20:28 -0700)]
Makefile: disable format-security warning
The prt() varargs function generates this warning
test/rbd/fsx.c: In function ‘prt’:
warning: test/rbd/fsx.c:203:2: format not a string literal and no format arguments [-Wformat-security]
warning: test/rbd/fsx.c:205:3: format not a string literal and no format arguments [-Wformat-security]
Disable that check for the fsx build only.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Sat, 21 Apr 2012 00:13:08 +0000 (17:13 -0700)]
librbd: fix ictx_check pointer weirdness by using std::string
I was seeing failures of LibRBD.TestIOToSnapshot where we would fail to
refresh after rollback, even though the snap existed. I assume it is
because the std::string whose c_str() we were pointing to was reallocated.
Sage Weil [Fri, 20 Apr 2012 23:56:57 +0000 (16:56 -0700)]
filestore: fix collection_add journal replay problem
In collection_add we have a two-phase guard set on the linked object via
the old name. During replay, we might see that the dest name is missing
and replay the operation, and in the process overwrite a newer guard with
an older one.
Avoid this by checking the source name too, and skipping the operation
entirely if a new guard exists.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This code should be on a stand-alone class, instead of being embedded on
a single test, in case someone or something find it useful somewhere down
the line.
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
Sage Weil [Thu, 19 Apr 2012 18:00:20 +0000 (11:00 -0700)]
librbd: fix zeroing of trailing bits on short reads that span objects
handle_sparse_read() was taking buf_ofs and buf_len, but buf_len was being
interpreted as the total size of the buffer, not the length of the extent
in the buffer start at buf_ofs. Both callers pass in an extent length, so
fix the zero code to do the right thing.
Specifically, the behavior I saw was:
- read range spanning 2 objects, trailing 20k and leading 50k
- first object didn't exist, zeroed first 20k of buffer
- second object didn't exist, zeroed next 30k (50k-20k) of buffer
- the last 20k of buffer was unzeroed.
Sage Weil [Fri, 20 Apr 2012 23:36:54 +0000 (16:36 -0700)]
log: prefix dump with line numbers
This makes it easier to interpret the dump, and makes it obvious what is
dump (and potentially a dup of something that was already logged) and what
is not.