]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoPG: don't compare auth with itself
Samuel Just [Fri, 29 Mar 2013 23:30:14 +0000 (16:30 -0700)]
PG: don't compare auth with itself

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: pass authoritative scrub map to _scrub
Samuel Just [Sun, 31 Mar 2013 07:00:27 +0000 (00:00 -0700)]
PG: pass authoritative scrub map to _scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: read_error should trigger a repair in _compare_scrub_objects
Samuel Just [Fri, 29 Mar 2013 00:03:28 +0000 (17:03 -0700)]
PG: read_error should trigger a repair in _compare_scrub_objects

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore,OSD: add mechanism for injecting EIO, truncating obj
Samuel Just [Tue, 26 Mar 2013 22:14:59 +0000 (15:14 -0700)]
FileStore,OSD: add mechanism for injecting EIO, truncating obj

This will be used in testing repair.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::_select_auth_object: prefer a peer which did not hit a read error
Samuel Just [Tue, 26 Mar 2013 20:09:00 +0000 (13:09 -0700)]
PG::_select_auth_object: prefer a peer which did not hit a read error

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: make _select_auth_object smarter
Samuel Just [Tue, 26 Mar 2013 20:08:29 +0000 (13:08 -0700)]
PG: make _select_auth_object smarter

Previously, we just picked the first one to have the object in
question.  Now, we will attempt to choose one that has as
much of the following as possible:
1) has the object (there must be one)
2) has an object_info attr
3) has a valid object_info attr
4) has an object_info whose size matches the scrubbed size

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::_scan_list: record read errors in the Scrubmap::object
Samuel Just [Mon, 25 Mar 2013 19:45:13 +0000 (12:45 -0700)]
PG::_scan_list: record read errors in the Scrubmap::object

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd_types: add read_error flag to Scrubmap::object
Samuel Just [Mon, 25 Mar 2013 19:43:36 +0000 (12:43 -0700)]
osd_types: add read_error flag to Scrubmap::object

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoceph-disk: handle missing journal_uuid field gracefully
Sage Weil [Fri, 29 Mar 2013 20:59:04 +0000 (13:59 -0700)]
ceph-disk: handle missing journal_uuid field gracefully

Only lower if we know it's not None.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote branch 'origin/next'
Josh Durgin [Fri, 29 Mar 2013 19:58:01 +0000 (12:58 -0700)]
Merge remote branch 'origin/next'

12 years agoMerge pull request #170 from ceph/wip-rbd-aio-flush
Josh Durgin [Fri, 29 Mar 2013 20:20:32 +0000 (13:20 -0700)]
Merge pull request #170 from ceph/wip-rbd-aio-flush

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agolibrados: move snapc creation to caller for aio_operate 170/head
Josh Durgin [Fri, 29 Mar 2013 19:46:27 +0000 (12:46 -0700)]
librados: move snapc creation to caller for aio_operate

The common case already has a snapshot context, so avoid duplicating
it (copying a potentially large vector) in IoCtxImpl::aio_operate().

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge pull request #166 from ceph/wip-disk-list
Sage Weil [Fri, 29 Mar 2013 19:24:47 +0000 (12:24 -0700)]
Merge pull request #166 from ceph/wip-disk-list

Wip disk list

Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoclient: update cap->implemented when handling revoke
Yan, Zheng [Fri, 29 Mar 2013 18:23:27 +0000 (11:23 -0700)]
client: update cap->implemented when handling revoke

Fixes #4578

Tested-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge pull request #161 from dachary/wip-4560
athanatos [Fri, 29 Mar 2013 17:50:55 +0000 (10:50 -0700)]
Merge pull request #161 from dachary/wip-4560

unit tests for LFNIndex

12 years agomsgr: allow users to mark_down a NULL Connection*
Greg Farnum [Fri, 29 Mar 2013 17:39:56 +0000 (10:39 -0700)]
msgr: allow users to mark_down a NULL Connection*

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoMerge pull request #150 from ceph/wip-4313
Sage Weil [Fri, 29 Mar 2013 17:24:53 +0000 (10:24 -0700)]
Merge pull request #150 from ceph/wip-4313

mon: ConfigKeyService: stash config keys on the monitor

Reviewed-by: Sage Weil <sage@inktank.com
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge pull request #171 from Elbandi/master
Sage Weil [Fri, 29 Mar 2013 15:38:22 +0000 (08:38 -0700)]
Merge pull request #171 from Elbandi/master

Run wrap-and-sort and add git to build deps

Reviewed-by: Sage Weil <sage@inkank.com>
12 years agoMerge pull request #172 from ceph/wip-ceph-json
Sage Weil [Fri, 29 Mar 2013 15:37:04 +0000 (08:37 -0700)]
Merge pull request #172 from ceph/wip-ceph-json

Wip ceph json

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodebian: Add git to Build-Depends (need by check_version script) 171/head
Andras Elso [Fri, 29 Mar 2013 12:34:03 +0000 (13:34 +0100)]
debian: Add git to Build-Depends (need by check_version script)

Signed-off-by: Andras Elso <elso.andras@gmail.com>
12 years agodebian: Run wrap-and-sort from devscripts
Andras Elso [Fri, 29 Mar 2013 12:28:28 +0000 (13:28 +0100)]
debian: Run wrap-and-sort from devscripts

Signed-off-by: Andras Elso <elso.andras@gmail.com>
12 years agounit test LFNIndex::remove_object and LFNIndex::lfn_unlink 161/head
Loic Dachary [Thu, 28 Mar 2013 12:38:09 +0000 (13:38 +0100)]
unit test LFNIndex::remove_object and LFNIndex::lfn_unlink

When the object name is short, check that the corresponding file is
::unlink()ed. When the object name is long, there may be multiple files
with the same name, modulo the anti-collision number showing just before
the FILENAME_COOKIE. The following scenarii are tested:

 * there only is one file

 * there are multiple files and the last one is removed

 * there are multiple files and the last one is moved in place of the
   file that is to be removed

lfn_unlink and remove_object are tested together because
lfn_unlink is a private function and remove_object is a protected function
that does very little beside calling lfn_unlink

http://tracker.ceph.com/issues/4560 refs #4560

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agoceph_json: add missing include file 172/head
Yehuda Sadeh [Thu, 28 Mar 2013 23:41:56 +0000 (16:41 -0700)]
ceph_json: add missing include file

Needed for LONG_MAX and friends

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph_json: add template specializations
Yehuda Sadeh [Thu, 28 Mar 2013 20:11:58 +0000 (13:11 -0700)]
ceph_json: add template specializations

Missing template specializations for data types that
needed for 32 bit compilation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph-disk: implement 'list' 166/head
Sage Weil [Fri, 29 Mar 2013 03:49:24 +0000 (20:49 -0700)]
ceph-disk: implement 'list'

This is based on Sandon's initial patch, but much-modified.

Mounts ceph data volumes temporarily to see what is inside.  Attempts to
associated journals with osds.

Resolves: #3120
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph.spec.in: Add python-argparse dependency
Gary Lowell [Fri, 29 Mar 2013 00:14:33 +0000 (17:14 -0700)]
ceph.spec.in:  Add python-argparse dependency

The python-argparse package is needed by ceph-create-keys script.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agomon: ConfigKeyService: stash config keys on the monitor 150/head
Joao Eduardo Luis [Fri, 1 Mar 2013 22:34:16 +0000 (22:34 +0000)]
mon: ConfigKeyService: stash config keys on the monitor

Building up on the Single-Paxos and our existing k/v store that backs
the monitor, we now introduce a simple service so that the monitors
act as a generic k/v store available to the cluster, in which a user
can stash (and later obtain) configuration keys at his own discretion.

Users can put, get, delete, list and check for values using the
following commands:

 - ceph config-key put <key> [<value>]
  or
 - ceph config-key put <key> [-i <in-file>]
  with 'value' and 'in-file' being optional; if these are not specified,
  'put' will act as 'touch' if 'key' does not exist, or will overwrite
  the value of 'key' with a zero byte value (i.e., truncates the
  contents of the value to zero)

 - ceph config-key get <key>
  or
 - ceph config-key get <key> -o <out-file>

 - ceph config-key delete <key>

 - ceph config-key list [-o <out-file]

 - ceph config-key exists <key>

Fixes: #4313
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoceph.spec.in: Move four scripts from sbin to usr/bin
Gary Lowell [Thu, 28 Mar 2013 23:12:33 +0000 (16:12 -0700)]
ceph.spec.in:  Move four scripts from sbin to usr/bin

The ceph-create-keys, ceph-disk, ceph-disk-activate, and
ceph-disk-prepare scripts are built in sbin, but debian installs
them into usr/bin, and several utilities look for them there.
This commit changes the RPM to install them in /usr/bin. (Bug #3921)

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoceph: propagate do_command()'s return value to user space
Joao Eduardo Luis [Thu, 28 Mar 2013 02:07:18 +0000 (02:07 +0000)]
ceph: propagate do_command()'s return value to user space

We were returning '1' regardless of what do_command() returned in case
of error.  This would make building tools relying on command error codes
short of useless, and forced them to rely instead on error messages.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit e91405d540ce11b9996e4977212553bd33afb3ed)

12 years agoceph: propagate do_command()'s return value to user space
Joao Eduardo Luis [Thu, 28 Mar 2013 02:07:18 +0000 (02:07 +0000)]
ceph: propagate do_command()'s return value to user space

We were returning '1' regardless of what do_command() returned in case
of error.  This would make building tools relying on command error codes
short of useless, and forced them to rely instead on error messages.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge pull request #168 from athanatos/wip_4471
Sage Weil [Thu, 28 Mar 2013 21:15:07 +0000 (14:15 -0700)]
Merge pull request #168 from athanatos/wip_4471

Wip 4471

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: update PGPool::name in PGPool::update 168/head
Samuel Just [Thu, 28 Mar 2013 21:09:17 +0000 (14:09 -0700)]
PG: update PGPool::name in PGPool::update

Fixes: #4471
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: use int64_t for pool id in PGPool
Samuel Just [Thu, 28 Mar 2013 21:01:45 +0000 (14:01 -0700)]
PG: use int64_t for pool id in PGPool

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge pull request #164 from dalgaaf/wip-da-fix-misc-1
Yehuda Sadeh [Thu, 28 Mar 2013 20:01:51 +0000 (13:01 -0700)]
Merge pull request #164 from dalgaaf/wip-da-fix-misc-1

some SCA related fixes

12 years agoOSD: flush pg osr on shutdown prior to put()
Samuel Just [Wed, 27 Mar 2013 18:32:24 +0000 (11:32 -0700)]
OSD: flush pg osr on shutdown prior to put()

Fixes: #4538
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: increment version for new functions is_complete() and aio_flush()
Josh Durgin [Wed, 27 Mar 2013 22:48:17 +0000 (15:48 -0700)]
librbd: increment version for new functions is_complete() and aio_flush()

This done in a separate commit since the increased version number
should not be backported.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: add an async flush
Josh Durgin [Thu, 21 Mar 2013 23:04:10 +0000 (16:04 -0700)]
librbd: add an async flush

At this point it's a simple wrapper around the ObjectCacher or
librados.

This is needed for QEMU so that its main thread can continue while a
flush is occurring. Since this will be backported, don't update the
librbd version yet, just add a #define that QEMU and others can use to
detect the presence of aio_flush().

Refs: #3737
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: use the same IoCtx for each request
Josh Durgin [Wed, 27 Mar 2013 22:42:10 +0000 (15:42 -0700)]
librbd: use the same IoCtx for each request

Before we were duplicating the IoCtx for each new request since they
could have a different snapshot context or read from a different
snapshot id. Since librados now supports setting these explicitly
for a given request, do that instead.

Since librados tracks outstanding requests on a per-IoCtx basis, this
also fixes a bug that causes flush() without caching to ignore
all the outstanding requests, since they were to separate,
duplicate IoCtxs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: add an is_complete() method to AioCompletions
Josh Durgin [Wed, 27 Mar 2013 22:37:27 +0000 (15:37 -0700)]
librbd: add an is_complete() method to AioCompletions

Mainly this is useful for testing, like flushing and checking that
all pending writes are complete after the flush finishes.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: add versions of a couple functions taking explicit snap args
Josh Durgin [Wed, 27 Mar 2013 22:32:29 +0000 (15:32 -0700)]
librados: add versions of a couple functions taking explicit snap args

Usually the snapid to read from or the snapcontext to send with a write
are determined implicitly by the IoCtx the operations are done on.

This makes it difficult to have multiple ops in flight to the same
IoCtx using different snapcontexts or reading from different snapshots,
particularly when more than one operation may be needed past the initial
scheduling.

Add versions of aio_read, aio_sparse_read, and aio_operate
that don't depend on the snap id or snapcontext stored in the IoCtx,
but get them from the caller. Specifying this information for each
operation can be a more useful interface in general, but for now just
add it for the methods used by librbd.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: add async flush interface
Josh Durgin [Wed, 27 Mar 2013 21:48:31 +0000 (14:48 -0700)]
librados: add async flush interface

Sometimes you don't want flush to block, and can't modify
already scheduled aio_writes. This will be useful for a
librbd async flush interface.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: increase version number to indicated new functions
Josh Durgin [Tue, 26 Mar 2013 22:20:48 +0000 (15:20 -0700)]
librados: increase version number to indicated new functions

Listing snaps and listing watchers were added to the C++ api.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: remove unneeded var from flush_set()
Josh Durgin [Thu, 28 Mar 2013 17:34:37 +0000 (10:34 -0700)]
ObjectCacher: remove unneeded var from flush_set()

The gather will only have subs if there is something to flush. Remove
the safe variable, which indicates the same thing, and convert the
conditionals that used it to an else branch. Movinig gather.activate()
inside the has_subs() check has no effect since activate() does
nothing when there are no subs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: remove NULL checks in flush_set()
Josh Durgin [Fri, 22 Mar 2013 19:17:43 +0000 (12:17 -0700)]
ObjectCacher: remove NULL checks in flush_set()

Callers will always pass a callback, so assert this and remove the
checks for it being NULL.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: always complete flush_set() callback
Josh Durgin [Fri, 22 Mar 2013 19:13:36 +0000 (12:13 -0700)]
ObjectCacher: always complete flush_set() callback

This removes the last remnants of
b5e9995f59d363ba00d9cac413d9b754ee44e370. If there's nothing to flush,
immediately call the callback instead of deleting it. Callers were
assuming they were responsible for completing the callback whenever
flush_set() returned true, and always called complete(0) in this
case. Simplify the interface and just do this in flush_set(), so that
it always calls the callback.

Since C_GatherBuilder deletes its finisher if there are no subs,
only set its finisher when subs are present. This way we can still
call ->complete() for the callback.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: make aio_writes to the cache always non-blocking by default
Josh Durgin [Wed, 13 Mar 2013 16:42:43 +0000 (09:42 -0700)]
librbd: make aio_writes to the cache always non-blocking by default

When the ObjectCacher's writex blocks, it affects the thread requesting
the aio, which can cause starvation for other I/O when used by QEMU.

Preserve the old behavior via a config option in case this has any
bad side-effects, like too much memory usage under heavy write loads.

Fixes: #4091
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: optionally make writex always non-blocking
Josh Durgin [Wed, 13 Mar 2013 16:37:21 +0000 (09:37 -0700)]
ObjectCacher: optionally make writex always non-blocking

Add a callback argument to writex, and a finisher to run the
callbacks. Move the check for dirty+tx > max_dirty into a helper that
can be called from a wrapper around the callbacks from writex, or from
the current place in _wait_for_write().

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge pull request #167 from dmick/master
Dan Mick [Thu, 28 Mar 2013 17:32:50 +0000 (10:32 -0700)]
Merge pull request #167 from dmick/master

Reviewed-by: Alex Elder <elder@inktank.com>
12 years agorados: remove confusing argument echo on error 167/head
Dan Mick [Thu, 28 Mar 2013 17:10:26 +0000 (10:10 -0700)]
rados: remove confusing argument echo on error

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge pull request #163 from ceph/wip-rbd-snapset-cache
Sage Weil [Thu, 28 Mar 2013 14:33:50 +0000 (07:33 -0700)]
Merge pull request #163 from ceph/wip-rbd-snapset-cache

librbd: flush cache when set_snap() is called

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw_json_enc.cc: use static_cast instead of C-Style cast 164/head
Danny Al-Gaaf [Thu, 28 Mar 2013 12:24:33 +0000 (13:24 +0100)]
rgw_json_enc.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove double checks from get_cmd()
Danny Al-Gaaf [Thu, 28 Mar 2013 12:22:02 +0000 (13:22 +0100)]
rgw/rgw_admin.cc: remove double checks from get_cmd()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agounit test LFNIndex::lfn_get_name
Loic Dachary [Wed, 27 Mar 2013 20:02:57 +0000 (16:02 -0400)]
unit test LFNIndex::lfn_get_name

The escape logic is tested for

  * leading . => \.
  * / => \s
  * \ => \\
  * leading DIR_ => \d

The file names for small object names ( size < FILENAME_PREFIX_LEN )
are created with CEPH_NOSNAP and checked to contain the _head string
and not the _long string.

The file names for long object names ( size >= FILENAME_PREFIX_LEN )
are tested to contain the _long string. A matching file is created to
check that it is removed unless it contains the expected extended
attribute.

If the SHA1 of two long object names collide and they have the same
prefix, lfn_get_name increments an anticollision counter to
differentiate them. This condition is engineered because it would be
really difficult to find two long names that actually create such a
collision.

The lfn_get_name method is private and the get_mangled_name method is
used to access it. The out_path argument is not available and cannot
be tested. However it is a trivial concatenation of the stringsin the
path vector.

A TestIndex class is derived from the LFNIndex class to set the pure
virtual functions. The TestLFNIndex fixture is derived from it so that
the tests get access to the protected methods of LFNIndex

The SetUp method of the fixture creates a PATH directory to be used by
all tests as the base path for all object files.

http://tracker.ceph.com/issues/4560 refs #4560

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agolibrados.h: fix comment describing rados_pool_list
Dan Mick [Thu, 28 Mar 2013 07:17:00 +0000 (00:17 -0700)]
librados.h: fix comment describing rados_pool_list

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agolibrbd: flush cache when set_snap() is called 163/head
Josh Durgin [Thu, 28 Mar 2013 00:30:42 +0000 (17:30 -0700)]
librbd: flush cache when set_snap() is called

If there are writes pending, they should be sent while the image
is still writeable. If the image becomes read-only, flushing the
cache will just mark everything dirty again due to -EROFS.

Fixes: #4525
Backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoradosgw-admin: fix help clitest
Sage Weil [Thu, 28 Mar 2013 04:35:49 +0000 (21:35 -0700)]
radosgw-admin: fix help clitest

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 28 Mar 2013 04:27:16 +0000 (21:27 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoMerge pull request #159 from ceph/wip-4564
Sage Weil [Thu, 28 Mar 2013 04:20:50 +0000 (21:20 -0700)]
Merge pull request #159 from ceph/wip-4564

mds: Delay session close if in clientreplay

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: MonitorDBStore: add 'get_iterator()' method to iterate over a prefix
Joao Eduardo Luis [Sat, 2 Mar 2013 12:23:57 +0000 (12:23 +0000)]
mon: MonitorDBStore: add 'get_iterator()' method to iterate over a prefix

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoceph-disk: reimplement list_all_partitions
Sage Weil [Thu, 28 Mar 2013 01:44:32 +0000 (18:44 -0700)]
ceph-disk: reimplement list_all_partitions

Use /dev/disk/by-id to list disks and their partitions.  This is more
accurate and correct than the previous (as-yet unused) implementation.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk: reimplement is_partition
Sage Weil [Thu, 28 Mar 2013 01:43:59 +0000 (18:43 -0700)]
ceph-disk: reimplement is_partition

Previously we were assuming any device that ended in a digit was a
partition, but this is not at all correct (e.g., /dev/sr0, /dev/rbd1).
Instead, look in /dev/disk/by-id and see if there is a symlink that ends in
-partNN that links to our device.

There is probably still a better way...

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Updated usage.
John Wilkins [Thu, 28 Mar 2013 00:13:18 +0000 (17:13 -0700)]
doc: Updated usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Updated usage.
John Wilkins [Wed, 27 Mar 2013 23:50:26 +0000 (16:50 -0700)]
doc: Updated usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoceph-disk: conditionally remove mount path
Sage Weil [Wed, 27 Mar 2013 19:45:29 +0000 (12:45 -0700)]
ceph-disk: conditionally remove mount path

umount removes it on success; only remove it here if it is still there.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk: ignore udevadm settle return code
Sage Weil [Wed, 27 Mar 2013 00:04:14 +0000 (17:04 -0700)]
ceph-disk: ignore udevadm settle return code

If we time out, just continue and let the next step fail.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: try udevadm settle if osd journal isn't present
Sage Weil [Tue, 26 Mar 2013 23:04:54 +0000 (16:04 -0700)]
upstart: try udevadm settle if osd journal isn't present

Wait briefly for the journal to appear if it isn't there yet, then give up.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-4556'
Sage Weil [Wed, 27 Mar 2013 20:21:24 +0000 (13:21 -0700)]
Merge remote-tracking branch 'gh/wip-4556'

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: disallow classes with flags==0
Sage Weil [Wed, 27 Mar 2013 20:19:03 +0000 (13:19 -0700)]
osd: disallow classes with flags==0

They must be RD, WR, or something....

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: EINVAL when rmw_flags is 0
Sage Weil [Wed, 27 Mar 2013 19:59:41 +0000 (12:59 -0700)]
osd: EINVAL when rmw_flags is 0

A broken client (e.g., v0.56) can send a request that ends up with an
rmw_flags of 0.  Treat this as invalid and return EINVAL.

Fixes: #4556
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix detection of non-existent class method
Sage Weil [Wed, 27 Mar 2013 20:08:38 +0000 (13:08 -0700)]
osd: fix detection of non-existent class method

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #141 from ceph/wip-rgw-zone-config
Sage Weil [Wed, 27 Mar 2013 20:04:50 +0000 (13:04 -0700)]
Merge pull request #141 from ceph/wip-rgw-zone-config

Wip rgw zone config

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoOSD fails to start with error assert(values.size() == 2)
David Zafman [Wed, 27 Mar 2013 18:06:07 +0000 (11:06 -0700)]
OSD fails to start with error assert(values.size() == 2)

Remove redundant setting of dirty_info
Fix PG::upgrade() to conform to programming style
Set dirty_big_info in PG::write_info for upgrades

BUG: #4562

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoMerge pull request #148 from dachary/wip-4542
athanatos [Wed, 27 Mar 2013 18:00:14 +0000 (11:00 -0700)]
Merge pull request #148 from dachary/wip-4542

fix append to uninitialized buffer in FlatIndex::created

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge pull request #153 from dalgaaf/wip-da-java
Joe Buck [Wed, 27 Mar 2013 17:08:24 +0000 (10:08 -0700)]
Merge pull request #153 from dalgaaf/wip-da-java

Fix some small java issues

12 years agoMerge pull request #160 from alram/master
Sage Weil [Wed, 27 Mar 2013 16:59:50 +0000 (09:59 -0700)]
Merge pull request #160 from alram/master

Fix radosgw upstart job

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoFix radosgw upstart job 160/head
Alexandre Marangone [Wed, 27 Mar 2013 16:31:07 +0000 (09:31 -0700)]
Fix radosgw upstart job

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
12 years agoMerge pull request #158 from alram/master
Sage Weil [Wed, 27 Mar 2013 16:18:49 +0000 (09:18 -0700)]
Merge pull request #158 from alram/master

Change ceph apt recipe to repo in doc

12 years agomds: Delay session close if in clientreplay 159/head
Sam Lang [Wed, 27 Mar 2013 15:58:25 +0000 (10:58 -0500)]
mds: Delay session close if in clientreplay

If the mds is in clientreplay, a session close
request needs to be delayed until it reaches
active.  Otherwise, the session state gets set to
'closing', and the replay requests get dropped on the
floor.

Fixes #4564.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoChange ceph::apt -> ceph::repo in doc 158/head
Alexandre Marangone [Wed, 27 Mar 2013 16:01:01 +0000 (09:01 -0700)]
Change ceph::apt -> ceph::repo in doc

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
12 years agoMerge pull request #156 from dalgaaf/wip-da-fix-mkcephfs
Sage Weil [Wed, 27 Mar 2013 15:52:41 +0000 (08:52 -0700)]
Merge pull request #156 from dalgaaf/wip-da-fix-mkcephfs

Fix issues in mkcephfs

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomkcephfs.in: use 32 chars for mktemp to be more unique 156/head
Danny Al-Gaaf [Wed, 27 Mar 2013 15:50:12 +0000 (16:50 +0100)]
mkcephfs.in: use 32 chars for mktemp to be more unique

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge pull request #152 from dalgaaf/wip-da-fix-misc
Sage Weil [Wed, 27 Mar 2013 15:28:49 +0000 (08:28 -0700)]
Merge pull request #152 from dalgaaf/wip-da-fix-misc

MDS.cc: remove double is_clientreplay() check in active_start()

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #157 from ceph/wip-4539
Sage Weil [Wed, 27 Mar 2013 15:26:25 +0000 (08:26 -0700)]
Merge pull request #157 from ceph/wip-4539

mds: Clear backtrace updates on standby_trim_seg

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomkcephfs.in: cleanup rdir in MON case
Danny Al-Gaaf [Wed, 27 Mar 2013 15:03:20 +0000 (16:03 +0100)]
mkcephfs.in: cleanup rdir in MON case

Remove $rdir in MON case of 'mkcephfs -a' as soon as it's no
longer needed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomkcephfs.in: provide a valid rdir for MONs on -a
Danny Al-Gaaf [Wed, 27 Mar 2013 14:55:56 +0000 (15:55 +0100)]
mkcephfs.in: provide a valid rdir for MONs on -a

Provide also a valid rdir for ssh as in case of OSD/MDS hosts if
mkcephfs -a is called.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomkcephfs.in: use mktemp instead of dd+md5sum+awk
Danny Al-Gaaf [Wed, 27 Mar 2013 14:40:58 +0000 (15:40 +0100)]
mkcephfs.in: use mktemp instead of dd+md5sum+awk

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds: Clear backtrace updates on standby_trim_seg 155/head 157/head
Sam Lang [Wed, 27 Mar 2013 14:35:08 +0000 (09:35 -0500)]
mds: Clear backtrace updates on standby_trim_seg

If the mds is standby, when a segment is trimmed, we need
to clear the backtrace updates list to avoid the following
assertion when the segment is deleted.

./include/elist.h: 92: FAILED assert(_head.empty())
ceph version 0.59-478-g8befbca (8befbca77aa50a1188969892aabedaf11d8f8ce7)
(MDLog::standby_trim_segments()+0xce5) [0x6ccec5]
(MDS::C_MDS_StandbyReplayRestartFinish::finish(int)+0x39) [0x4e86b9]
(Journaler::_finish_reprobe(int, unsigned long, Context*)+0x190)
[0x6d3210]
(Filer::_probed(Filer::Probe*, object_t const&, unsigned long,
utime_t)+0x558) [0x704a88]
(Objecter::C_Stat::finish(int)+0xc0) [0x705900]
(Objecter::handle_osd_op_reply(MOSDOpReply*)+0xe38) [0x6f1df8]
(MDS::handle_core_message(Message*)+0xae8) [0x4dc318]
(MDS::_dispatch(Message*)+0x2f) [0x4dc4df]
(MDS::ms_dispatch(Message*)+0x1db) [0x4ddf7b]
(DispatchQueue::entry()+0x341) [0x81f561]
(DispatchQueue::DispatchThread::entry()+0xd) [0x79c6ad]
(()+0x7e9a) [0x7f346bb9ee9a]
(clone()+0x6d) [0x7f346a3574bd]

Fixes #4539.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoceph_common.sh: fix typo in comment
Danny Al-Gaaf [Wed, 27 Mar 2013 13:37:49 +0000 (14:37 +0100)]
ceph_common.sh: fix typo in comment

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agojava libcephfs: add serialVersionUID to some Exception classes 153/head
Danny Al-Gaaf [Wed, 27 Mar 2013 11:38:03 +0000 (12:38 +0100)]
java libcephfs: add serialVersionUID to some Exception classes

Fix for: "The serializable class does not declare a static final
serialVersionUID field" warning.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoCephMount.java: remove unused import
Danny Al-Gaaf [Wed, 27 Mar 2013 11:37:34 +0000 (12:37 +0100)]
CephMount.java: remove unused import

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMDS.cc: remove double is_clientreplay() check in active_start() 152/head
Danny Al-Gaaf [Wed, 27 Mar 2013 10:05:11 +0000 (11:05 +0100)]
MDS.cc: remove double is_clientreplay() check in active_start()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon: fix crush_ops.sh tests
Sage Weil [Wed, 27 Mar 2013 05:47:11 +0000 (22:47 -0700)]
mon: fix crush_ops.sh tests

Make it work.  Also, make note that these aren't handled idempotently by
the mon currently.  Doh!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 27 Mar 2013 01:19:27 +0000 (18:19 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoReplicatedPG: send entire stats on OP_BACKFILL_FINISH
Samuel Just [Tue, 26 Mar 2013 22:10:37 +0000 (15:10 -0700)]
ReplicatedPG: send entire stats on OP_BACKFILL_FINISH

Otherwise, we update the stat.stat structure, but not the
stat.invalid_stats part.  This will result in a recently
split primary propogating the invalid stats but not the
invalid marker.  Sending the whole pg_stat_t structure
also mirrors MOSDSubOp.

Fixes: #4557
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 27 Mar 2013 00:05:48 +0000 (17:05 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agotesting: fix hadoop-internal-test
Joe Buck [Tue, 26 Mar 2013 21:17:14 +0000 (14:17 -0700)]
testing: fix hadoop-internal-test

Remove now superfluous directory changes
that are causing tests to fail.
This code should have been removed when we transitioned
from running tests with Ant to using Java to run the tests.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge pull request #149 from ceph/wip-4530
Sage Weil [Tue, 26 Mar 2013 22:13:24 +0000 (15:13 -0700)]
Merge pull request #149 from ceph/wip-4530

#4530

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #139 from ceph/wip-topo-java
Joe Buck [Tue, 26 Mar 2013 22:09:19 +0000 (15:09 -0700)]
Merge pull request #139 from ceph/wip-topo-java

Merging in Noah's branch for adding topology calls. This passes existing libcephfs, libcephfs-java and hadoop tests.

12 years agoclient: Don't signal requests already handled 149/head
Sam Lang [Mon, 25 Mar 2013 19:55:20 +0000 (14:55 -0500)]
client: Don't signal requests already handled

The assertion failure reported in #4530 is triggered
by the following:

1. client sends request
2. mds sends unsafe reply
3. before request gets journaled, mds is killed
4. mds restarts
5. client receives session close (from close request before restart)
6. session close does kick_requests()
7. kick_requests tries to signal caller that doesn't exist.

This fix avoids signaling a caller if the unsafe reply
has been received and the make_request() function has completed.
We do this by setting the caller_cond to null once the caller
is woken up, and only signal the caller in kick_requests if
caller_cond is non-null.  This avoids trying to resend requests
listed in mds_request but that have already received unsafe replies.
The unsafe requests are handled by resend_unsafe_requests() code,
so skipping those requests is allowable.

Fixes #4530.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agofix append to uninitialized buffer in FlatIndex::created 148/head
Loic Dachary [Mon, 25 Mar 2013 17:40:32 +0000 (13:40 -0400)]
fix append to uninitialized buffer in FlatIndex::created

The long_name variable is not initialized. When the append_oname
function is called, it will strlen(long_name) and get a result
that depends on the stack content. The long_name is truncated to a
zero length string to prevent this unexpected behavior.

There is no sure way to trigger the problem by writing a unit
test. Unit tests are added for all public methods of the FlatIndex
class. Most of the time the tests fail if the long_name variable is
not properly initialized.

 * uint32_t collection_version()
 * coll_t coll() const
 * void set_ref(std::tr1::shared_ptr<CollectionIndex> ref)
 * int cleanup()
 * int init()
 * int created(const hobject_t &hoid, const char *path)
 * int unlink(const hobject_t &hoid)
 * int lookup(const hobject_t &hoid, IndexedPath *path, int *exist)
 * int collection_list(vector<hobject_t> *ls)
 * int collection_list_partial(const hobject_t &start, int min_count, int max_count, snapid_t seq, vector<hobject_t> *ls, hobject_t *next)

There are a number of border cases that cannot be tested, such as the
logic of the lfn_get static function. Since FlatIndex code is designed
to transition from older namespace conventions, it is difficult to
figure out.

The tests rely on xattr(2) and their availability is checked before
running them.

http://tracker.ceph.com/issues/4542 refs #4542

Signed-off-by: Loic Dachary <loic@dachary.org>