Commit Graph

23236 Commits

Author SHA1 Message Date
Sage Weil
26a63df97b osd: fix scrub scheduling for 0.0
The initial value for pair<utime_t,pg_t> can match pg 0.0, preventing it
from being manually scrubbed.  Fix!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 19:20:53 -08:00
Sage Weil
389bed5d33 osd: note last_clean_scrub_stamp, last_scrub_errors
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:40 -08:00
Sage Weil
2475066c32 osd: add num_scrub_errors to object_stat_t
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:40 -08:00
Sage Weil
d738328488 osd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:40 -08:00
Sage Weil
6f6a41937f osd: fix object_stat_sum_t dump signedness
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:40 -08:00
Sage Weil
299548024a osd: change scrub min/max thresholds
The previous 'osd scrub min interval' was mostly meaningless and useless.
Meanwhile, the 'osd scrub max interval' would only trigger a scrub if the
load was sufficiently low; if it was high, the PG might *never* scrub.

Instead, make the 'min' what the max used to be.  If it has been more than
this many seconds, and the load is low, scrub.  And add an additional
condition that if it has been more than the max threshold, scrub the PG
no matter what--regardless of the load.

Note that this does not change the default scrub interval for less-loaded
clusters, but it *does* change the meaning of existing config options.

Fixes: #3786
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:40 -08:00
Sage Weil
16d67c798b osd/PG: remove useless osd_scrub_min_interval check
This was already a no-op: we don't call PG::scrub_sched() unless it has
been osd_scrub_max_interval seconds since we last scrubbed.  Unless we
explicitly requested in, in which case we don't want this check anyway.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:40 -08:00
Sage Weil
a148120776 osd: move scrub schedule random backoff to seperate helper
Separate this from the load check, which will soon vary dependon on the
PG.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:39 -08:00
Sage Weil
62ee6e099a osd/PG: trigger scrub via scrub schedule, must_ flags
When a scrub is requested, flag it and move it to the front of the
scrub schedule instead of immediately queuing it.  This avoids
bypassing the scrub reservation framework, which can lead to a heavier
impact on performance.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:39 -08:00
Sage Weil
1441095d6b osd/PG: introduce flags to indicate explicitly requested scrubs
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:39 -08:00
Sage Weil
796907e215 osd/PG: move scrub schedule registration into a helper
Simplifies callers, and will let us easily modify the decision of when
to schedule the PG for scrub.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-14 18:24:39 -08:00
Sage Weil
017b6d63db Revert "osdmap: spread replicas across hosts with default crush map"
This reverts commit 7ea5d84fa3.

This breaks teuthology and vstart both in its current state.
2013-01-14 07:37:59 -08:00
Joao Eduardo Luis
410906e049 mon: OSDMonitor: don't output to stdout in plain text if json is specified
Fixes: #3748

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-12 23:04:20 -08:00
Sage Weil
7ea5d84fa3 osdmap: spread replicas across hosts with default crush map
This is more often the case than not, and we don't have a good way to
magically know what size of cluster the user will be creating.  Better to
err on the side of doing the right thing for more people.

Fixes: #3785
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-01-11 17:10:24 -08:00
Dan Mick
1f721804df rbd: Fix tabs
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-11 16:25:29 -08:00
John Wilkins
34138993eb doc: Updates to CRUSH paper.
fixes: 3329, 3707, 3711, 3389

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-01-11 15:56:02 -08:00
Dan Mick
e94b06a192 rbd: make 'add' modprobe rbd so it has a chance of success
Check for existence of /sys/bus/rbd first to avoid unnecessary calls

Fixes: #3784
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
2013-01-11 14:28:50 -08:00
Dan Mick
15bb00cafc rbd: call udevadm settle on map/unmap
When we map/unmap devices, udev gets called to manage device nodes;
this will allow the command to wait for those manipulations to complete,
particularly for test runs, so that the device tree is stable by the
time the command exits.

--no-settle is also provided to avoid this behavior if desired (say,
for a series of 'map' commands, perhaps the user wants to wait for
settling only on the last of the series).

Fixes: #3635
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
2013-01-11 14:28:50 -08:00
Samuel Just
66eb93b836 OSD: only trim up to the oldest map still in use by a pg
map_cache.cached_lb() provides us with a lower bound across
all pgs for in-use osdmaps.  We cannot trim past this since
those maps are still in use.

backport: bobtail
Fixes: #3770
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-11 12:17:10 -08:00
Samuel Just
8cf79f252a OSD: check for empty command in do_command
Fixes: #3878
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-01-11 12:15:53 -08:00
John Wilkins
3e1472955b Merge pull request #32 from imjustmatthew/imjustmatthew_docs
Correct typo in mon docs 'ceph.com' to 'ceph.conf'
2013-01-11 12:09:25 -08:00
Matthew Roy
0f161f1e59 Correct typo in mon docs 'ceph.com' to 'ceph.conf' 2013-01-11 14:59:53 -05:00
Joao Eduardo Luis
8d0fa15e6a mon: Monitor: only schedule a timecheck after election if we are not alone
Fixes: #3790

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-11 10:15:20 -08:00
Sage Weil
310112f702 Merge remote-tracking branch 'gh/wip-3633'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-10 18:05:27 -08:00
Joao Eduardo Luis
58e03ecb89 mon: Monitor: unify 'ceph health' and 'ceph status'; add json output
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-01-11 00:44:21 +00:00
Joao Eduardo Luis
bc57c7a9f8 mon: Monitor: use 'else if' on handle_command instead of bunches of 'if'
... when the options are mutually exclusive.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-01-11 00:44:21 +00:00
Joao Eduardo Luis
7a7fff5725 mon: Monitor: move a couple of if's together on handle_command()
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-01-11 00:44:21 +00:00
Joao Eduardo Luis
ff1c254b82 mon: Monitor: reduce indentation level; make code more readable
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-01-11 00:44:21 +00:00
Joao Eduardo Luis
684d4ba242 mon: Monitor: add timecheck infrastructure to detect clock skews
Fixes: #3633
Fixes: #3695

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-11 00:44:21 +00:00
Joao Eduardo Luis
aa40de9088 messages: add MTimeCheck
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-11 00:44:21 +00:00
John Wilkins
e6f284e945 doc: Added -a option. Should work without from server, as described.
fixes: #3750

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-01-10 16:03:02 -08:00
John Wilkins
de6633f99b doc: Normalized to term "drive" rather than disk. Changed "(Manual)" entry on remove OSD.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-01-10 15:59:59 -08:00
Samuel Just
7a8ec1943b Merge branch 'next' 2013-01-10 15:06:58 -08:00
Samuel Just
988f359778 rados: add truncate support
Signed-off-by: Samuel Just <sam.just@inktank.com>
Revewed-by: Greg Farnum <greg@inktank.com>
2013-01-10 13:54:53 -08:00
Samuel Just
44625d4460 config_opts.h: default osd_recovery_delay_start to 0
This setting was intended to prevent recovery from overwhelming peering traffic
by delaying the recovery_wq until osd_recovery_delay_start seconds after pgs
stop being added to it.  This should be less necessary now that recovery
messages are sent with strictly lower priority then peering messages.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Gregory Farnum <greg@inktank.com>
2013-01-10 11:10:04 -08:00
Samuel Just
0f42c37359 ReplicatedPG: fix snapdir trimming
The previous logic was both complicated and not correct.  Consequently,
we have been tending to drop snapcollection links in some cases.  This
has resulted in clones incorrectly not being trimmed.  This patch
replaces the logic with something less efficient but hopefully a bit
clearer.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-10 10:34:40 -08:00
Yehuda Sadeh
035caac551 Revert "rgw: fix handler leak in handle_request"
This reverts commit eba314a811.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-10 10:14:11 -08:00
Gregory Farnum
eb997e25e0 Merge pull request #31 from chrisglass/expose_cluster_stats_to_python
Added python wrapper to rados_cluster_stat
2013-01-10 10:09:25 -08:00
Chris Glass
797b3db39b Added python wrapper to rados_cluster_stat
The new get_cluster_stats() method on the rados.Rados object calls
the rados_cluster_stat() function in the librados library.

Signed-off-by: Christopher Glass <christopher.glass@canonical.com>
2013-01-10 14:43:49 +01:00
Dan Mick
00898c1860 rbd: allow copy of zero-length images. Includes simple test.
Fixes: #3765
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-09 16:11:51 -08:00
Dan Mick
1c3d6840d1 doc/install/debian.rst: fix typo in link ref; broke doc build
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-09 16:10:36 -08:00
Dan Mick
133e4e3473 Merge branch 'next'
Want to get various rbd-related fixes together for upgrade testing
2013-01-09 15:11:36 -08:00
Samuel Just
48f1394683 ReplicatedPG: increment scrubber.errors rather than errors
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-09 14:40:36 -08:00
Filippos Giannakos
62e721a91c librados: add aio stat tests
Implement simple write-stat test, and a write-stat-remove-stat test cycle.

Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-08 19:39:19 -08:00
Filippos Giannakos
879578c1d1 librados: implement aio_stat
Implement aio stat and also export this functionality to the C API.

Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-08 19:38:43 -08:00
Sage Weil
5b12b514b0 osd: make missing head non-fatal during scrub
If we encounter a scrub without a preceeding head, warn instead of
crashing.  Note that this is still something we can't repair.

See #3705.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-01-08 18:32:38 -08:00
Sylvain Munaut
e1da85f286 rgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI
Fixes: #3735
Signed-off-by: caleb miles <caleb.miles@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-08 18:29:27 -08:00
caleb miles
eba314a811 rgw: fix handler leak in handle_request
Fixes: #3682
Signed-off-by: caleb miles <caleb.miles@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-08 18:28:31 -08:00
Dan Mick
4483285c9f librbd: Allow get_lock_info to fail
If the lock class isn't present, EOPNOTSUPP is returned for lock calls
on newer OSDs, but sadly EIO on older; we need to treat both as
acceptable failures for RBD images.  rados lock list will still fail.

Fixes #3744.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-08 18:25:46 -08:00
Sage Weil
77ddf2760e doc/release-notes: v0.48.3argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-08 18:21:12 -08:00