Commit Graph

25267 Commits

Author SHA1 Message Date
John Wilkins
ba73b8301a doc: Cleanup.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-29 17:32:00 -07:00
Sage Weil
e9b3f2e6e9 ceph-disk list: say 'unknown cluster $UUID' when cluster is unknown
This makes it clearer that an old osd is in fact old.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-29 17:30:28 -07:00
Greg Farnum
9e7ddf677f config_opts: fix rgw_port comments to be plaintext
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-03-29 17:05:41 -07:00
Samuel Just
3da3129e07 ReplicatedPG: check for full if delta_stats.num_bytes > 0
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-29 16:47:29 -07:00
Joao Eduardo Luis
9b09073259 mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long()
We already do it all throughout the function, but this one place didn't.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-29 16:47:29 -07:00
Joao Eduardo Luis
e2a936d2ae common: util: add 'unit_to_bytesize()' function
Converts from a numerical value that may or may not contain an unit
modifier ('1024', '1K', '2M', ..., '1E') and returns the parsed size
in bytes.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-29 16:47:28 -07:00
Joao Eduardo Luis
23c2fa7fc2 osd: osd_types: add pool quota related fields 2013-03-29 16:03:21 -07:00
Samuel Just
655a950875 PG::_scan_list: record read errors in the Scrubmap::object
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-29 15:06:29 -07:00
Samuel Just
dab3dacfb7 osd_types: add read_error flag to Scrubmap::object
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-29 15:06:29 -07:00
Sage Weil
562e1716bd 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>
2013-03-29 13:59:04 -07:00
Josh Durgin
95c4a81be1 Merge pull request #170 from ceph/wip-rbd-aio-flush
Reviewed-by: Sage Weil <sage.weil@inktank.com>
2013-03-29 13:20:32 -07:00
Josh Durgin
b504e444fc Merge remote branch 'origin/next' 2013-03-29 12:58:01 -07:00
Josh Durgin
4c4d5591bd 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>
2013-03-29 12:47:17 -07:00
Sage Weil
43e451f6ee Merge pull request #166 from ceph/wip-disk-list
Wip disk list

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-03-29 12:24:47 -07:00
Yan, Zheng
3cbd0366b7 client: update cap->implemented when handling revoke
Fixes #4578

Tested-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-29 11:26:01 -07:00
athanatos
f9c3bba374 Merge pull request #161 from dachary/wip-4560
unit tests for LFNIndex
2013-03-29 10:50:55 -07:00
Greg Farnum
4f8ba0e775 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>
2013-03-29 10:42:04 -07:00
Sage Weil
f8682cb8a7 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>
2013-03-29 10:24:53 -07:00
Sage Weil
2fa16422f3 Merge pull request #171 from Elbandi/master
Run wrap-and-sort and add git to build deps

Reviewed-by: Sage Weil <sage@inkank.com>
2013-03-29 08:38:22 -07:00
Sage Weil
999b307af5 Merge pull request #172 from ceph/wip-ceph-json
Wip ceph json

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-29 08:37:04 -07:00
Andras Elso
2da57d7675 debian: Add git to Build-Depends (need by check_version script)
Signed-off-by: Andras Elso <elso.andras@gmail.com>
2013-03-29 13:34:54 +01:00
Andras Elso
8f5c665744 debian: Run wrap-and-sort from devscripts
Signed-off-by: Andras Elso <elso.andras@gmail.com>
2013-03-29 13:34:48 +01:00
Loic Dachary
972f0eb0ac 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>
2013-03-29 09:46:14 +01:00
Yehuda Sadeh
d15c152702 ceph_json: add missing include file
Needed for LONG_MAX and friends

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-29 00:25:50 -07:00
Yehuda Sadeh
9a07ee3784 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>
2013-03-29 00:25:45 -07:00
Sage Weil
6a65b9131c 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>
2013-03-28 20:49:24 -07:00
Gary Lowell
b98251633b 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>
2013-03-28 17:14:33 -07:00
Joao Eduardo Luis
a021ce6245 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>
2013-03-28 23:36:38 +00:00
Gary Lowell
e950ed07c3 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>
2013-03-28 16:12:33 -07:00
Joao Eduardo Luis
06a1e9c0ec 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 e91405d540)
2013-03-28 15:26:37 -07:00
Joao Eduardo Luis
e91405d540 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>
2013-03-28 14:55:23 -07:00
Sage Weil
807487c681 Merge pull request #168 from athanatos/wip_4471
Wip 4471

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-28 14:15:07 -07:00
Samuel Just
f804892d72 PG: update PGPool::name in PGPool::update
Fixes: #4471
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-28 14:09:21 -07:00
Samuel Just
1993c2a270 PG: use int64_t for pool id in PGPool
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-28 14:01:45 -07:00
Yehuda Sadeh
9a8ea420f7 Merge pull request #164 from dalgaaf/wip-da-fix-misc-1
some SCA related fixes
2013-03-28 13:01:51 -07:00
Samuel Just
91a8d93c91 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>
2013-03-28 11:56:49 -07:00
Josh Durgin
f1d1f11926 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
302b93c478 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
860493e7ff 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
2ae32068de 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
f06debef6c 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
7cc0940f89 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
fa271565ff 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
553aaac8a1 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>
2013-03-28 10:46:59 -07:00
Josh Durgin
41568b904d 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>
2013-03-28 10:46:58 -07:00
Josh Durgin
92db06c05d ObjectCacher: always complete flush_set() callback
This removes the last remnants of
b5e9995f59. 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>
2013-03-28 10:46:58 -07:00
Josh Durgin
03ac01fa6a 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>
2013-03-28 10:46:58 -07:00
Josh Durgin
c21250406e 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>
2013-03-28 10:46:58 -07:00
Dan Mick
4fafedc960 Merge pull request #167 from dmick/master
Reviewed-by: Alex Elder <elder@inktank.com>
2013-03-28 10:32:50 -07:00
Dan Mick
bf7cbdfe0e rados: remove confusing argument echo on error
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-03-28 10:10:26 -07:00