]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoReplicatedPG: correctly handle new snap collections on replica
Samuel Just [Sat, 12 Jan 2013 00:43:14 +0000 (16:43 -0800)]
ReplicatedPG: correctly handle new snap collections on replica

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoReplicatedPG: make_snap_collection when moving snap link in snap_trimmer
Samuel Just [Fri, 11 Jan 2013 23:00:02 +0000 (15:00 -0800)]
ReplicatedPG: make_snap_collection when moving snap link in snap_trimmer

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorados.cc: fix rmomapkey usage: val not needed
David Zafman [Wed, 16 Jan 2013 20:41:16 +0000 (12:41 -0800)]
rados.cc: fix rmomapkey usage: val not needed

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <samuel.just@inktank.com>
12 years agolibrados.hpp: fix omap_get_vals and omap_get_keys comments
Samuel Just [Wed, 16 Jan 2013 05:27:23 +0000 (21:27 -0800)]
librados.hpp: fix omap_get_vals and omap_get_keys comments

We list keys greater than start_after.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agorados.cc: use omap_get_vals_by_keys in getomapval
Samuel Just [Wed, 16 Jan 2013 05:26:22 +0000 (21:26 -0800)]
rados.cc: use omap_get_vals_by_keys in getomapval

Fixes: #3811
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agorados.cc: fix listomapvals usage: key,val are not needed
Samuel Just [Wed, 16 Jan 2013 05:24:50 +0000 (21:24 -0800)]
rados.cc: fix listomapvals usage: key,val are not needed

Fixes: #3812
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge branch 'wip-rbd-formatted-output'
Josh Durgin [Wed, 16 Jan 2013 21:29:22 +0000 (13:29 -0800)]
Merge branch 'wip-rbd-formatted-output'

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Conflicts:
src/rbd.cc
src/test/cli/rbd/help.t

12 years agoMerge branch 'master' into wip-scrub
Sage Weil [Wed, 16 Jan 2013 21:17:41 +0000 (13:17 -0800)]
Merge branch 'master' into wip-scrub

12 years agoosd: better error message for request on pool that dne
Sage Weil [Mon, 7 Jan 2013 06:49:48 +0000 (22:49 -0800)]
osd: better error message for request on pool that dne

If the request is sent when the pool didn't even exist, say so.  This
would have made #3734 a bit easier to track down.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: drop newlines from event descriptions
Sage Weil [Fri, 4 Jan 2013 21:00:56 +0000 (13:00 -0800)]
osd: drop newlines from event descriptions

These produce extra newlines in the log.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agotest: add cram integration test for formatted output
Josh Durgin [Fri, 4 Jan 2013 20:15:09 +0000 (12:15 -0800)]
test: add cram integration test for formatted output

This can be used with the new teuthology cram task.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: always output result for formatted output
Josh Durgin [Thu, 3 Jan 2013 20:05:52 +0000 (12:05 -0800)]
rbd: always output result for formatted output

When there's nothing, return an empty array.
This way scripts don't have to special case this.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: regenerate man page and cli test
Josh Durgin [Thu, 3 Jan 2013 00:15:18 +0000 (16:15 -0800)]
rbd: regenerate man page and cli test

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoXMLFormatter: fix pretty printing
Josh Durgin [Thu, 27 Dec 2012 18:50:53 +0000 (10:50 -0800)]
XMLFormatter: fix pretty printing

It used the wrong indentation level and did not add a newline after
closing a section. dump_stream() did not indent at all.

Simplify a little and remove the parameter from print_spaces(). If we just
remove the element from m_sections before calling print_spaces() in
close_section(), the number of elements in m_sections is always the
indentation level.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: add --pretty-format option
Josh Durgin [Wed, 2 Jan 2013 18:52:27 +0000 (10:52 -0800)]
rbd: add --pretty-format option

This is the same option the rados and radosgw-admin tool use for more
human-readable json/xml.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: move Formatter construction to main
Josh Durgin [Thu, 27 Dec 2012 22:43:32 +0000 (14:43 -0800)]
rbd: move Formatter construction to main

Each method that uses a formatter is doing the same thing.
Simplify by constructing and handling errors only once.
Also use a scoped_ptr for easy clean up.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: fix long lines
Josh Durgin [Fri, 28 Dec 2012 02:02:39 +0000 (18:02 -0800)]
rbd: fix long lines

Several >80 characters have crept in recently.
The older ones generally don't have very useful history,
so I'm not worried about obscuring the history any more.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: support plain/json/xml output formatting
Stratos Psomadakis [Thu, 27 Dec 2012 00:14:39 +0000 (16:14 -0800)]
rbd: support plain/json/xml output formatting

This patch renames the --format option to --image-format, for
specifying the RBD image format, and uses --format to specify the
output formatting (to be consistent with the other ceph tools). To
avoid breaking backwards compatibility with existing scripts, rbd will
still accept --format [1|2] for the image format, but will print a
warning message, noting its use is deprecated.

The rbd subcommands that support the new --format option are : ls, info, snap
list, children, showmapped, lock list.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomon: note scrub errors in health summary
Sage Weil [Tue, 15 Jan 2013 02:23:52 +0000 (18:23 -0800)]
mon: note scrub errors in health summary

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix rescrub after repair
Sage Weil [Tue, 15 Jan 2013 02:31:06 +0000 (18:31 -0800)]
osd: fix rescrub after repair

We were rescrubbing if INCONSISTENT is set, but that is now persistent.
Add a new scrub_after_recovery flag that is reset on each peering interval
and set that when repair encounters errors.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-rpm-update'
Gary Lowell [Wed, 16 Jan 2013 19:17:11 +0000 (11:17 -0800)]
Merge branch 'wip-rpm-update'

Merges work around for odd AS_IF behaviour in configure.ac.

12 years agoconfigure.ac: fix problem with --enable-cephfs-java
Danny Al-Gaaf [Wed, 16 Jan 2013 12:40:17 +0000 (13:40 +0100)]
configure.ac: fix problem with --enable-cephfs-java

The AS_IF used to cover java related checks via --enable-cephfs-java
didn't work correctly. Use a plain 'if/fi' instead to make sure this
section is only executed if --enable-cephfs-java is used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds: fix usage typo for ceph-mds
Sam Lang [Wed, 16 Jan 2013 15:43:58 +0000 (09:43 -0600)]
mds: fix usage typo for ceph-mds

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge branch 'wip-rpm-update'
Gary Lowell [Tue, 15 Jan 2013 20:39:03 +0000 (12:39 -0800)]
Merge branch 'wip-rpm-update'

Clean-up the handling of ceph java bindings in the rpm specfile and
configure.ac.

12 years agoosd: note must_scrub* flags in PG operator<<
Sage Weil [Tue, 15 Jan 2013 02:22:02 +0000 (18:22 -0800)]
osd: note must_scrub* flags in PG operator<<

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: based INCONSISTENT pg state on persistent scrub errors
Sage Weil [Tue, 15 Jan 2013 02:21:46 +0000 (18:21 -0800)]
osd: based INCONSISTENT pg state on persistent scrub errors

This makes the state persistent across PG peering and OSD restarts.

This has the side-effect that, on recovery, we rescrub any PGs marked
inconsistent.  This is new behavior!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix scrub scheduling for 0.0
Sage Weil [Tue, 15 Jan 2013 02:20:29 +0000 (18:20 -0800)]
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>
12 years agoosd: note last_clean_scrub_stamp, last_scrub_errors
Sage Weil [Mon, 14 Jan 2013 07:03:01 +0000 (23:03 -0800)]
osd: note last_clean_scrub_stamp, last_scrub_errors

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: add num_scrub_errors to object_stat_t
Sage Weil [Mon, 14 Jan 2013 06:59:39 +0000 (22:59 -0800)]
osd: add num_scrub_errors to object_stat_t

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t
Sage Weil [Mon, 14 Jan 2013 06:43:35 +0000 (22:43 -0800)]
osd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix object_stat_sum_t dump signedness
Sage Weil [Mon, 14 Jan 2013 06:56:14 +0000 (22:56 -0800)]
osd: fix object_stat_sum_t dump signedness

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: change scrub min/max thresholds
Sage Weil [Mon, 14 Jan 2013 06:04:58 +0000 (22:04 -0800)]
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>
12 years agoosd/PG: remove useless osd_scrub_min_interval check
Sage Weil [Mon, 14 Jan 2013 04:27:59 +0000 (20:27 -0800)]
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>
12 years agoosd: move scrub schedule random backoff to seperate helper
Sage Weil [Mon, 14 Jan 2013 04:25:39 +0000 (20:25 -0800)]
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>
12 years agoosd/PG: trigger scrub via scrub schedule, must_ flags
Sage Weil [Sat, 12 Jan 2013 17:18:38 +0000 (09:18 -0800)]
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>
12 years agoosd/PG: introduce flags to indicate explicitly requested scrubs
Sage Weil [Sat, 12 Jan 2013 17:15:16 +0000 (09:15 -0800)]
osd/PG: introduce flags to indicate explicitly requested scrubs

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/PG: move scrub schedule registration into a helper
Sage Weil [Sat, 12 Jan 2013 17:14:01 +0000 (09:14 -0800)]
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>
12 years agoac_prog_javah.m4: Use AC_CANONICAL_TARGET instead of AC_CANONICAL_SYSTEM.
Gary Lowell [Mon, 14 Jan 2013 22:11:54 +0000 (14:11 -0800)]
ac_prog_javah.m4:  Use AC_CANONICAL_TARGET instead of AC_CANONICAL_SYSTEM.

12 years agoMerge branch 'wip-java-sync'
Noah Watkins [Mon, 14 Jan 2013 21:23:29 +0000 (13:23 -0800)]
Merge branch 'wip-java-sync'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
12 years agojava: add fine grained synchronization
Noah Watkins [Fri, 11 Jan 2013 23:56:10 +0000 (15:56 -0800)]
java: add fine grained synchronization

Adds r/w lock to protect against some races.

1. Mutual exclusion for mount/unmount prevents races between the two in
libcephfs, which isn't safe (access to ceph_mount_info state).

2. An extremely narrow race between unmount and ceph_* calls in
libcephfs. ThreadA calls ceph_xxx, is_mounted test passes, then ThreadB
calls unmount and destroys the client. ThreadA resumes with a bad client
pointer.

3. Race between unmount and ceph_* calls in JNI. In JNI we hold the
CephContext reference across ceph_* calls. If the ceph mount were to be
released while a thread was returning from a ceph_* call then an attempt
to write to the log (e.g. the return value) would reference bad context.
Since ceph_release is only called by finalize() then no thread can be in
JNI.  So this is actually safe.

Using r/w here provides trade-off between allowing concurrency into
libcephfs, and not having to constantly update the Java bindings. The
only assumption is that unmount/mount race with the rest of the
interface.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: remove all intrinsic locks
Noah Watkins [Fri, 11 Jan 2013 23:42:50 +0000 (15:42 -0800)]
java: remove all intrinsic locks

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: remove unnecessary synchronization
Noah Watkins [Fri, 11 Jan 2013 23:23:57 +0000 (15:23 -0800)]
java: remove unnecessary synchronization

The body of ceph_unmount is a call to a synchronized method.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: remove create/release synchronization
Noah Watkins [Fri, 11 Jan 2013 23:19:13 +0000 (15:19 -0800)]
java: remove create/release synchronization

The constructor calls create, and finalize() calls release. Since each
of these can only happen once (enforced by Java), there is no fear of a
race condition.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoRevert "osdmap: spread replicas across hosts with default crush map"
Sage Weil [Mon, 14 Jan 2013 15:37:59 +0000 (07:37 -0800)]
Revert "osdmap: spread replicas across hosts with default crush map"

This reverts commit 7ea5d84fa3d0ed3db61eea7eb9fa8dbee53244b6.

This breaks teuthology and vstart both in its current state.

12 years agomon: OSDMonitor: don't output to stdout in plain text if json is specified
Joao Eduardo Luis [Thu, 10 Jan 2013 18:54:12 +0000 (18:54 +0000)]
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>
12 years agoosdmap: spread replicas across hosts with default crush map
Sage Weil [Sat, 12 Jan 2013 01:23:22 +0000 (17:23 -0800)]
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>
12 years agomon: OSDMonitor: only share osdmap with up OSDs
Joao Eduardo Luis [Sat, 12 Jan 2013 01:06:36 +0000 (01:06 +0000)]
mon: OSDMonitor: only share osdmap with up OSDs

Try to share the map with a randomly picked OSD; if the picked monitor is
not 'up', then try to find the nearest 'up' OSD in the map by doing a
backward and a forward linear search on the map -- this would be O(n) in
the worst case scenario, as we only do a single iteration starting on the
picked position, incrementing and decrementing two different iterators
until we find an appropriate OSD or we exhaust the map.

Fixes: #3629
Backport: bobtail

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorbd: Fix tabs
Dan Mick [Sat, 12 Jan 2013 00:18:10 +0000 (16:18 -0800)]
rbd: Fix tabs

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agodoc: Updates to CRUSH paper.
John Wilkins [Fri, 11 Jan 2013 23:56:02 +0000 (15:56 -0800)]
doc: Updates to CRUSH paper.

fixes: 3329, 3707, 3711, 3389

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorbd: make 'add' modprobe rbd so it has a chance of success
Dan Mick [Fri, 11 Jan 2013 02:46:13 +0000 (18:46 -0800)]
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>
12 years agorbd: call udevadm settle on map/unmap
Dan Mick [Fri, 11 Jan 2013 02:44:44 +0000 (18:44 -0800)]
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>
12 years agoOSD: only trim up to the oldest map still in use by a pg
Samuel Just [Fri, 11 Jan 2013 19:02:15 +0000 (11:02 -0800)]
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>
12 years agoOSD: check for empty command in do_command
Samuel Just [Fri, 11 Jan 2013 18:44:04 +0000 (10:44 -0800)]
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>
12 years agoMerge pull request #32 from imjustmatthew/imjustmatthew_docs
John Wilkins [Fri, 11 Jan 2013 20:09:25 +0000 (12:09 -0800)]
Merge pull request #32 from imjustmatthew/imjustmatthew_docs

Correct typo in mon docs 'ceph.com' to 'ceph.conf'

12 years agoCorrect typo in mon docs 'ceph.com' to 'ceph.conf' 32/head
Matthew Roy [Fri, 11 Jan 2013 19:59:53 +0000 (14:59 -0500)]
Correct typo in mon docs 'ceph.com' to 'ceph.conf'

12 years agoqa/run_xfstests.sh: use cloned xfstests repository
Alex Elder [Fri, 11 Jan 2013 18:49:36 +0000 (12:49 -0600)]
qa/run_xfstests.sh: use cloned xfstests repository

Use our own copy of the xfstests repository rather than hitting
the upstream one repeatedly.

Signed-off-by: Alex Elder <elder@inktank.com>
12 years agomon: Monitor: only schedule a timecheck after election if we are not alone
Joao Eduardo Luis [Fri, 11 Jan 2013 18:04:01 +0000 (18:04 +0000)]
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>
12 years agoMerge remote-tracking branch 'gh/wip-3633'
Sage Weil [Fri, 11 Jan 2013 02:05:27 +0000 (18:05 -0800)]
Merge remote-tracking branch 'gh/wip-3633'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: unify 'ceph health' and 'ceph status'; add json output
Joao Eduardo Luis [Wed, 2 Jan 2013 16:07:33 +0000 (16:07 +0000)]
mon: Monitor: unify 'ceph health' and 'ceph status'; add json output

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: use 'else if' on handle_command instead of bunches of 'if'
Joao Eduardo Luis [Wed, 2 Jan 2013 14:45:01 +0000 (14:45 +0000)]
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>
12 years agomon: Monitor: move a couple of if's together on handle_command()
Joao Eduardo Luis [Wed, 2 Jan 2013 14:42:08 +0000 (14:42 +0000)]
mon: Monitor: move a couple of if's together on handle_command()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: reduce indentation level; make code more readable
Joao Eduardo Luis [Wed, 2 Jan 2013 14:39:51 +0000 (14:39 +0000)]
mon: Monitor: reduce indentation level; make code more readable

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: add timecheck infrastructure to detect clock skews
Joao Eduardo Luis [Thu, 27 Dec 2012 20:11:33 +0000 (20:11 +0000)]
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>
12 years agomessages: add MTimeCheck
Joao Eduardo Luis [Wed, 26 Dec 2012 11:43:42 +0000 (11:43 +0000)]
messages: add MTimeCheck

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added -a option. Should work without from server, as described.
John Wilkins [Fri, 11 Jan 2013 00:03:02 +0000 (16:03 -0800)]
doc: Added -a option. Should work without from server, as described.

fixes: #3750

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Normalized to term "drive" rather than disk. Changed "(Manual)" entry on remove...
John Wilkins [Thu, 10 Jan 2013 23:59:59 +0000 (15:59 -0800)]
doc: Normalized to term "drive" rather than disk. Changed "(Manual)" entry on remove OSD.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'next'
Samuel Just [Thu, 10 Jan 2013 23:06:19 +0000 (15:06 -0800)]
Merge branch 'next'

12 years agorados: add truncate support
Samuel Just [Fri, 4 Jan 2013 05:13:44 +0000 (21:13 -0800)]
rados: add truncate support

Signed-off-by: Samuel Just <sam.just@inktank.com>
Revewed-by: Greg Farnum <greg@inktank.com>
12 years agoconfig_opts.h: default osd_recovery_delay_start to 0
Samuel Just [Thu, 10 Jan 2013 19:06:02 +0000 (11:06 -0800)]
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>
12 years agoReplicatedPG: fix snapdir trimming
Samuel Just [Thu, 10 Jan 2013 03:17:23 +0000 (19:17 -0800)]
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>
12 years agoRevert "rgw: fix handler leak in handle_request"
Yehuda Sadeh [Thu, 10 Jan 2013 18:14:11 +0000 (10:14 -0800)]
Revert "rgw: fix handler leak in handle_request"

This reverts commit eba314a811cd98a79f483dc7a9128fe76c722c78.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge pull request #31 from chrisglass/expose_cluster_stats_to_python
Gregory Farnum [Thu, 10 Jan 2013 18:09:25 +0000 (10:09 -0800)]
Merge pull request #31 from chrisglass/expose_cluster_stats_to_python

Added python wrapper to rados_cluster_stat

12 years agoAdded python wrapper to rados_cluster_stat 31/head
Chris Glass [Thu, 10 Jan 2013 13:43:49 +0000 (14:43 +0100)]
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>
12 years agoconfigure.ac: check for org.junit.rules.ExternalResource
Danny Al-Gaaf [Wed, 9 Jan 2013 21:35:16 +0000 (22:35 +0100)]
configure.ac: check for org.junit.rules.ExternalResource

Check for org.junit.rules.ExternalResource if build with
--enable-cephfs-java and --with-debug. Checking for junit4
isn't enough since junit4 has this class not before 4.7.

Added some m4 files to get some JAVA related macros. Changed
autogen.sh to work with local m4 files/macros.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoconfigure.ac: change junit4 handling
Danny Al-Gaaf [Fri, 4 Jan 2013 17:51:31 +0000 (18:51 +0100)]
configure.ac: change junit4 handling

Change handling of --with-debug and junit4. Add a new conditional HAVE_JUNIT4
to be able to build ceph-test package also if junit4 isn't available. In
this case simply don't build libcephfs-test.jar, but the rest of the tools.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoconfigure.ac: remove AC_PROG_RANLIB
Danny Al-Gaaf [Fri, 4 Jan 2013 17:51:30 +0000 (18:51 +0100)]
configure.ac: remove AC_PROG_RANLIB

Remove already comment out AC_PROG_RANLIB to get rid of warning:

libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: fix libcephfs-jni package name
Danny Al-Gaaf [Fri, 4 Jan 2013 17:51:29 +0000 (18:51 +0100)]
ceph.spec.in: fix libcephfs-jni package name

Rename libcephfs-jni to libcephfs_jni1 to reflect the SO name/version of
the library and to prevent RPMLINT to complain about the naming.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: rename libcephfs-java package to cephfs-java
Danny Al-Gaaf [Fri, 4 Jan 2013 17:51:28 +0000 (18:51 +0100)]
ceph.spec.in: rename libcephfs-java package to cephfs-java

Rename the libcephfs-java package to cephfs-java since the package
contains no (classic) library and RPMLINT complains about the name.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: fix handling of java files
Danny Al-Gaaf [Fri, 4 Jan 2013 17:51:27 +0000 (18:51 +0100)]
ceph.spec.in: fix handling of java files

Fix handling of JAVA (jar) files. Don't move the files around in the install
section since the related Makefile is fixed instead.

Use %{_javadir} instead of /usr/share/java/

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/java/Makefile.am: fix default java dir
Danny Al-Gaaf [Fri, 4 Jan 2013 17:51:26 +0000 (18:51 +0100)]
src/java/Makefile.am: fix default java dir

Fix default javadir in src/java/Makefile.am to $(datadir)/java
since this is the common data dir for java files.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorbd: allow copy of zero-length images. Includes simple test.
Dan Mick [Wed, 9 Jan 2013 22:50:48 +0000 (14:50 -0800)]
rbd: allow copy of zero-length images.  Includes simple test.

Fixes: #3765
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agodoc/install/debian.rst: fix typo in link ref; broke doc build
Dan Mick [Thu, 10 Jan 2013 00:10:36 +0000 (16:10 -0800)]
doc/install/debian.rst: fix typo in link ref; broke doc build

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge branch 'next'
Dan Mick [Wed, 9 Jan 2013 23:11:36 +0000 (15:11 -0800)]
Merge branch 'next'

Want to get various rbd-related fixes together for upgrade testing

12 years agoReplicatedPG: increment scrubber.errors rather than errors
Samuel Just [Wed, 9 Jan 2013 22:39:00 +0000 (14:39 -0800)]
ReplicatedPG: increment scrubber.errors rather than errors

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibrados: add aio stat tests
Filippos Giannakos [Thu, 20 Dec 2012 20:05:11 +0000 (22:05 +0200)]
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>
12 years agolibrados: implement aio_stat
Filippos Giannakos [Thu, 20 Dec 2012 20:05:10 +0000 (22:05 +0200)]
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>
12 years agoosd: make missing head non-fatal during scrub
Sage Weil [Wed, 2 Jan 2013 17:39:26 +0000 (09:39 -0800)]
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>
12 years agorgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI
Sylvain Munaut [Mon, 7 Jan 2013 12:13:49 +0000 (13:13 +0100)]
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>
12 years agorgw: fix handler leak in handle_request
caleb miles [Tue, 8 Jan 2013 20:56:00 +0000 (15:56 -0500)]
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>
12 years agolibrbd: Allow get_lock_info to fail
Dan Mick [Tue, 8 Jan 2013 19:21:22 +0000 (11:21 -0800)]
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>
12 years agodoc/release-notes: v0.48.3argonaut
Sage Weil [Wed, 9 Jan 2013 02:21:12 +0000 (18:21 -0800)]
doc/release-notes: v0.48.3argonaut

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/install: new URLs for argonaut vs bobtail
Sage Weil [Tue, 8 Jan 2013 04:51:04 +0000 (20:51 -0800)]
doc/install: new URLs for argonaut vs bobtail

Also restructure the document a bit to make the choice of packages more
clear.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/release-notes: v0.56.1
Sage Weil [Tue, 8 Jan 2013 04:46:31 +0000 (20:46 -0800)]
doc/release-notes: v0.56.1

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-stripe-gran'
Noah Watkins [Tue, 8 Jan 2013 00:14:16 +0000 (16:14 -0800)]
Merge branch 'wip-stripe-gran'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agotest: enforce -ENOTCONN contract in libcephfs
Noah Watkins [Mon, 7 Jan 2013 23:50:36 +0000 (15:50 -0800)]
test: enforce -ENOTCONN contract in libcephfs

Tests all relevant calls for -ENOTCONN when used with an unmounted
ceph_mount_info param.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agolibcephfs: return -ENOTCONN when call unmounted
Noah Watkins [Mon, 7 Jan 2013 23:47:38 +0000 (15:47 -0800)]
libcephfs: return -ENOTCONN when call unmounted

Adds -ENOTCONN return value for stat, fchmod, fchown, lchown.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoPG: set DEGRADED in Active AdvMap handler based on pool size
Samuel Just [Mon, 7 Jan 2013 23:02:34 +0000 (15:02 -0800)]
PG: set DEGRADED in Active AdvMap handler based on pool size

Otherwise, if the acting set does not change, the pg might
not show up as degraded if the pool size now exceeds the
acting set size.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibcephfs: clarify interface return value
Noah Watkins [Mon, 7 Jan 2013 23:04:33 +0000 (15:04 -0800)]
libcephfs: clarify interface return value

Document that ceph_get_stripe_unit_granularity may return an error code
(e.g. -ENOTCONN). The interface requires a mount, but currently we
return a compile-time constant. Other error codes may be possible in the
future.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'next'
Sage Weil [Mon, 7 Jan 2013 21:12:33 +0000 (13:12 -0800)]
Merge branch 'next'

12 years agoMerge branch 'wip-3678-b' into next
Sage Weil [Mon, 7 Jan 2013 21:04:13 +0000 (13:04 -0800)]
Merge branch 'wip-3678-b' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>