Commit Graph

25128 Commits

Author SHA1 Message Date
Sage Weil
01b74209fb osd: clean up some whitespace
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:40 -07:00
Sage Weil
0074228911 osd: include SnapSet seq in the list snaps response
It is important to know the latest seq that the object has seen in order
to tell if a response like

 clone 2 snaps=[1,2]
 clone head snaps=[]

was untouched before a hypothetical snap 3, or deleted prior to snap 3,
and then recreated+modified after.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:40 -07:00
Sage Weil
fa5206ce9b osd: make LIST_WATCHERS and LIST_SNAPS print nicely for OSDOp
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:40 -07:00
Sage Weil
849a45c67f strings: add 'list-watchers' to MOSDOp strings
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-31 23:32:40 -07:00
Sage Weil
ce8793ce3b Merge pull request #175 from dachary/wip-4594
fix null character in object name triggering segfault

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-30 18:22:01 -07:00
Loic Dachary
c344ff170d fix null character in object name triggering segfault
Parsing \n in  lfn_parse_object_name is implemented with

  out->append('\0');

which segfaults when using libstdc++ and g++ version 4.6.3 on Debian
GNU/Linux. It is replaced with

  (*out) += '\0';

to avoid the bugous implicit conversion. There is no append(charT)
method in C++98 or C++11, which means it relies on an implicit
conversion that is bugous. It would be better to rely on the
basic_string& operator+=(charT c); method as defined in ISO 14882-1998
(page 385) thru ISO 14882-2012 (page 640)

A set of tests is added to generate and parse object names. They need
access to the private function lfn_parse_object_name because there is
no convenient protected method to exercise it. The tests contain a
LFNIndex derived class, TestWrapLFNIndex which is made a friend of
LFNIndex to gain access to the private methods.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-03-30 14:28:34 +01:00
Sage Weil
2b8eb31b85 Merge branch 'wip-4490' 2013-03-29 18:02:15 -07:00
Sage Weil
e611937f3e mon: OSDMonitor: add 'osd pool set-quota' command
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-29 17:59:35 -07:00
John Wilkins
95328089b8 doc: Added entries for Pool, PG, & CRUSH. Moved heartbeat link.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-29 17:38:48 -07:00
John Wilkins
bcc5c65305 doc: Added heartbeat configuration settings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-29 17:38:02 -07:00
John Wilkins
6157d68369 doc: Moved PG info to separate page. Moved heartbeat to mon-osd doc.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-29 17:36:23 -07:00
John Wilkins
ca77aabbf1 doc: Rewrote monitor configuration section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-29 17:34:45 -07:00
John Wilkins
ea3c833d0f doc: Moved to separate section for parallelism.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-29 17:32:47 -07:00
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
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
b504e444fc Merge remote branch 'origin/next' 2013-03-29 12:58:01 -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
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