]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agocommon/bloom_filter: fix whitespace
Sage Weil [Fri, 20 Sep 2013 01:31:45 +0000 (18:31 -0700)]
common/bloom_filter: fix whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: test behavior of sequences of bloom filters
Sage Weil [Fri, 20 Sep 2013 01:23:07 +0000 (18:23 -0700)]
common/bloom_filter: test behavior of sequences of bloom filters

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: unit tests
Sage Weil [Fri, 20 Sep 2013 00:57:14 +0000 (17:57 -0700)]
common/bloom_filter: unit tests

Fun facts:

- fpp = false positive probability
- fpp is a function of insert count only
- at .1% fpp, we pay about 2 bytes per insert
- at 1-2% fpp, we pay about 1 byte per insert
- at 15% fpp, we pay about .5 bytes per insert

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: move header from include/
Sage Weil [Thu, 19 Sep 2013 03:40:57 +0000 (20:40 -0700)]
common/bloom_filter: move header from include/

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: make bloom_filter encodable
Sage Weil [Thu, 19 Sep 2013 03:07:01 +0000 (20:07 -0700)]
common/bloom_filter: make bloom_filter encodable

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: make optimal parameter calculation static
Sage Weil [Wed, 18 Sep 2013 21:50:05 +0000 (14:50 -0700)]
common/bloom_filter: make optimal parameter calculation static

We pass the ctor our target behavior and calculate parameters based on
that.  Avoid storing the target behavior, and make that calc a static
method.  And add a new ctor that takes the parameters explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: make mode match formatting
Sage Weil [Wed, 18 Sep 2013 21:33:12 +0000 (14:33 -0700)]
common/bloom_filter: make mode match formatting

3 space tabs.. blech.  Let's not change it now, though.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #640 from ceph/wip-mon-pgmap
Sage Weil [Wed, 25 Sep 2013 23:08:05 +0000 (16:08 -0700)]
Merge pull request #640 from ceph/wip-mon-pgmap

fix mon crash when osdmap and pgmap aren't yet synced

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon/PGMonitor: fix segfault when osdmap and pgmap stats are out of sync 640/head
Sage Weil [Wed, 25 Sep 2013 22:47:28 +0000 (15:47 -0700)]
mon/PGMonitor: fix segfault when osdmap and pgmap stats are out of sync

The leader mon is responsible for propagating changes in the osdmap
into the pgmap (e.g., when a pool or osd goes away).  If that hasn't
happened yet, the pg_map map will be out of sync with the current set
of pools.  We shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #637 from dachary/master
Sage Weil [Wed, 25 Sep 2013 22:39:22 +0000 (15:39 -0700)]
Merge pull request #637 from dachary/master

mailmap: add Matthew Roy, Matthew Wodrich

11 years agoMerge pull request #639 from ceph/wip-gtest
Sage Weil [Wed, 25 Sep 2013 22:39:01 +0000 (15:39 -0700)]
Merge pull request #639 from ceph/wip-gtest

Makefile: don't use srcdir in TESTS

Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMakefile: don't use srcdir in TESTS 639/head
Sage Weil [Wed, 25 Sep 2013 20:37:13 +0000 (13:37 -0700)]
Makefile: don't use srcdir in TESTS

src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/unittest_bufferlist.sh'
src/Makefile.am:1:   'src/Makefile-env.am' included from here
src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/test/encoding/check-generated.sh'
src/Makefile.am:1:   'src/Makefile-env.am' included from here

on my (raring) laptop.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomailmap: add Matthew Roy, Matthew Wodrich 637/head
Loic Dachary [Wed, 25 Sep 2013 17:46:27 +0000 (19:46 +0200)]
mailmap: add Matthew Roy, Matthew Wodrich

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #615 from dachary/wip-jerasure-copy
Sage Weil [Wed, 25 Sep 2013 16:31:58 +0000 (09:31 -0700)]
Merge pull request #615 from dachary/wip-jerasure-copy

ErasureCode: get rid of extra copy when encoding

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #634 from dachary/master
Sage Weil [Wed, 25 Sep 2013 16:23:48 +0000 (09:23 -0700)]
Merge pull request #634 from dachary/master

git: consolidate mails in commit logs

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #636 from dachary/wip-get_command_description
Sage Weil [Wed, 25 Sep 2013 16:23:21 +0000 (09:23 -0700)]
Merge pull request #636 from dachary/wip-get_command_description

autoconf: remove get_command_descriptions  dependency to gtest

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoErasureCode: get rid of extra copy when encoding 615/head
Loic Dachary [Sat, 21 Sep 2013 13:05:22 +0000 (15:05 +0200)]
ErasureCode: get rid of extra copy when encoding

The substr_of bufferlist method is used to reduce the copies to the
strict minimum. It is both able to split bufferptr when they are larger
than a chunk and to concatenate them when they are smaller.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoautoconf: remove get_command_descriptions dependency to gtest 636/head
Loic Dachary [Wed, 25 Sep 2013 10:51:28 +0000 (12:51 +0200)]
autoconf: remove get_command_descriptions  dependency to gtest

It is not required and a leftover of the time when it was a unit test
which was a mistake to begin with. It has been reported to create
dependencies problems in some cases, when gest is not available at the
time get_command_descriptions is compiled.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agogit: consolidate mails in commit logs 634/head
Loic Dachary [Tue, 24 Sep 2013 21:23:59 +0000 (23:23 +0200)]
git: consolidate mails in commit logs

Map duplicate mails / names in commit logs to a single canonical names.
Useful to report to management with git shortlog -nes

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 25 Sep 2013 04:46:47 +0000 (21:46 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/osd/ReplicatedPG.cc

11 years agoMerge pull request #633 from ceph/wip-repop-leaks
David Zafman [Tue, 24 Sep 2013 22:39:26 +0000 (15:39 -0700)]
Merge pull request #633 from ceph/wip-repop-leaks

fix a copule of leaks of RepGather structs

Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agodoc: Removed service ops language and added reference to operations.
John Wilkins [Tue, 24 Sep 2013 22:26:35 +0000 (15:26 -0700)]
doc: Removed service ops language and added reference to operations.

fixes: #6374

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agomon/OSDMonitor: fix 'ceph osd crush reweight ...'
Sage Weil [Tue, 24 Sep 2013 22:26:03 +0000 (15:26 -0700)]
mon/OSDMonitor: fix 'ceph osd crush reweight ...'

The adjust method returns a count of adjusted items.

Add a test.

Fixes: #6382
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #477 from jpfrancois/patch-1
Sage Weil [Tue, 24 Sep 2013 22:22:56 +0000 (15:22 -0700)]
Merge pull request #477 from jpfrancois/patch-1

Fix for Swift key command

11 years agoosd/ReplicatedPG: fix leak of RepGather on watch timeout 633/head
Sage Weil [Tue, 24 Sep 2013 20:49:59 +0000 (13:49 -0700)]
osd/ReplicatedPG: fix leak of RepGather on watch timeout

new_repop() gives us a ref; we need to release it, just as we do in
execute_ctx().

Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: fix leak of RepGather on large-object COPY_FROM
Sage Weil [Tue, 24 Sep 2013 20:48:43 +0000 (13:48 -0700)]
osd/ReplicatedPG: fix leak of RepGather on large-object COPY_FROM

new_repop() gives us a ref; we need to release it, just as we do in
execute_ctx().

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: change warn_interval_multiplier to uint32_t
Loic Dachary [Tue, 24 Sep 2013 17:04:23 +0000 (19:04 +0200)]
osd: change warn_interval_multiplier to uint32_t

to prevent overflow in OpTracker::check_ops_in_flight when
multiplying warn_interval_multiplier *= 2

Backport: cuttlefish, dumpling

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

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 1bce1f009bffd3e28025a08775fec189907a81db)

11 years agoMerge pull request #630 from dachary/master
Sage Weil [Tue, 24 Sep 2013 17:27:05 +0000 (10:27 -0700)]
Merge pull request #630 from dachary/master

osd: change warn_interval_multiplier to uint32_t

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoarch/intel: fix old comment
Sage Weil [Tue, 24 Sep 2013 17:18:44 +0000 (10:18 -0700)]
arch/intel: fix old comment

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoarch/intel: use intel probe instructions for x86_64 only
Sage Weil [Tue, 24 Sep 2013 17:17:37 +0000 (10:17 -0700)]
arch/intel: use intel probe instructions for x86_64 only

Not LP64, which includes ppc64 and clearly does not build.

Fixes: #6283
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosd: change warn_interval_multiplier to uint32_t 630/head
Loic Dachary [Tue, 24 Sep 2013 17:04:23 +0000 (19:04 +0200)]
osd: change warn_interval_multiplier to uint32_t

to prevent overflow in OpTracker::check_ops_in_flight when
multiplying warn_interval_multiplier *= 2

Backport: cuttlefish, dumpling

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

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #628 from dachary/wip-erasure-fix-thread-test
Sage Weil [Tue, 24 Sep 2013 15:42:49 +0000 (08:42 -0700)]
Merge pull request #628 from dachary/wip-erasure-fix-thread-test

ErasureCode: fix plugin loading threaded test

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #627 from dachary/master
Yehuda Sadeh [Tue, 24 Sep 2013 14:38:36 +0000 (07:38 -0700)]
Merge pull request #627 from dachary/master

rgw: fix rgw test to reflect usage change

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoErasureCode: fix plugin loading threaded test 628/head
Loic Dachary [Tue, 24 Sep 2013 13:51:08 +0000 (15:51 +0200)]
ErasureCode: fix plugin loading threaded test

The TEST_F(ErasureCodePluginRegistryTest, factory_mutex) was bugous and
only succeeded by chance. The sleep was on the factory constructor which
was never called. An erasure code plugin that hangs forever on load is
created instead.

The sleep_forever.detach is replaced by pthread_cancel to interrupt the
thread that hangs forever. If not, gtest will try to join the thread and
never exit.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agorgw: fix rgw test to reflect usage change 627/head
Loic Dachary [Tue, 24 Sep 2013 06:05:38 +0000 (08:05 +0200)]
rgw: fix rgw test to reflect usage change

otherwise src/test/cli/radosgw-admin/help.t fails when running make
check when run after a configure --with-radosgw

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #588 from dachary/wip-6274
Sage Weil [Mon, 23 Sep 2013 23:42:26 +0000 (16:42 -0700)]
Merge pull request #588 from dachary/wip-6274

mon: unit tests to protect against some MonCommands.h typos

11 years agoosd: revert 'osd max xattr size' limit
Sage Weil [Mon, 23 Sep 2013 23:23:33 +0000 (16:23 -0700)]
osd: revert 'osd max xattr size' limit

Set it to 0 (unlimited) for now.

Backport: dumpling

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #566 from ceph/wip-purge-stray
Sage Weil [Mon, 23 Sep 2013 23:16:48 +0000 (16:16 -0700)]
Merge pull request #566 from ceph/wip-purge-stray

Fixes for purging stray

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #591 from ceph/wip-misc
Gregory Farnum [Mon, 23 Sep 2013 22:48:04 +0000 (15:48 -0700)]
Merge pull request #591 from ceph/wip-misc

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge branch 'master' of github.com:ceph/ceph
Greg Farnum [Mon, 23 Sep 2013 22:41:14 +0000 (15:41 -0700)]
Merge branch 'master' of github.com:ceph/ceph

11 years agoMerge pull request #625 from ceph/wip-warn-pg
Sage Weil [Mon, 23 Sep 2013 22:40:14 +0000 (15:40 -0700)]
Merge pull request #625 from ceph/wip-warn-pg

mon: warn when pg_num is too low or appears out of whack wrt the cluster size

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agomds: be more careful about decoding LogEvents
Greg Farnum [Wed, 11 Sep 2013 23:24:32 +0000 (16:24 -0700)]
mds: be more careful about decoding LogEvents

We need to wrap the full decode section or we can abort the process
if there's an issue (which we may want to just skip by).

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #619 from dachary/wip-erasure-pad
Sage Weil [Mon, 23 Sep 2013 22:14:22 +0000 (15:14 -0700)]
Merge pull request #619 from dachary/wip-erasure-pad

ErasureCode: optimize padding calculation

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoErasureCode: optimize padding calculation 619/head
Loic Dachary [Mon, 23 Sep 2013 07:16:18 +0000 (09:16 +0200)]
ErasureCode: optimize padding calculation

Andreas-Joachim Peters pointed out that the ErasureCodeJerasure method
pad_in_length is very inefficient for no reason. It is replaced by the
alignment method and the calculation is inlined in the encode method.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agovstart: set 'mon pg min per osd' 625/head
Sage Weil [Sat, 21 Sep 2013 06:09:23 +0000 (23:09 -0700)]
vstart: set 'mon pg min per osd'

We need to tweak this since we create relatively few pgs per osd.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/PGMonitor: health warn if pool has relatively high objects/pg
Sage Weil [Sat, 21 Sep 2013 06:08:53 +0000 (23:08 -0700)]
mon/PGMonitor: health warn if pool has relatively high objects/pg

If there is a pool that has a high objects/pg relative to the rest of the
cluster, warn, as this suggests this particular pool may have too few
PGs.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/PGMonitor: health warn if pg_num != pgp_num
Sage Weil [Sat, 21 Sep 2013 06:07:54 +0000 (23:07 -0700)]
mon/PGMonitor: health warn if pg_num != pgp_num

Users need to adjust pg_num *and* pgp_num for split but may forget to do
both.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: warn if pg to osd ratio is too low
Sage Weil [Sat, 21 Sep 2013 05:52:24 +0000 (22:52 -0700)]
mon: warn if pg to osd ratio is too low

If there are not enough PGs relative to the number of in osds, warn.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoErasureCode: coding style conformance
Loic Dachary [Mon, 23 Sep 2013 15:24:15 +0000 (17:24 +0200)]
ErasureCode: coding style conformance

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for validate_command config-key 588/head
Loic Dachary [Sun, 15 Sep 2013 15:43:11 +0000 (17:43 +0200)]
ceph_argparse: unit tests for validate_command config-key

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for validate_command osd
Loic Dachary [Sun, 15 Sep 2013 15:42:02 +0000 (17:42 +0200)]
ceph_argparse: unit tests for validate_command osd

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for validate_command mon
Loic Dachary [Sun, 15 Sep 2013 15:39:22 +0000 (17:39 +0200)]
ceph_argparse: unit tests for validate_command mon

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for validate_command mds
Loic Dachary [Sun, 15 Sep 2013 15:37:39 +0000 (17:37 +0200)]
ceph_argparse: unit tests for validate_command mds

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for misc validate_command
Loic Dachary [Sun, 15 Sep 2013 15:36:02 +0000 (17:36 +0200)]
ceph_argparse: unit tests for misc validate_command

Contrary to all other classes, this series of command ( Monitor ) does
not have a common prefix.

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for validate_command auth
Loic Dachary [Sun, 15 Sep 2013 15:34:57 +0000 (17:34 +0200)]
ceph_argparse: unit tests for validate_command auth

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph_argparse: unit tests for validate_command pg
Loic Dachary [Sun, 15 Sep 2013 15:32:34 +0000 (17:32 +0200)]
ceph_argparse: unit tests for validate_command pg

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopybind: ceph_argparse unit tests foundations
Loic Dachary [Sun, 15 Sep 2013 15:19:41 +0000 (17:19 +0200)]
pybind: ceph_argparse unit tests foundations

The general idea is to have a series of commands, in the same order as
they show in mon/MonCommands.h, as if they were input to the ceph
client. For each command a valid combination is verified. And at least
one validation error is checked to produce a validation error. For
instance:

    ['pg', 'stat']

is a valid command and the validate_command function is expected to
return a value that is not None or {}. The command

    ['pg', 'stat', 'toomany' ]

is also given to validate_command to check that an error occurs when
an extra argument is given.

The TestArparse class implements a few methods to reduce the verbosity
of the tests. It does not provide many methods : only those that
significantly reduce the verbosity have been implemented. The drawback
of writing too many convenience methods is that they are more difficult
to read and maintain.

The signature dictionary is made a global variable so that
it is only extracted once for all classes. It is immutable.

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopybind: catch EntityAddress missing /
Loic Dachary [Sun, 15 Sep 2013 14:40:25 +0000 (16:40 +0200)]
pybind: catch EntityAddress missing /

If the / is missing in an EntityAddress, an ArgumentValid exception must
be raised so that it can be caught in the same way other argument
validation exceptions are.

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

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: validate mon dump epoch as a positive integer
Loic Dachary [Sun, 15 Sep 2013 14:38:58 +0000 (16:38 +0200)]
mon: validate mon dump epoch as a positive integer

All other epochs are validated in the same way

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

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopybind: unit tests for ceph_argparse::parse_json_funcsigs
Loic Dachary [Wed, 11 Sep 2013 16:33:52 +0000 (18:33 +0200)]
pybind: unit tests for ceph_argparse::parse_json_funcsigs

Run parse_json_funcsigs against the builtin commands found
in mon/MonCommands.h. Although it does not provide for a full
validation, it will detect some degenerate cases.

It is expected to raise if a space is missing at the end of an option
specification ( see https://github.com/ceph/ceph/pull/585 ) and this
case is tested. New tests of the same kind can be added whenever an
undetected error is found. Ideally a validation function is implemented
and it would be updated ( with an associated test ) when a new
pathological case is found.

The json string given to parse_json_funcsigs is obtained from
the support program get_command_descriptions.

The python-nose dependencies are added to the build requirements in
debian/control and ceph.spec.in because make check should always be run
at built time.

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

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years ago.gitignore gtags(1) generated files
Loic Dachary [Fri, 20 Sep 2013 11:54:57 +0000 (13:54 +0200)]
.gitignore gtags(1) generated files

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: get_command_descriptions support program
Loic Dachary [Wed, 11 Sep 2013 16:26:21 +0000 (18:26 +0200)]
mon: get_command_descriptions support program

The get_command_descriptions function is not designed to be tested in
C++ because all the validation happens in pybind/ceph_argparse.py. The
get_command_descriptions program is designed to be used by python unit
tests as a mean to get a JSON dump of the content of mon/MonCommands.h

      get_command_descriptions --all

      {"cmd000":{"sig":["pg","stat"],"help": ... "avail":"cli,rest"}}

It also provides a way to reproduce and keep track of past errors
( typos etc. ) to ensure the python validation keeps catching it.

      get_command_descriptions --pull585

Add /get_command_descriptions to .gitignore so that

      git ls-files --exclude-standard --others

does not see it which is required for
https://github.com/ceph/autobuild-ceph/blob/f018d220f2622a9fc8c86a31e1fa13263790c399/build-ceph.sh#L73

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

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: convenience function to convert commands to json
Loic Dachary [Wed, 11 Sep 2013 16:19:47 +0000 (18:19 +0200)]
mon: convenience function to convert commands to json

The get_command_descriptions is added to Monitor.h and contains
the code previously inlined in Monitor::handle_command to implement
the get_command_descriptions command. It is intended for tests to
convert command descriptions into json, including error cases.

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

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoautotools: set noinst_PROGRAMS
Loic Dachary [Fri, 20 Sep 2013 09:57:40 +0000 (11:57 +0200)]
autotools: set noinst_PROGRAMS

to be used by unit test support programs that do not need to be installed

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoautotools: group test scripts in check_SCRIPTS
Loic Dachary [Wed, 11 Sep 2013 16:14:23 +0000 (18:14 +0200)]
autotools: group test scripts in check_SCRIPTS

The check_SCRIPTS is added in Makefile-env.am to list the tests that do
not require compilation. The scripts listed in check-local and in the
TESTS variable use check_SCRIPTS instead.

The PYTHONPATH environment variable is added to Makefile-env.am and
includes the pybind directory so that python unit tests can load the
libraries from sources.

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

Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #626 from ceph/wip-usage
Loic Dachary [Mon, 23 Sep 2013 21:25:15 +0000 (14:25 -0700)]
Merge pull request #626 from ceph/wip-usage

common/config: include --cluster in default usage message

11 years agoMerge pull request #599 from ceph/wip-6323
Sage Weil [Mon, 23 Sep 2013 21:12:33 +0000 (14:12 -0700)]
Merge pull request #599 from ceph/wip-6323

mon: OSDMonitor: fix #6322 and #6323

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #617 from dachary/wip-lfnindex
Sage Weil [Mon, 23 Sep 2013 21:11:36 +0000 (14:11 -0700)]
Merge pull request #617 from dachary/wip-lfnindex

os: fix TestLFNIndex test warnings

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon/config: include --cluster in default usage message 626/head
Sage Weil [Mon, 23 Sep 2013 21:10:36 +0000 (14:10 -0700)]
common/config: include --cluster in default usage message

Clean it up a bit too.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #624 from ceph/automake-fix-common
Sage Weil [Mon, 23 Sep 2013 21:07:22 +0000 (14:07 -0700)]
Merge pull request #624 from ceph/automake-fix-common

make: build common/secret only on linux

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomake: build common/secret only on linux 624/head
Noah Watkins [Mon, 23 Sep 2013 15:19:23 +0000 (08:19 -0700)]
make: build common/secret only on linux

libkeyutils is only available on linux. before the automake refactoring
secret.c was compiled into rbd and ceph_mount targets which are linux
only targets. secret.c was moved to libcommon during the refactoring,
but the conditional compilation was lost.

Signed-off-by: Noah Watkins <noahwatkins@gmail.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 agoos: fix TestLFNIndex test warnings 617/head
Loic Dachary [Sun, 22 Sep 2013 08:46:23 +0000 (10:46 +0200)]
os: fix TestLFNIndex test warnings

Do not ignore system return value. Wrap emacs compile line to 80
characters.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomds: remove dirfrags when purging stray directory 566/head
Yan, Zheng [Wed, 4 Sep 2013 07:14:11 +0000 (15:14 +0800)]
mds: remove dirfrags when purging stray directory

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: avoid fetching backtrace when purging stray
Yan, Zheng [Wed, 4 Sep 2013 06:41:00 +0000 (14:41 +0800)]
mds: avoid fetching backtrace when purging stray

we save old data pools in both inode_backtrace_t::old_pools and
inode_t::old_pools. We have the inode in the cache when purging
stray, so no need to fetch backtrace to find old data pools.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: don't trim stray inode from the cache.
Yan, Zheng [Wed, 4 Sep 2013 06:07:13 +0000 (14:07 +0800)]
mds: don't trim stray inode from the cache.

don't trim stray inode from the cache, purge it instead. This ensures
the stary directories at minimum size.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: remove unnecessary MDCache::maybe_eval_stray() calls
Yan, Zheng [Wed, 4 Sep 2013 05:58:49 +0000 (13:58 +0800)]
mds: remove unnecessary MDCache::maybe_eval_stray() calls

Now we call MDCache::maybe_eval_stray() in MDSCacheObject::put().
So there is no need to call MDCache::maybe_eval_stray() after
releasing inode/dentry's refernece.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: evaluate stray when releasing inode/dentry's reference
Yan, Zheng [Wed, 4 Sep 2013 03:13:57 +0000 (11:13 +0800)]
mds: evaluate stray when releasing inode/dentry's reference

Current method to purge stray inode is call MDCache::maybe_eval_stray()
after releasing a reference to the stray inode/dentry. It's difficult
to make this method work correct, because there are so many places that
can release reference.

This patch solves the issue by calling MDCache::maybe_eval_stray()
in MDSCacheObject::put(). This avoids adding code that calls
MDCache::maybe_eval_stray() to each place that releases reference.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
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>