]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoradosgw-admin: add --quota-scope param to usage 707/head
Yehuda Sadeh [Mon, 14 Oct 2013 17:26:49 +0000 (10:26 -0700)]
radosgw-admin: add --quota-scope param to usage

and also look at it when setting quota on a bucket.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: switch out param to a pointer instead of reference
Yehuda Sadeh [Sat, 12 Oct 2013 00:21:21 +0000 (17:21 -0700)]
rgw: switch out param to a pointer instead of reference

following code review

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agotest: update cli test for radosgw-admin
Yehuda Sadeh [Sat, 12 Oct 2013 00:08:06 +0000 (17:08 -0700)]
test: update cli test for radosgw-admin

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: clarify --max-size param
Yehuda Sadeh [Sat, 12 Oct 2013 00:07:38 +0000 (17:07 -0700)]
radosgw-admin: clarify --max-size param

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoformatter: dump_bool dumps unquoted strings
Yehuda Sadeh [Fri, 11 Oct 2013 23:56:46 +0000 (16:56 -0700)]
formatter: dump_bool dumps unquoted strings

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw_quoa.{h,cc}: add copyright notice
Yehuda Sadeh [Fri, 11 Oct 2013 23:43:00 +0000 (16:43 -0700)]
rgw_quoa.{h,cc}: add copyright notice

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: limit user bucket-level quota
Yehuda Sadeh [Fri, 11 Oct 2013 04:04:39 +0000 (21:04 -0700)]
radosgw-admin: limit user bucket-level quota

We only allow it if --quota-scope=bucket is specified. This is done in
order to avoid confusion with the future user level quota command.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: can set user's bucket quota
Yehuda Sadeh [Thu, 10 Oct 2013 21:45:46 +0000 (14:45 -0700)]
radosgw-admin: can set user's bucket quota

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: bucket quota threshold
Yehuda Sadeh [Thu, 10 Oct 2013 17:50:39 +0000 (10:50 -0700)]
rgw: bucket quota threshold

Add bucket quota threshold so that when we're passed that value we
reread the bucket stats before every write and not rely on cached value.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: configurable bucket quota size
Yehuda Sadeh [Tue, 8 Oct 2013 21:32:37 +0000 (14:32 -0700)]
rgw: configurable bucket quota size

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: protect against concurrent async quota updates
Yehuda Sadeh [Tue, 8 Oct 2013 21:05:59 +0000 (14:05 -0700)]
rgw: protect against concurrent async quota updates

Leverage the cache lru_map locking for making sure that we don't end
up with more than a single concurrent async update on the same bucket
within the same update window.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: async quota update
Yehuda Sadeh [Tue, 8 Oct 2013 03:22:51 +0000 (20:22 -0700)]
rgw: async quota update

Asynchronously update bucket stats when a period passed, but bucket
stats are within the ttl window.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: rearrange includes
Yehuda Sadeh [Tue, 8 Oct 2013 18:20:56 +0000 (11:20 -0700)]
rgw: rearrange includes

Need to have ceph_json.h first due to some boost weirdness.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: update cache atomically
Yehuda Sadeh [Fri, 4 Oct 2013 17:36:41 +0000 (10:36 -0700)]
rgw: update cache atomically

Use new lru_map::find_and_update() to update internal cache state.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agolru_map: add find_and_update()
Yehuda Sadeh [Fri, 4 Oct 2013 17:36:13 +0000 (10:36 -0700)]
lru_map: add find_and_update()

A new find_and_update() call to make atomic changes.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: init RGWBucketStats
Yehuda Sadeh [Wed, 2 Oct 2013 23:34:40 +0000 (16:34 -0700)]
rgw: init RGWBucketStats

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: handle negative quota as non-assigned values
Yehuda Sadeh [Wed, 2 Oct 2013 23:29:23 +0000 (16:29 -0700)]
rgw: handle negative quota as non-assigned values

This means that we can have a 0 as a quota value.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoradosgw-admin: quota control api
Yehuda Sadeh [Wed, 2 Oct 2013 23:09:07 +0000 (16:09 -0700)]
radosgw-admin: quota control api

Can set, disable and enable bucket quota.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: dump quota params even if disabled
Yehuda Sadeh [Wed, 2 Oct 2013 23:08:49 +0000 (16:08 -0700)]
rgw: dump quota params even if disabled

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: bucket stats also dump quota info
Yehuda Sadeh [Wed, 2 Oct 2013 22:35:43 +0000 (15:35 -0700)]
rgw: bucket stats also dump quota info

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: init quota
Yehuda Sadeh [Wed, 2 Oct 2013 21:50:57 +0000 (14:50 -0700)]
rgw: init quota

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: update quota stats when needed
Yehuda Sadeh [Wed, 2 Oct 2013 21:37:53 +0000 (14:37 -0700)]
rgw: update quota stats when needed

Now update the quota stats when completing specific operations.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: also check quota before starting write
Yehuda Sadeh [Tue, 1 Oct 2013 20:37:56 +0000 (13:37 -0700)]
rgw: also check quota before starting write

In that case we only do it if it's not chunked upload (for which we
don't have the content length).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: check quota before completing write op
Yehuda Sadeh [Tue, 1 Oct 2013 20:32:28 +0000 (13:32 -0700)]
rgw: check quota before completing write op

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: fix qutoa check
Yehuda Sadeh [Tue, 1 Oct 2013 20:32:08 +0000 (13:32 -0700)]
rgw: fix qutoa check

size is in kb

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: higher level quota check functionality
Yehuda Sadeh [Tue, 1 Oct 2013 18:45:03 +0000 (11:45 -0700)]
rgw: higher level quota check functionality

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: more quota implementation
Yehuda Sadeh [Fri, 27 Sep 2013 23:43:10 +0000 (16:43 -0700)]
rgw: more quota implementation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: add bucket quota config to entities
Yehuda Sadeh [Fri, 27 Sep 2013 21:51:43 +0000 (14:51 -0700)]
rgw: add bucket quota config to entities

Add bucket quota fields to various entities: regionmap (for global
configuration), user info, bucket info.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoFormatter: add dump_bool()
Yehuda Sadeh [Fri, 27 Sep 2013 20:15:35 +0000 (13:15 -0700)]
Formatter: add dump_bool()

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: more quota utility stuff
Yehuda Sadeh [Fri, 27 Sep 2013 17:41:14 +0000 (10:41 -0700)]
rgw: more quota utility stuff

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: quota utility class
Yehuda Sadeh [Thu, 26 Sep 2013 20:24:48 +0000 (13:24 -0700)]
rgw: quota utility class

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #618 from dachary/wip-jerasure-minimum-to-decode
Sage Weil [Mon, 23 Sep 2013 17:53:54 +0000 (10:53 -0700)]
Merge pull request #618 from dachary/wip-jerasure-minimum-to-decode

ErasureCode: minimum_to_decode unit tests and optimization

Reviewed-by: Sage Weil <sage@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 agoErasureCode: minimum_to_decode unit tests and optimization 618/head
Loic Dachary [Sun, 22 Sep 2013 08:58:23 +0000 (10:58 +0200)]
ErasureCode: minimum_to_decode unit tests and optimization

The minimum_to_decode function simply returns the available chunks if no
recovery is necessary.

Add unit tests covering all minimum_to_decode situations:

* trying to read nothing
* read a chunk if none are available
* reading a subset of the available chunks
* read a missing chunk if there is less than k chunks available.
* reading when a chunk must be recovered

Signed-off-by: Loic Dachary <loic@dachary.org>
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>