]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoos/ObjectStore: Interim collection_list* functions in ObjectStore
David Zafman [Mon, 23 Sep 2013 20:02:16 +0000 (13:02 -0700)]
os/ObjectStore: Interim collection_list* functions in ObjectStore

Handle ghobject_t to hobject_t conv of collection_list* funcs
Temporary code so that this branch doesn't break master

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Cleanup init()/read_superblock()
David Zafman [Wed, 18 Sep 2013 01:14:16 +0000 (18:14 -0700)]
osd: Cleanup init()/read_superblock()

Fix error handling in init()
Cleanup read_superblock() by moving unrelated code into init()
Move init() feature upgrade right after compatibility checking
Remove redundant whoami check

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agocommon, os, osd, test, tools: FileStore must work with ghobjects rather than hobjects
David Zafman [Fri, 20 Sep 2013 01:54:36 +0000 (18:54 -0700)]
common, os, osd, test, tools: FileStore must work with ghobjects rather than hobjects

Add ghobject_t to hboject.h header
Add constants NO_SHARD/NO_GEN and change gen_t/shard_t
Convert other headers from hobject_t to ghobject_t
Mostly straight hobject_t to ghobject_t for src/os cc files
Fix tools and tests and enable ceph-dencoder
Add filename generation and parsing including unittest addition
Get ceph-filestore-dump to build
Add gen/shard to DBObjectMap::ghobject_key() and update test case
Add CEPH_FS_FEATURE_INCOMPAT_SHARDS new FileStore feature
Add CEPH_OSD_FEATURE_INCOMPAT_SHARDS new osd feature

Fixes: #5862
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoinclude, test: Add CompatSet::merge() operation
David Zafman [Wed, 18 Sep 2013 00:04:54 +0000 (17:04 -0700)]
include, test: Add CompatSet::merge() operation

New func merge() adds missing features from specified CompatSet
Add merge testing to unittest

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoos, osd, tools: Add backportable compatibility checking for sharded objects
David Zafman [Wed, 25 Sep 2013 16:19:16 +0000 (09:19 -0700)]
os, osd, tools: Add backportable compatibility checking for sharded objects

OSD
  New CEPH_OSD_FEATURE_INCOMPAT_SHARDS
FileStore
  NEW CEPH_FS_FEATURE_INCOMPAT_SHARDS
  Add FSSuperblock with feature CompatSet in it
  Store sharded_objects state using CompatSet
  Add set_allow_sharded_objects() and get_allow_sharded_objects() to FileStore/ObjectStore
  Add read_superblock()/write_superblock() internal filestore functions
ceph_filestore_dump
  Add OSDsuperblock to export format
  Use CompatSet from OSD code itself in filestore-dump tool
  Always check compatibility of OSD features with on-disk features
  On import verify compatibility of on-disk features with export data
  Bump super_ver due to export format change

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: read_superblock() not outputing unsupported features when incompatible
David Zafman [Tue, 17 Sep 2013 21:59:15 +0000 (14:59 -0700)]
osd: read_superblock() not outputing unsupported features when incompatible

Use working version of CompatSet::unsupported() to improve log output

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agotest: Adding unittest for CompatSet
David Zafman [Wed, 18 Sep 2013 19:42:32 +0000 (12:42 -0700)]
test: Adding unittest for CompatSet

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoinclude: Bug fixes for CompatSet
David Zafman [Tue, 17 Sep 2013 20:39:57 +0000 (13:39 -0700)]
include: Bug fixes for CompatSet

FeatureSet insert/remove
  Use 64-bit arithmetic to allow features past 31
  Allow feature 63 by fixing assert in insert
CompatSet::unsupported() bugs
  Ignore feature 0 which became illegal
  Use 64-bit arithmetic when computing mask
  Use id in insert() and to get correct feature name
  Use the right map to get name for diff.ro_compat

Caused by 80979bbe92409e6f098566e18be6ed59ad9d111a
Caused by 470796b5456592ee5179bbd44b72910a2d7f6aca

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoos: Fix version_stamp_is_valid() and write_version_stamp() error return
David Zafman [Sat, 14 Sep 2013 01:04:29 +0000 (18:04 -0700)]
os: Fix version_stamp_is_valid() and write_version_stamp() error return

Caused by 341fb208aa32117f58ed4ce623f4b152f64ac72e

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoos, ceph_osd: Rename on_disk_version to target_version
David Zafman [Sat, 31 Aug 2013 00:33:37 +0000 (17:33 -0700)]
os, ceph_osd: Rename on_disk_version to target_version

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoos: Prior version bump should have updated this
David Zafman [Thu, 29 Aug 2013 23:47:58 +0000 (16:47 -0700)]
os: Prior version bump should have updated this

Version available as argument, so use instead of constant

Caused by dab238b0fb76b76a8843f4e59319b0f0e4f966a2

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoos: Code conformance of os/LFNIndex.cc
David Zafman [Fri, 23 Aug 2013 00:17:25 +0000 (17:17 -0700)]
os: Code conformance of os/LFNIndex.cc

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoos: Fix typo in comment
David Zafman [Tue, 20 Aug 2013 19:39:24 +0000 (12:39 -0700)]
os: Fix typo in comment

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agocommon: Fix get_namespace() definition in hobject_t
David Zafman [Tue, 20 Aug 2013 19:24:40 +0000 (12:24 -0700)]
common: Fix get_namespace() definition in hobject_t

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Add assert() on collection_getattr() failure instead of later decode crash
David Zafman [Tue, 3 Sep 2013 20:35:50 +0000 (13:35 -0700)]
osd: Add assert() on collection_getattr() failure instead of later decode crash

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agotools: Fix ceph_filestore_dump usage again
David Zafman [Fri, 13 Sep 2013 02:19:55 +0000 (19:19 -0700)]
tools: Fix ceph_filestore_dump usage again

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge pull request #605 from dachary/wip-erasure-code-plugin-test
Sage Weil [Mon, 23 Sep 2013 17:27:47 +0000 (10:27 -0700)]
Merge pull request #605 from dachary/wip-erasure-code-plugin-test

erasure code plugin test

11 years agoMerge pull request #603 from dachary/wip-erasure-code-example
Sage Weil [Mon, 23 Sep 2013 17:26:48 +0000 (10:26 -0700)]
Merge pull request #603 from dachary/wip-erasure-code-example

erasure code example cleanup

11 years agoMerge pull request #607 from ceph/prctl-getname-test
Sage Weil [Mon, 23 Sep 2013 17:14:07 +0000 (10:14 -0700)]
Merge pull request #607 from ceph/prctl-getname-test

code_env: use feature test for PR_GET_NAME support

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #616 from ceph/automake-flags
Sage Weil [Mon, 23 Sep 2013 17:12:16 +0000 (10:12 -0700)]
Merge pull request #616 from ceph/automake-flags

automake: fixup am_common_flags to avoid re-definitions

Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMerge pull request #614 from ceph/wip-rados-model
Gregory Farnum [Mon, 23 Sep 2013 16:55:32 +0000 (09:55 -0700)]
Merge pull request #614 from ceph/wip-rados-model

Prevent copy_from against yourself, and fix issues with the testing framework around it

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Mon, 23 Sep 2013 16:50:10 +0000 (09:50 -0700)]
Merge remote-tracking branch 'gh/next'

11 years agodoc: When bootstrapping mon set the correct caps for client.admin
Wido den Hollander [Mon, 23 Sep 2013 11:51:26 +0000 (13:51 +0200)]
doc: When bootstrapping mon set the correct caps for client.admin

Otherwise client.admin will be privilege-less and the admin can't
access the cluster.

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 #612 from ceph/wip-6361
João Eduardo Luís [Sat, 21 Sep 2013 11:40:55 +0000 (04:40 -0700)]
Merge pull request #612 from ceph/wip-6361

perfglue/heapprofiler: expect cmd name when handling command instead of 'heap <cmd>'

This was broken by the cli rework.

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoceph_test_rados: fix COPY_FROM completion 614/head
Sage Weil [Sat, 21 Sep 2013 04:06:09 +0000 (21:06 -0700)]
ceph_test_rados: fix COPY_FROM completion

Fix the copy_from operation to not remove the objects from the in_use list
until after the entire operation is complete.  In particular, the racing
read was completing and removing the dest oid from the in-use list before
the copy-from completed.  This keeps the model in sync with what the OSD
is actually doing.

If another new read started up, it would grab the previous value from the
model and expect to see that, but would instead see the updated value.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: fix seq_num, improve error output
Sage Weil [Sat, 21 Sep 2013 03:49:55 +0000 (20:49 -0700)]
ceph_test_rados: fix seq_num, improve error output

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: limit max_in_flight to objects/2
Sage Weil [Sat, 21 Sep 2013 03:44:36 +0000 (20:44 -0700)]
ceph_test_rados: limit max_in_flight to objects/2

In particular, we need to allow all in-flight ops to be COPY_FROM.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: do not COPY_FROM self
Sage Weil [Sat, 21 Sep 2013 03:43:12 +0000 (20:43 -0700)]
ceph_test_rados: do not COPY_FROM self

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: handle COPY_FROM self
Sage Weil [Sat, 21 Sep 2013 03:43:00 +0000 (20:43 -0700)]
osd/ReplicatedPG: handle COPY_FROM self

Return EINVAL if we try to COPY_FROM ourselves.

Signed-off-by: Sage Weil <sage@inktank.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 agomon: fix wrong arg to "instructed to" status message
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>
(cherry picked from commit 16ebb25f7cdb8e92c618a333c505c16edb16c95c)

11 years agorgw: destroy get_obj handle in copy_obj()
Yehuda Sadeh [Mon, 16 Sep 2013 21:35:25 +0000 (14:35 -0700)]
rgw: destroy get_obj handle in copy_obj()

Fixes: #6176
Backport: dumpling
We take different code paths in copy_obj, make sure we close the handle
when we exit the function. Move the call to finish_get_obj() out of
copy_obj_data() as we don't create the handle there, so that should
makes code less confusing and less prone to errors.
Also, note that RGWRados::get_obj() also calls finish_get_obj(). For
everything to work in concert we need to pass a pointer to the handle
and not the handle itself. Therefore we needed to also change the call
to copy_obj_data().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@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 agoqa: workunits: cephtool: check if 'heap' commands are parseable 612/head
Joao Eduardo Luis [Fri, 20 Sep 2013 16:06:30 +0000 (17:06 +0100)]
qa: workunits: cephtool: check if 'heap' commands are parseable

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
11 years agoosd: OSD: add 'heap' command to known osd commands array
Joao Eduardo Luis [Fri, 20 Sep 2013 16:50:27 +0000 (17:50 +0100)]
osd: OSD: add 'heap' command to known osd commands array

Must have been forgotten during the cli rework.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
11 years agomds: MDS: pass only heap profiler commands instead of the whole cmd vector
Joao Eduardo Luis [Fri, 20 Sep 2013 15:43:27 +0000 (16:43 +0100)]
mds: MDS: pass only heap profiler commands instead of the whole cmd vector

The heap profiler doesn't care, nor should it, what our command name is.
It only cares about the commands it handles.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
11 years agoperfglue/heap_profiler.cc: expect args as first element on cmd vector
Joao Eduardo Luis [Fri, 20 Sep 2013 15:41:14 +0000 (16:41 +0100)]
perfglue/heap_profiler.cc: expect args as first element on cmd vector

We used to pass 'heap' as the first element of the cmd vector when
handling commands.  We haven't been doing so for a while now, so we
needed to fix this.

Not expecting 'heap' also makes sense, considering that what we need to
know when we reach this function is what command we should handle, and
we should not care what the caller calls us when handling his business.

Fixes: #6361
Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.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 agolru_map: don't use list::size()
Yehuda Sadeh [Thu, 12 Sep 2013 21:32:17 +0000 (14:32 -0700)]
lru_map: don't use list::size()

replace list::size() with map::size(), which should have
a constant time complexity.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocommon/lru_map: rename tokens to entries
Yehuda Sadeh [Thu, 12 Sep 2013 21:30:19 +0000 (14:30 -0700)]
common/lru_map: rename tokens to entries

This code was originally used in a token cache, now
as a generic infrastructure rename token fields.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agobufferlist: don't use list::size()
Yehuda Sadeh [Thu, 12 Sep 2013 19:26:41 +0000 (12:26 -0700)]
bufferlist: don't use list::size()

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@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 agocode_env: use feature test for PR_GET_NAME support 607/head
Noah Watkins [Sun, 21 Jul 2013 01:41:39 +0000 (18:41 -0700)]
code_env: use feature test for PR_GET_NAME support

Function `get_process_name` has platform specific dependencies. Check
for Linux prctl function and correct command flag.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agorgw: use bufferlist::append() instead of bufferlist::push_back()
Yehuda Sadeh [Wed, 18 Sep 2013 17:37:21 +0000 (10:37 -0700)]
rgw: use bufferlist::append() instead of bufferlist::push_back()

push_back() expects char *, whereas append can append a single char.
Appending a NULL char to push_back is cast as a NULL pointer which is
bad.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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 agoErasureCode: complete plugin loader unit tests 605/head
Loic Dachary [Thu, 19 Sep 2013 07:28:14 +0000 (09:28 +0200)]
ErasureCode: complete plugin loader unit tests

* TestErasureCodePluginExample.cc is renamed to TestErasureCodePlugin.cc
  because it's not limited to the example which is really used to
  support tests rather than being tested.

* Bugous plugins are added to exhibit failures and enable the unit tests
  to check they are handled as expected

  ErasureCodePluginFailToInitialize : the entry point returns != 0
  ErasureCodePluginFailToRegister : the plugin registry is not updated
  ErasureCodePluginMissingEntryPoint : the shared library has no entry
  point

* It would be difficult to prove that the mutex protecting against
  multiple loads actually does what it is expected to because of the
  lack of thread introspection functions such as : tell me if this
  thread is waiting on this mutex. A simpler approach is chosen : create
  a thread that blocks forever when loading ( that's what the delay in
  the example plugin is for ) and then check that the lock has indeed
  been acquired. Since this mutex is merely about making sure that only
  one thread at a time runs this sequence of code, it's probably enough.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: plugin loading in progress flag
Loic Dachary [Thu, 19 Sep 2013 07:19:51 +0000 (09:19 +0200)]
ErasureCode: plugin loading in progress flag

The bool loading data member of ErasureCodePluginRegistry is
set to true when a plugin is being loaded, to provide an observable side
effect for test purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: improve API implementation example
Loic Dachary [Tue, 17 Sep 2013 08:50:58 +0000 (10:50 +0200)]
ErasureCode: improve API implementation example

* minimum_to_decode and minimum_to_decode_with_cost are replaced with
  meaningfull examples instead of placeholders

* encode and decode are commented and hard coded constants are replaced
  by defines for readability

* run against valgrind

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: proofread abstract API documentation
Loic Dachary [Mon, 16 Sep 2013 10:12:52 +0000 (12:12 +0200)]
ErasureCode: proofread abstract API documentation

* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
  possible the output arguments will just point to the input
  argument. This must be documented as any side effect on the input
  argument may modify the output argument

* Fix typos

* Fix may/could/must/should to better reflect what's mandatory and
  what's not.

* Reword the explanation of minimum_to_decode_with_cost to not suggest
  an implementation. This will need to be revisited anyway, when the
  semantic of the cost is defined.

* Explain chunk size constraints

Signed-off-by: Loic Dachary <loic@dachary.org>
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 agoErasureCode: improve API implementation example 603/head
Loic Dachary [Tue, 17 Sep 2013 08:50:58 +0000 (10:50 +0200)]
ErasureCode: improve API implementation example

* minimum_to_decode and minimum_to_decode_with_cost are replaced with
  meaningfull examples instead of placeholders

* encode and decode are commented and hard coded constants are replaced
  by defines for readability

* run against valgrind

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: proofread abstract API documentation
Loic Dachary [Mon, 16 Sep 2013 10:12:52 +0000 (12:12 +0200)]
ErasureCode: proofread abstract API documentation

* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
  possible the output arguments will just point to the input
  argument. This must be documented as any side effect on the input
  argument may modify the output argument

* Fix typos

* Fix may/could/must/should to better reflect what's mandatory and
  what's not.

* Reword the explanation of minimum_to_decode_with_cost to not suggest
  an implementation. This will need to be revisited anyway, when the
  semantic of the cost is defined.

* Explain chunk size constraints

Signed-off-by: Loic Dachary <loic@dachary.org>
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>
12 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>
12 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>
12 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>
12 years agoMerge branch 'wip-6226'
David Zafman [Thu, 12 Sep 2013 18:13:50 +0000 (11:13 -0700)]
Merge branch 'wip-6226'

12 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>
12 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>