]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoautomake: add per-target AM_CPPFLAGS 616/head
Noah Watkins [Sat, 21 Sep 2013 17:41:15 +0000 (10:41 -0700)]
automake: add per-target AM_CPPFLAGS

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agomakefile-env: separate cppflags and cflags usage
Noah Watkins [Sat, 21 Sep 2013 17:18:24 +0000 (10:18 -0700)]
makefile-env: separate cppflags and cflags usage

AM_COMMON_FLAGS included both CPP and C[XX] flags. This can cause
re-definition errors like this:

make[4]: Nothing to be done for `all-am'.
CXX      cls/version/cls_version_client.o
<command-line>: warning: "__STDC_FORMAT_MACROS" redefined

because the macro definition appears in both AM_CXXFLAGS and
AM_CPPFLAGS.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #592 from ceph/wip-6287
Dan Mick [Fri, 20 Sep 2013 22:44:34 +0000 (15:44 -0700)]
Merge pull request #592 from ceph/wip-6287

mon/OSDMonitor: make busy creating pgs message more explicit

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #608 from dachary/wip-6357
Dan Mick [Fri, 20 Sep 2013 22:41:09 +0000 (15:41 -0700)]
Merge pull request #608 from dachary/wip-6357

mon: fix inverted test in osd pool create

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #613 from ceph/wip-6356
John Wilkins [Fri, 20 Sep 2013 20:08:06 +0000 (13:08 -0700)]
Merge pull request #613 from ceph/wip-6356

note that ceph-deploy should not be called with sudo on certain situations

11 years agonote that ceph-deploy should not be called with sudo on certain situations 613/head
Alfredo Deza [Fri, 20 Sep 2013 20:02:28 +0000 (16:02 -0400)]
note that ceph-deploy should not be called with sudo on certain situations

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
11 years agoFileStore: only remove the omap entries if nlink == 1
Samuel Just [Fri, 20 Sep 2013 02:51:46 +0000 (19:51 -0700)]
FileStore: only remove the omap entries if nlink == 1

Fixes: #6359
Introduced in 17c5d765d7c7573f875f6b3ba66e3b6813110a06
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #590 from ceph/wip-6284
Sage Weil [Fri, 20 Sep 2013 15:46:29 +0000 (08:46 -0700)]
Merge pull request #590 from ceph/wip-6284

osdc/ObjectCacher: finish contexts after dropping object reference

Tested: ubuntu@teuthology:/a/sage-2013-09-19_19:40:56-fs-wip-6284-testing-basic-plana
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMakefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw
Sage Weil [Fri, 20 Sep 2013 04:03:36 +0000 (21:03 -0700)]
Makefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw

They belong next to the class.  Also, if rgw isn't built, ceph-dencoder
will fail to link.

Fixes: #6352
Tested-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #609 from dmick/wip-6293
David Zafman [Fri, 20 Sep 2013 01:06:27 +0000 (18:06 -0700)]
Merge pull request #609 from dmick/wip-6293

mon: fix wrong arg to "instructed to" status message

Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agomon: fix wrong arg to "instructed to" status message 609/head
Dan Mick [Thu, 19 Sep 2013 23:04:16 +0000 (16:04 -0700)]
mon: fix wrong arg to "instructed to" status message

Fixes: #6293
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agomon: fix inverted test in osd pool create 608/head
Loic Dachary [Wed, 11 Sep 2013 20:52:20 +0000 (22:52 +0200)]
mon: fix inverted test in osd pool create

When using the properties key=value only, the test was inverted
and an attempt to obtain a substring at index string::npos throws
an exception.

Add variations of osd pool create to qa/workunits/mon/pool_ops.sh
to assert the problem has been fixed and all code paths are used.

http://tracker.ceph.com/issues/6357 fixes #6357

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #604 from ceph/wip-buck-centos-core
Gary Lowell [Thu, 19 Sep 2013 20:01:00 +0000 (13:01 -0700)]
Merge pull request #604 from ceph/wip-buck-centos-core

Wip buck centos core
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
11 years agoMakefile: fix unittest_arch
Sage Weil [Thu, 19 Sep 2013 19:08:45 +0000 (12:08 -0700)]
Makefile: fix unittest_arch

Also broken by makefile refactor.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMakefile: fix unittest_crc32c
Sage Weil [Thu, 19 Sep 2013 15:47:09 +0000 (08:47 -0700)]
Makefile: fix unittest_crc32c

This got dropped during the makefile refactor.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/FileStore: fix uninitialized var
Sage Weil [Thu, 19 Sep 2013 03:25:09 +0000 (20:25 -0700)]
os/FileStore: fix uninitialized var

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/ObjectCacher: finish contexts after dropping object reference 590/head
Yan, Zheng [Thu, 12 Sep 2013 02:36:39 +0000 (10:36 +0800)]
osdc/ObjectCacher: finish contexts after dropping object reference

The context to finish can be class C_Client_PutInode, which may drop
inode's last reference. So we should first drop object's reference,
then finish contexts.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agodoc/release-notes: v0.69
Sage Weil [Wed, 18 Sep 2013 19:31:42 +0000 (12:31 -0700)]
doc/release-notes: v0.69

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'next'
Gary Lowell [Wed, 18 Sep 2013 09:11:02 +0000 (09:11 +0000)]
Merge branch 'next'

11 years agov0.69 v0.69
Gary Lowell [Wed, 18 Sep 2013 01:40:51 +0000 (01:40 +0000)]
v0.69

11 years agoMerge pull request #586 from ceph/wip-copyfrom-big
Gregory Farnum [Tue, 17 Sep 2013 18:14:26 +0000 (11:14 -0700)]
Merge pull request #586 from ceph/wip-copyfrom-big

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoceph_test_rados: identify write seq_num in output 586/head
Sage Weil [Wed, 11 Sep 2013 22:57:00 +0000 (15:57 -0700)]
ceph_test_rados: identify write seq_num in output

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolibrados: test copy_from without src_version specified
Sage Weil [Wed, 11 Sep 2013 17:27:49 +0000 (10:27 -0700)]
librados: test copy_from without src_version specified

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: allow a copy_from without knowing the src_version
Sage Weil [Wed, 11 Sep 2013 22:11:35 +0000 (15:11 -0700)]
osd: allow a copy_from without knowing the src_version

If we don't specify the version up front, learn the version after the first
chunk and enforce it thereafter to ensure we do not get torn content.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: submit a racing read with every COPY_FROM
Sage Weil [Tue, 10 Sep 2013 23:30:25 +0000 (16:30 -0700)]
ceph_test_rados: submit a racing read with every COPY_FROM

Verify that the racing read completes after the COPY_FROM does (i.e., is
blocked by it).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: use get_version64() throughout
Sage Weil [Tue, 10 Sep 2013 23:29:48 +0000 (16:29 -0700)]
ceph_test_rados: use get_version64() throughout

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: block requests on object during COPY_FROM
Sage Weil [Wed, 11 Sep 2013 22:09:59 +0000 (15:09 -0700)]
osd: block requests on object during COPY_FROM

Block any request on an object (read or write) during the COPY_FROM
operation.

This could potentially be broken down into read vs write operations without
much difficulty, but blocking any op indescriminately is sufficient for
now, so let's keep it simple.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add infrastructure to block io on an obc
Sage Weil [Wed, 11 Sep 2013 22:10:47 +0000 (15:10 -0700)]
osd: add infrastructure to block io on an obc

Add an is_blocked() method for the obc, and add infrastructure to block
any operations if it returns true.  Clean up on_change(), and add a helper
to kick an obc when whatever condition leading to it being blocked is no
longer true.

For now, is_blocked() is always false...

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: factor some bits into finish_copy
Sage Weil [Mon, 9 Sep 2013 19:47:03 +0000 (12:47 -0700)]
osd/ReplicatedPG: factor some bits into finish_copy

This is a bit cleaner and hopefully more usable for osd-driven cache
promotion.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: more readable output
Sage Weil [Thu, 5 Sep 2013 23:09:13 +0000 (16:09 -0700)]
ceph_test_rados: more readable output

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: stage object chunks to replicas during COPY_FROM
Sage Weil [Thu, 5 Sep 2013 00:09:52 +0000 (17:09 -0700)]
osd/ReplicatedPG: stage object chunks to replicas during COPY_FROM

As we get each chunk of data during the COPY_FROM operation, write it out
to a temporary object on the replicas.  When we get all the pieces, move
it into place.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc: Replaced code-block with inline literal to fix auto numbering.
John Wilkins [Tue, 17 Sep 2013 17:39:24 +0000 (10:39 -0700)]
doc: Replaced code-block with inline literal to fix auto numbering.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Made s3gw.fcgi paths consistent.
John Wilkins [Tue, 17 Sep 2013 17:34:47 +0000 (10:34 -0700)]
doc: Made s3gw.fcgi paths consistent.

fixes: #6182

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoosd: compute full ratio from kb_avail
Alexandre Oliva [Tue, 17 Sep 2013 07:23:32 +0000 (04:23 -0300)]
osd: compute full ratio from kb_avail

On btrfs, kb_used + kb_avail can be much smaller than total kb, and
what really matters to avoid filling up the disk is how much space is
available, not how much we've used.  Thus, compute the ratio we use to
determine full or nearfull from kb_avail rather than from kb_used.

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoRemove unneeded junit4 check 604/head
Joe Buck [Mon, 16 Sep 2013 23:37:58 +0000 (16:37 -0700)]
Remove unneeded junit4 check

We refactored the java tests to not use
the ExternalResource class, so this test
is no longer necessary.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
11 years agoRemoving extraneous code
Joe Buck [Sat, 14 Sep 2013 00:41:31 +0000 (17:41 -0700)]
Removing extraneous code

The ExternalResource code was unnecessary and caused
issues on CentOS. Removing it.
Update Makefile.am to reflect the fact that
an anonymous class was removed and its
$1.class file is no longer generated.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
11 years agoUse a loop for testing jdk paths
Joe Buck [Thu, 12 Sep 2013 20:14:28 +0000 (13:14 -0700)]
Use a loop for testing jdk paths

Loop through a list of sensible default
locations for a JDK, stopping if a
workable JDK is found.
Also, add support for CentOS' default
java location.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
11 years agoMerge pull request #601 from pipul/feature/develop_130917
Josh Durgin [Tue, 17 Sep 2013 04:06:32 +0000 (21:06 -0700)]
Merge pull request #601 from pipul/feature/develop_130917

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agofix some comments 601/head
fangdong [Tue, 17 Sep 2013 02:34:10 +0000 (10:34 +0800)]
fix some comments

Signed-off-by: fangdong <yp.fangdong@gmail.com>
11 years agodoc: Updated usage.
John Wilkins [Tue, 17 Sep 2013 01:57:46 +0000 (18:57 -0700)]
doc: Updated usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Removed --fs-type option and text.
John Wilkins [Tue, 17 Sep 2013 01:40:07 +0000 (18:40 -0700)]
doc: Removed --fs-type option and text.

fixes: #6326

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Updated the usage scenario and made a few syntax edits.
John Wilkins [Tue, 17 Sep 2013 01:38:55 +0000 (18:38 -0700)]
doc: Updated the usage scenario and made a few syntax edits.

fixes: #6308

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #600 from dachary/fix-erasure-warning
Gregory Farnum [Mon, 16 Sep 2013 21:14:19 +0000 (14:14 -0700)]
Merge pull request #600 from dachary/fix-erasure-warning

ErasureCode: fix uninitialized variable warning
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoErasureCode: fix uninitialized variable warning 600/head
Loic Dachary [Mon, 16 Sep 2013 21:04:23 +0000 (23:04 +0200)]
ErasureCode: fix uninitialized variable warning

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #597 from ceph/remove-hadoop-shim
Gregory Farnum [Mon, 16 Sep 2013 20:57:47 +0000 (13:57 -0700)]
Merge pull request #597 from ceph/remove-hadoop-shim

This branch built fine on the gitbuilders and the list of removed files looks good to me.

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #538 from dachary/wip-5879
athanatos [Sat, 14 Sep 2013 01:09:43 +0000 (18:09 -0700)]
Merge pull request #538 from dachary/wip-5879

jerasure-1.2A plugin

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agorgw: try to create log pool if doesn't exist
Yehuda Sadeh [Fri, 13 Sep 2013 21:43:54 +0000 (14:43 -0700)]
rgw: try to create log pool if doesn't exist

When using replica log, if the log pool doesn't exist all operations are
going to fail. Try to create it if doesn't exist.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agohadoop: remove hadoop shim 597/head
Noah Watkins [Fri, 13 Sep 2013 20:21:58 +0000 (13:21 -0700)]
hadoop: remove hadoop shim

The in-tree Hadoop shim was a combination of libcephfs wrapper, and the
bits to support Hadoop. This has been replaced by src/java that
implements generic libcephfs wrappers, and externally, the hadoop shim
(see docs).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agorgw: NULL terminate buffer before parsing it
Yehuda Sadeh [Wed, 11 Sep 2013 20:46:31 +0000 (13:46 -0700)]
rgw: NULL terminate buffer before parsing it

Fixes: #6175
Backport: dumpling
We get a buffer off the remote gateway which might
not be NULL terminated. The JSON parser needs the
buffer to be NULL terminated even though we provide
a buffer length as it calls strlen().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #594 from ceph/fix-no-tcmalloc-build
Sage Weil [Fri, 13 Sep 2013 15:57:16 +0000 (08:57 -0700)]
Merge pull request #594 from ceph/fix-no-tcmalloc-build

make: add tmalloc lib dep in tcmalloc guard

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomake: add tmalloc lib dep in tcmalloc guard 594/head
Noah Watkins [Fri, 13 Sep 2013 15:29:02 +0000 (08:29 -0700)]
make: add tmalloc lib dep in tcmalloc guard

Fixes --without-tcmalloc on boxes without libtcmalloc.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge branch 'wip-6226'
David Zafman [Thu, 12 Sep 2013 18:13:50 +0000 (11:13 -0700)]
Merge branch 'wip-6226'

11 years agoosd/ReplicatedPG.cc: Verify that recovery is truly complete
David Zafman [Wed, 11 Sep 2013 23:56:21 +0000 (16:56 -0700)]
osd/ReplicatedPG.cc: Verify that recovery is truly complete

Backportable change to insure that even if no new ops started or
are running that indeed recovery is complete.  Prevents some
error condition or unforseen code path from crashing an osd.

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active
David Zafman [Wed, 11 Sep 2013 23:55:06 +0000 (16:55 -0700)]
osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active

Caused by 944f3b73531af791c90f0f061280160003545c63

Fixes: #6291
Backport: dumpling

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #589 from ceph/wip-6279
Gregory Farnum [Thu, 12 Sep 2013 17:38:41 +0000 (10:38 -0700)]
Merge pull request #589 from ceph/wip-6279

mon/MDSMonitor: don't reset incarnation when creating newfs
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agomon/OSDMonitor: make busy creating pgs message more explicit 592/head
Sage Weil [Thu, 12 Sep 2013 14:20:02 +0000 (07:20 -0700)]
mon/OSDMonitor: make busy creating pgs message more explicit

Fixes: #6287
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/MDSMonitor: don't reset incarnation when creating newfs 589/head
Yan, Zheng [Thu, 12 Sep 2013 01:50:51 +0000 (09:50 +0800)]
mon/MDSMonitor: don't reset incarnation when creating newfs

Fixes: #6279
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agorgw: don't call list::size() in ObjectCache
Yehuda Sadeh [Thu, 12 Sep 2013 05:30:12 +0000 (22:30 -0700)]
rgw: don't call list::size() in ObjectCache

Fixes: #6286
Use an external counter instead of calling list::size()

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: drain pending requests before completing write
Yehuda Sadeh [Tue, 10 Sep 2013 19:18:55 +0000 (12:18 -0700)]
rgw: drain pending requests before completing write

Fixes: #6268
When doing aio write of objects (either regular or multipart parts) we
need to drain pending aio requests. Otherwise if gateway goes down then
object might end up corrupted.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoosd/ReplicatedPG: allow RepGathers with no version
Sage Weil [Thu, 5 Sep 2013 00:08:48 +0000 (17:08 -0700)]
osd/ReplicatedPG: allow RepGathers with no version

If the repop has no version set, skip the updates to last_update and
last_update_{applied,ondisk} and last_complete_ondisk.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: flag new/old temp objects in MOSDSubOp
Sage Weil [Thu, 5 Sep 2013 00:07:19 +0000 (17:07 -0700)]
osd: flag new/old temp objects in MOSDSubOp

Allow us to mark when we start and stop using a temporary object in a
sub_op.  If we start to use it, make sure the collection exists on the
replica.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: drop unused issue_repop() arguments
Sage Weil [Wed, 4 Sep 2013 23:13:13 +0000 (16:13 -0700)]
osd/ReplicatedPG: drop unused issue_repop() arguments

These are cruft from the old parallelexec mode and can be removed.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: drop dead code from parallelexec issue_repop
Sage Weil [Wed, 4 Sep 2013 23:12:44 +0000 (16:12 -0700)]
osd/ReplicatedPG: drop dead code from parallelexec issue_repop

This is unused and references otherwise unused variables we can remove!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: generate one-off unique temp object names
Sage Weil [Tue, 3 Sep 2013 22:41:14 +0000 (15:41 -0700)]
osd/ReplicatedPG: generate one-off unique temp object names

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: move coll_t::META_COLL definition
Sage Weil [Tue, 3 Sep 2013 22:23:50 +0000 (15:23 -0700)]
osd/osd_types: move coll_t::META_COLL definition

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/FileStore: implement collection_move_rename
Sage Weil [Tue, 3 Sep 2013 22:13:40 +0000 (15:13 -0700)]
os/FileStore: implement collection_move_rename

This is similar to a collection_add + collection_move sequence in that we
apply the same replay guards.  The difference is that we roll it up into
a single operation, change the filename, and make the omap content carry
over by calling DBObjectMap->clone (as there is no rename function or
collection awareness in the DBObjectMap).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/ObjectStore: add collection_move_rename
Sage Weil [Wed, 11 Sep 2013 22:09:14 +0000 (15:09 -0700)]
os/ObjectStore: add collection_move_rename

Add method to move an object between collections *and* change its name.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #587 from kri5/master
Yehuda Sadeh [Wed, 11 Sep 2013 16:01:18 +0000 (09:01 -0700)]
Merge pull request #587 from kri5/master

rgw-admin: Adds --metadata-key option to help

Reviwed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw-admin: Adds --metadata-key option to help 587/head
Christophe Courtaut [Wed, 11 Sep 2013 15:49:04 +0000 (17:49 +0200)]
rgw-admin: Adds --metadata-key option to help
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agorgw: when failing read from client, return correct error
Yehuda Sadeh [Tue, 3 Sep 2013 20:27:21 +0000 (13:27 -0700)]
rgw: when failing read from client, return correct error

Fixes: #6214
When getting a failed read from client when putting an object
we returned the wrong value (always 0), which in the chunked-
upload case ended up in assuming that the write was done
successfully.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd: bind objecter messenger to cluster address
Greg Farnum [Tue, 10 Sep 2013 23:14:41 +0000 (16:14 -0700)]
osd: bind objecter messenger to cluster address

We don't want it binding to whatever willy-nilly, and as an OSD even
its "client" traffic should go on the cluster address.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd: name the objecter's messenger "ms_objecter" instead of "hbclient"
Greg Farnum [Tue, 10 Sep 2013 22:00:18 +0000 (15:00 -0700)]
osd: name the objecter's messenger "ms_objecter" instead of "hbclient"

Bad copypasta on initial create?

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoObjecter: rename cancel_op -> cancel_linger_op
Greg Farnum [Tue, 10 Sep 2013 21:59:09 +0000 (14:59 -0700)]
Objecter: rename cancel_op -> cancel_linger_op

This makes it possible to converse about op_cancel and cancel_linger_op
without getting too confused.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #580 from ceph/wip-6033-redirects
Gregory Farnum [Tue, 10 Sep 2013 22:49:50 +0000 (15:49 -0700)]
Merge pull request #580 from ceph/wip-6033-redirects

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest: update cache test since OSDs support redirects 580/head
Greg Farnum [Wed, 4 Sep 2013 20:44:47 +0000 (13:44 -0700)]
test: update cache test since OSDs support redirects

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: implement basic caching policies in ReplicatedPG
Greg Farnum [Mon, 9 Sep 2013 18:19:37 +0000 (11:19 -0700)]
osd: implement basic caching policies in ReplicatedPG

Right now these are very basic and aren't as sophisticated as we
want them to end up, but we have a skeleton for where to put the
decision-making logic.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: follow redirect replies from the OSD
Greg Farnum [Tue, 3 Sep 2013 23:42:33 +0000 (16:42 -0700)]
Objecter: follow redirect replies from the OSD

If we get back a redirect reply, we clean up the Op's external references
and re-send using the target_oloc and target_oid. To facilitate this,
recalc_op_target() now only fills them in and overrides them with pool
cache semantics if they're empty.

Keep in mind that this is a pretty simple redirect formula -- the
Objecter will keep following redirects forever if that's what the OSDs
send back. The client is not providing any synchronization right now.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: write a helper function to clean up ops that need to be retried
Greg Farnum [Tue, 3 Sep 2013 23:31:50 +0000 (16:31 -0700)]
Objecter: write a helper function to clean up ops that need to be retried

We have a little block to clean them up if we get back EAGAIN, but it's
actually leaking map references; we will also use this for redirects
from the OSDs.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMOSDOpReply: add a redirect member
Greg Farnum [Tue, 3 Sep 2013 21:59:59 +0000 (14:59 -0700)]
MOSDOpReply: add a redirect member

When present, clients must send the request to the location specified
by the redirect (by using the combine_with_locator() function on
request_redirect_t).
A separate mechanism must be used to ensure that clients see and respect
the redirect, as we do not bump up the minimum required version to
decode.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: add an Op::target_oid, and use it when submitting Ops
Greg Farnum [Tue, 3 Sep 2013 21:42:14 +0000 (14:42 -0700)]
Objecter: add an Op::target_oid, and use it when submitting Ops

For now it's just a copy of base_oid, but soon we will allow it
to be overwritten for OSD-driven redirects.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: rename Op::oid -> Op::base_oid
Greg Farnum [Tue, 3 Sep 2013 21:41:18 +0000 (14:41 -0700)]
Objecter: rename Op::oid -> Op::base_oid

Analagous to the oloc->base_oloc rename we did in
e2fcad09d94d965867147627b73e99da9454436f, we may specify a different
target name for a redirect. Rename the existing oid to base_oid to
avoid any confusion.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: create a new request_redirect_t
Greg Farnum [Tue, 3 Sep 2013 21:34:46 +0000 (14:34 -0700)]
osd: create a new request_redirect_t

We'll use this so that the OSD can tell the Objecter to redirect a
request to a different object somewhere else.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #585 from ceph/wip-osd-pool-create-syntax
Sage Weil [Tue, 10 Sep 2013 22:04:42 +0000 (15:04 -0700)]
Merge pull request #585 from ceph/wip-osd-pool-create-syntax

fix ceph tool (syntax error in command specification prevents anything from working)

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: fix syntax error in osd pool create args 585/head
Josh Durgin [Tue, 10 Sep 2013 21:47:31 +0000 (14:47 -0700)]
mon: fix syntax error in osd pool create args

Just missing a space between pgp_num and properties specification.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #584 from dachary/master
Sage Weil [Tue, 10 Sep 2013 16:17:25 +0000 (09:17 -0700)]
Merge pull request #584 from dachary/master

autoconf: use $(UNITTEST_CXXFLAGS) in tests

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #578 from dachary/wip-6113
Sage Weil [Tue, 10 Sep 2013 16:15:42 +0000 (09:15 -0700)]
Merge pull request #578 from dachary/wip-6113

mon: add key[=value] ... to osd pool create

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoautoconf: use $(UNITTEST_CXXFLAGS) in tests 584/head
Loic Dachary [Tue, 10 Sep 2013 15:00:08 +0000 (17:00 +0200)]
autoconf: use $(UNITTEST_CXXFLAGS) in tests

As suggested by Roald van Loon
https://github.com/ceph/ceph/pull/538/files#r6260751

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: plugin 538/head
Loic Dachary [Wed, 28 Aug 2013 16:48:40 +0000 (18:48 +0200)]
ErasureCodeJerasure: plugin

Create the class matching the string found in the
erasure-code-technique parameter, using the same strings are the
original {encoder,decoder}.c examples from Jerasure-1.2A. Registers
the plugin in ErasureCodePluginRegistry.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique Liber8tion
Loic Dachary [Thu, 29 Aug 2013 13:12:32 +0000 (15:12 +0200)]
ErasureCodeJerasure: define technique Liber8tion

technique == "liber8tion"

       ErasureCodeInterface (abstract)
       |
       -> ErasureCodeJerasure (abstract)
          |
          -> ErasureCodeJerasureLiberation
             |
             -> ErasureCodeJerasureLiber8tion
                | == liber8tion

Derived from Liberation it overloads the parse and prepare methods.

parse : default to K=2 and packetsize = 8.
If any of the following constraints is not satisfied, revert to the
default:

  * K <= 8
  * packetsize must not be zero

prepare uses liber8tion_coding_bitmatrix

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique BlaumRoth
Loic Dachary [Thu, 29 Aug 2013 13:07:30 +0000 (15:07 +0200)]
ErasureCodeJerasure: define technique BlaumRoth

technique == "blaum_roth"

       ErasureCodeInterface (abstract)
       |
       -> ErasureCodeJerasure (abstract)
          |
          -> ErasureCodeJerasureLiberation
             |
             -> ErasureCodeJerasureBlaumRoth
                | == blaum_roth

Derived from Liberation it only overloads the prepare method to use
blaum_roth_coding_bitmatrix.

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique Liberation
Loic Dachary [Thu, 29 Aug 2013 13:00:20 +0000 (15:00 +0200)]
ErasureCodeJerasure: define technique Liberation

technique == "liberation"

parse : default to K=7, M=2 and W=7 and packetsize = 8.
If any of the following constraints is not satisfied, revert to the
default:

 * K > W
 * W > 2
 * W is a prime number
 * packetsize must not be zero
 * packetsize must be a multiple of sizeof(int)

pad_in_length : pad to a multiple of k*w*packetsize*sizeof(int)

prepare, jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define techniques CauchyOrig and CauchyGood
Loic Dachary [Mon, 9 Sep 2013 23:40:02 +0000 (01:40 +0200)]
ErasureCodeJerasure: define techniques CauchyOrig and CauchyGood

The technique Cauchy has two variants:

       ErasureCodeInterface (abstract)
       |
       -> ErasureCodeJerasure (abstract)
          |
          -> ErasureCodeJerasureCauchy (abstract)
          |  |
          |  -> ErasureCodeJerasureCauchyOrig
          |     | == cauchy_orig
          |  -> ErasureCodeJerasureCauchyGood
          |     | == cauchy_good

ErasureCodeJerasureCauchy defines the prepare_schedule method to be used
by prepare method, which is the only one overloaded by
ErasureCodeJerasureCauchyOrig (calling cauchy_original_coding_matrix)
and ErasureCodeJerasureCauchyGood ( calling
cauchy_good_general_coding_matrix).

The schedule is retained for encoding and the bitmatrix for decoding.

parse : default to K=7, M=3, W=8 and packetsize = 8.

pad_in_length : pad to a multiple of k*w*packetsize*sizeof(int)

jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique ReedSolomonRAID6
Loic Dachary [Thu, 29 Aug 2013 12:42:39 +0000 (14:42 +0200)]
ErasureCodeJerasure: define technique ReedSolomonRAID6

technique == reed_sol_r6_op

parse : default to K=7 and W=8 . If W is not 8, 16 or 32, it
reverts to 8.

pad_in_length : pad to a multiple of k*w*sizeof(int)

prepare, jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: define technique ReedSolomonVandermonde
Loic Dachary [Thu, 29 Aug 2013 11:51:49 +0000 (13:51 +0200)]
ErasureCodeJerasure: define technique ReedSolomonVandermonde

technique == reed_sol_van

parse : default to K=7, M=3 and W=8 . If W is not 8, 16 or 32, it
reverts to 8.

pad_in_length : pad to a multiple of k*w*sizeof(int)

prepare, jerasure_encode, jerasure_decode map directly to the matching
jerasure functions

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCodeJerasure: unit test common to all techniques
Loic Dachary [Thu, 29 Aug 2013 11:31:10 +0000 (13:31 +0200)]
ErasureCodeJerasure: unit test common to all techniques

A typed unit test is defined and must run regardless of the technique.
When a new technique is derived from ErasureCodeJerasure, it is added
to the JerasureTypes typedef and the test will validate that:

  * it provides reasonable defaults for the technique specific
    parameters
  * it modifies the k, m and w to reasonable defaults depending
    on the imposed constraints ( for instance Liber8tion requires
    that w == 8 but the test sets it to 7 )
  * the encoding of K=2, M=2 produces 4 chunks, the first two
    of which contains the original buffer data showing the
    code is systematic
  * decoding when all 4 chunks are available indeed retrieves
    the original buffer content
  * decoding when the two data chunks are are missing indeed
    retrieves the original buffer content

https://github.com/dachary/ceph/tree/wip-5879 refs #5879

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add key[=value] ... to osd pool create 578/head
Loic Dachary [Mon, 9 Sep 2013 11:23:42 +0000 (13:23 +0200)]
mon: add key[=value] ... to osd pool create

With the introduction of the erasure code pool, arguments to be
interpreted depending on the pool type must be introduced.
For instance the erasure code pool loads a plugin at run time will
use easure-code-k=10 to split each object in 10.

The arguments are described as

  name=properties,type=CephString,n=N,req=false,goodchars=[A-Za-z0-9-_.=]

If key=value it is stored in the new properties data member of pg_pool_t
as properties[key] = value, otherwise the value is the empty string.

The pg_pool_t version is bumped to 10 and the encode/decode methods
modified to take the properties into account. The
generate_test_instances method creates a two entries map, one of which
is the empty string to cover the case when no value is specified.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocrushtool: do not dump core with non-unique bucket IDs
David Zafman [Mon, 9 Sep 2013 20:01:12 +0000 (13:01 -0700)]
crushtool: do not dump core with non-unique bucket IDs

Return -EEXIST on duplicate ID
BUG FIX: crush_add_bucket() mixes error returns and IDs
  Add optional argument to return generated ID

Fixes: #6246
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: v0.67.3
Sage Weil [Tue, 10 Sep 2013 04:47:57 +0000 (21:47 -0700)]
doc/release-notes: v0.67.3

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add empty() function to object_locator_t
Greg Farnum [Fri, 30 Aug 2013 01:33:07 +0000 (18:33 -0700)]
osd: add empty() function to object_locator_t

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMOSDOpReply: more const-correctness
Greg Farnum [Tue, 3 Sep 2013 21:52:05 +0000 (14:52 -0700)]
MOSDOpReply: more const-correctness

get_map_epoch() is a non-reference getter -- mark it as const!

Signed-off-by: Greg Farnum <greg@inktank.com>