]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoerasure-code: move test files to a dedicated directory 1194/head
Loic Dachary [Thu, 6 Feb 2014 10:28:21 +0000 (11:28 +0100)]
erasure-code: move test files to a dedicated directory

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: move source files to a dedicated directory
Loic Dachary [Thu, 6 Feb 2014 10:00:33 +0000 (11:00 +0100)]
erasure-code: move source files to a dedicated directory

The src/erasure-code directory contains the erasure-code plugin system
and the jerasure plugin. It is moved out of OSD because it now belongs
to a convenience library ( LIBERASURE_CODE ) which is used both by OSDs
and MONs.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1188 from dachary/wip-7339
Loic Dachary [Thu, 6 Feb 2014 00:38:42 +0000 (01:38 +0100)]
Merge pull request #1188 from dachary/wip-7339

DNM: define pg_pool_t::stripe_width and set from erasure-code plugin on erasure pool creation

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agomon: test osd pool create pg_pool_t::stripe_width behavior 1188/head
Loic Dachary [Wed, 5 Feb 2014 19:44:32 +0000 (20:44 +0100)]
mon: test osd pool create pg_pool_t::stripe_width behavior

* Check that the default from the configuration options is found in the
  output of osd dump
* Check that specifying an undersized osd_pool_erasure_code_stripe_width
  value is taken into account and padded.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd pool create sets pg_pool_t::stripe_width
Loic Dachary [Wed, 5 Feb 2014 19:40:46 +0000 (20:40 +0100)]
mon: osd pool create sets pg_pool_t::stripe_width

It does nothing if the pool is replicated. Otherwise it uses
osd_pool_erasure_code_stripe_width as the desired stripe width and run
it by get_chunk_size() on the erasure code plugin to get the actual
stripe_width. It will always be >= 0 to the desired stripe_width, padded
to match the alignment constraints imposed by the erasure code plugin.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: add osd_pool_erasure_code_stripe_width
Loic Dachary [Wed, 5 Feb 2014 19:34:37 +0000 (20:34 +0100)]
common: add osd_pool_erasure_code_stripe_width

and document it.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agounittests: update osdmaptools with stripe_width
Loic Dachary [Wed, 5 Feb 2014 19:33:21 +0000 (20:33 +0100)]
unittests: update osdmaptools with stripe_width

stripe_width 0 now shows on every osd dump.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add erasure-code pg_pool_t::stripe_width
Loic Dachary [Wed, 5 Feb 2014 19:31:18 +0000 (20:31 +0100)]
mon: add erasure-code pg_pool_t::stripe_width

Contains the actual stripe size used by erasure coded pools. It is
initialized to zero by default and has to be explicitly set by erasure
coded pools. get/set methods are added inline.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1187 from ceph/port/fixes
Sage Weil [Wed, 5 Feb 2014 19:19:54 +0000 (11:19 -0800)]
Merge pull request #1187 from ceph/port/fixes

portability fixes

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd: fix type mismatch warning 1187/head
Noah Watkins [Wed, 5 Feb 2014 16:37:24 +0000 (08:37 -0800)]
osd: fix type mismatch warning

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoos/kvstore: remove used var
Noah Watkins [Wed, 5 Feb 2014 16:37:08 +0000 (08:37 -0800)]
os/kvstore: remove used var

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoos/kvstore: trivial portability fixes
Noah Watkins [Wed, 5 Feb 2014 16:36:56 +0000 (08:36 -0800)]
os/kvstore: trivial portability fixes

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agocommon: simpler erasure code technique
Loic Dachary [Wed, 5 Feb 2014 16:27:09 +0000 (17:27 +0100)]
common: simpler erasure code technique

Change the default technique from Cauchy to ReedSolomon. Although it is
less efficient the alignment constraints are more intuitive.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1182 from ceph/wip-mds-cluster
Sage Weil [Tue, 4 Feb 2014 17:18:48 +0000 (09:18 -0800)]
Merge pull request #1182 from ceph/wip-mds-cluster

mds: avoid sending duplicated discovers during recovery

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1177 from dachary/wip-erasure-code-command
Loic Dachary [Tue, 4 Feb 2014 16:34:37 +0000 (08:34 -0800)]
Merge pull request #1177 from dachary/wip-erasure-code-command

erasure code command

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoerasure-code: add ceph_erasure_code debug command 1177/head
Loic Dachary [Mon, 3 Feb 2014 13:00:41 +0000 (14:00 +0100)]
erasure-code: add ceph_erasure_code debug command

It loads a designated erasure-code plugin and calls its
methods. It is convenient to figure out and tune the number of data
chunks, the size of an aligned chunk etc. For instance:

ceph_erasure_code \
      --parameter erasure-code-plugin=jerasure \
      --parameter erasure-code-directory=.libs \
      --parameter erasure-code-technique=reed_sol_van \
      --parameter erasure-code-k=2 \
      --parameter erasure-code-m=2 \
      --all

displays the chunk size when encoding an object of 1024 bytes.

get_chunk_size(1024) 512
get_data_chunk_count 2
get_chunk_count 4

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomds: avoid sending duplicated discovers during recovery 1182/head
Yan, Zheng [Fri, 10 Jan 2014 01:55:50 +0000 (09:55 +0800)]
mds: avoid sending duplicated discovers during recovery

If MDS just entered the rejoin state, it should not kick discovers
because the discovers were just sent. Similarly, if MDS just entered
the clientreplay state, it should not call MDS::handle_mds_recovery()
because MDS::recovery_done() has already recovered the table server.

Also make MDCache::handle_mds_recovery() not wake the discover waiters
up. Because the MDCache::kick_discovers re-sends the discovers, their
replies will wake the discover waiter up.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoerasure-code: benchmark moves to a dedicated directory
Loic Dachary [Mon, 3 Feb 2014 11:50:20 +0000 (12:50 +0100)]
erasure-code: benchmark moves to a dedicated directory

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1180 from dachary/wip-7313
Loic Dachary [Tue, 4 Feb 2014 11:21:46 +0000 (03:21 -0800)]
Merge pull request #1180 from dachary/wip-7313

mon: check cluster features before rule create-erasure

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: check cluster features before rule create-erasure 1180/head
Loic Dachary [Tue, 4 Feb 2014 00:31:52 +0000 (01:31 +0100)]
mon: check cluster features before rule create-erasure

Encapsulate the logic used when creating an erasure coded pool into the
check_cluster_features helper.

check_cluster_features(CEPH_FEATURE_CRUSH_V2) is required for crush rule
create-erasure because it is expected that the erasure code plugin will
use indep instead of firstn and expect the V2 behavior and not the
legacy behavior.

The CEPH_FEATURE_CRUSH_V2 is added to CEPH_FEATURE_OSD_ERASURE_CODES
when an erasure coded pool is created. It is necessary because pool
won't function properly if given an indep ruleset that does not
implement the V2 behavior.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1144 from dachary/wip-7146
Loic Dachary [Tue, 4 Feb 2014 10:38:24 +0000 (02:38 -0800)]
Merge pull request #1144 from dachary/wip-7146

osd crush rule create-erasure

gitbuilder is green/yellow for wip-7146

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agomon: OSDMonitor: do not allow changing an erasure-coded pool's size 1144/head
Joao Eduardo Luis [Sun, 2 Feb 2014 14:02:17 +0000 (14:02 +0000)]
mon: OSDMonitor: do not allow changing an erasure-coded pool's size

Fixes: 7277
Reviewed-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: osd-pool-create test no longer use hardcoded ruleset
Loic Dachary [Sun, 2 Feb 2014 10:35:13 +0000 (11:35 +0100)]
mon: osd-pool-create test no longer use hardcoded ruleset

For erasure-code the ruleset must be specified instead of relying on an
hardcoded value. Adapt the test to this for tests that do not otherwise
change behavior.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd-pool-create test EAGAIN when pending
Loic Dachary [Mon, 3 Feb 2014 21:59:30 +0000 (22:59 +0100)]
mon: osd-pool-create test EAGAIN when pending

Test that if the ruleset is found in the pending paxos proposal, the
pool creation will try again.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: test erasure code pool creation
Loic Dachary [Sun, 2 Feb 2014 09:40:37 +0000 (10:40 +0100)]
mon: test erasure code pool creation

* The sequence now is a) create ruleset, b) create pool.
* Check that not specifying the ruleset when an erasure coded pool is
  created fails
* Check that specifying a non existent ruleset when a pool is created
  fails
* Check that osd dump shows the expected ruleset. It assumes ruleset
  numbers are allocated in sequence, i.e. the ruleset will be 1.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd-pool-create test enforce -e
Loic Dachary [Sun, 2 Feb 2014 09:37:18 +0000 (10:37 +0100)]
mon: osd-pool-create test enforce -e

Use

   ! grep foo || exit 1

instead of

   grep foo && exit 1

so that all commands have a successful exit code. Otherwise set -e is
supposed to fail on them.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd-pool-create test must kill -9
Loic Dachary [Sun, 2 Feb 2014 09:34:43 +0000 (10:34 +0100)]
mon: osd-pool-create test must kill -9

If a MON is stuck, kill -15 won't be enough and the test will hang
forever.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd-pool-create test initialization
Loic Dachary [Sun, 2 Feb 2014 09:33:20 +0000 (10:33 +0100)]
mon: osd-pool-create test initialization

* reduce the paxos propose interval speed up tests
* load erasure code plugins from sources

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd-pool-create shows logs on error
Loic Dachary [Sun, 2 Feb 2014 09:31:48 +0000 (10:31 +0100)]
mon: osd-pool-create shows logs on error

extracting the logs would otherwise require a modification of the test
file to not clobber the directory containing the logs when it exits

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agovstart: load erasure code plugins from sources
Loic Dachary [Tue, 4 Feb 2014 00:12:31 +0000 (01:12 +0100)]
vstart: load erasure code plugins from sources

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agounittests: reduce paxos propose interval to increase speed
Loic Dachary [Sun, 2 Feb 2014 08:38:23 +0000 (09:38 +0100)]
unittests: reduce paxos propose interval to increase speed

The MONs are stressed more often and there is less aggregation of the
pending requests. But the unit tests are only meant to verify that a
known code path exists and performs as expected, therefore it will not
make a difference. And if it does, it is a bug that needs fixing.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopybind: osd crush rule create-erasure tests
Loic Dachary [Wed, 29 Jan 2014 14:01:00 +0000 (15:01 +0100)]
pybind: osd crush rule create-erasure tests

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopybind: cosmetic changes to tests
Loic Dachary [Wed, 29 Jan 2014 13:59:46 +0000 (14:59 +0100)]
pybind: cosmetic changes to tests

* untabify
* re-indent
* 2014 to copyright notice

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopybind: fix tests that do not fail as expected
Loic Dachary [Wed, 29 Jan 2014 13:52:22 +0000 (14:52 +0100)]
pybind: fix tests that do not fail as expected

A missing argument make the test fail indeed, but the intended test is
to demonstrate something else ( either character validation or excess of
arguments etc. ). The result is {} instead of None which is what should
have been expected in the first place.

Ideally there would be a more verbose way to check for syntactic errors
to make such mistakes less probable.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd crush rule create-erasure
Loic Dachary [Sun, 26 Jan 2014 17:52:50 +0000 (18:52 +0100)]
mon: osd crush rule create-erasure

Delegates the creation of the rule to the erasure code plugin associated
with the specified pool.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: compute the ruleset of erasure-coded pools
Loic Dachary [Sun, 2 Feb 2014 09:05:59 +0000 (10:05 +0100)]
mon: compute the ruleset of erasure-coded pools

The default ruleset of an erasure coded pool may depend on the
parameters used to configure it. In the case of a pyramidal /
hierarchical plugin, the desired ruleset will, for instance, chose from
datacenters and then from racks and disperse local coding chunks among
them.

For this reason the default ruleset cannot be hardcoded in config_opts
as it is for replicated pools. Instead, the "crush_ruleset" property is
interpreted to be the name of an existing crush ruleset to be used.

If the corresponding ruleset is found in a pending crushmap, the
prepare_pool_crush_ruleset will return EAGAIN. The "osd pool create"
caller is modified to handle the EAGAIN error and reschedules the message.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: compute the size of erasure-coded pools
Loic Dachary [Sun, 2 Feb 2014 09:04:48 +0000 (10:04 +0100)]
mon: compute the size of erasure-coded pools

It is K+M ( data chunks + coding chunks ) as returned by the
get_chunk_count() method of the erasure code plugin.

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

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: erasure code plugin loader helper
Loic Dachary [Sun, 2 Feb 2014 08:59:52 +0000 (09:59 +0100)]
mon: erasure code plugin loader helper

The get_erasure_code helper loads the erasure code plugin found in the
erasure-code-plugin string of the properties argument. It is meant to be
used to query the plugin to determine the desired size of a pool, the
more suitable ruleset to use etc.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: pool create helper for crush ruleset
Loic Dachary [Sun, 2 Feb 2014 08:56:13 +0000 (09:56 +0100)]
mon: pool create helper for crush ruleset

The crush ruleset of the replicated pools are by default set to
osd_pool_default_crush_replicated_ruleset but it may vary depending on
the pool type. Create a helper to compute the crush ruleset.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: pool creation helper for size
Loic Dachary [Sun, 2 Feb 2014 08:51:50 +0000 (09:51 +0100)]
mon: pool creation helper for size

The size of the replicated pools are by default set to
osd_pool_default_size but it may vary depending on the pool type. Create
a helper to compute the pool size.

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

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: no default ruleset except for replicated pools
Loic Dachary [Sat, 1 Feb 2014 09:21:00 +0000 (10:21 +0100)]
mon: no default ruleset except for replicated pools

Remove the hardcoded default ruleset for erasure coded pools and only
keep it for replicated pools. Move the logic up in the  prepare_new_pool
method so that an error code can be returned before allocating the new
pending pool in case the ruleset is not initialized.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: helper for pool properties parsing
Loic Dachary [Sat, 1 Feb 2014 09:09:12 +0000 (10:09 +0100)]
mon: helper for pool properties parsing

Add the prepare_pool_properties to convert the properties vector into a
properties map suitable for either initializing the pg_pool_t member or
an erasure code plugin.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: test ErasureCodeJerasure::create_ruleset
Loic Dachary [Wed, 29 Jan 2014 14:10:58 +0000 (15:10 +0100)]
erasure-code: test ErasureCodeJerasure::create_ruleset

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: implement ErasureCodeJerasure::create_ruleset
Loic Dachary [Wed, 29 Jan 2014 14:08:01 +0000 (15:08 +0100)]
erasure-code: implement ErasureCodeJerasure::create_ruleset

It is based on CrushWrapper::add_simple_ruleset, using a "default" root
and "host" failure domain by default. They can be overridden with
erasure-code parameters ( erasure-code-ruleset-root and
erasure-code-ruleset-failure-domain respectively ).

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: implement example create_ruleset
Loic Dachary [Wed, 29 Jan 2014 14:06:41 +0000 (15:06 +0100)]
erasure-code: implement example create_ruleset

And the associated unit tests.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: add crush ruleset creation API
Loic Dachary [Sun, 26 Jan 2014 17:54:37 +0000 (18:54 +0100)]
erasure-code: add crush ruleset creation API

Because only the erasure code plugin knows enough to create a ruleset
that is best suited for a given set of parameters.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: the plugin is in a convenience library
Loic Dachary [Sun, 26 Jan 2014 17:51:08 +0000 (18:51 +0100)]
erasure-code: the plugin is in a convenience library

So that it can be used by mon without linking with libosd

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 4 Feb 2014 06:20:47 +0000 (22:20 -0800)]
Merge remote-tracking branch 'gh/next'

11 years agodoc/release-notes: v0.77 draft notes
Sage Weil [Tue, 4 Feb 2014 05:55:45 +0000 (21:55 -0800)]
doc/release-notes: v0.77 draft notes

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: v0.76
Sage Weil [Tue, 4 Feb 2014 05:40:59 +0000 (21:40 -0800)]
doc/release-notes: v0.76

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient: fix warnings
Sage Weil [Tue, 4 Feb 2014 05:12:41 +0000 (21:12 -0800)]
client: fix warnings

client/Client.cc: In member function 'int Client::_read(Fh*, int64_t, uint64_t, ceph::bufferlist*)':
warning: client/Client.cc:5893:27: comparison between signed and unsigned integer expressions [-Wsign-compare]
client/Client.cc: In member function 'int Client::_write(Fh*, int64_t, uint64_t, const char*)':
warning: client/Client.cc:6235:30: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/KeyValueStore: fix warning
Sage Weil [Tue, 4 Feb 2014 00:54:52 +0000 (16:54 -0800)]
os/KeyValueStore: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorest: add a few rest api tests
Sage Weil [Tue, 4 Feb 2014 00:54:08 +0000 (16:54 -0800)]
rest: add a few rest api tests

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: use 'mds set inline_data ...' for enable/disable of inline data
Sage Weil [Sun, 2 Feb 2014 20:02:08 +0000 (12:02 -0800)]
mon: use 'mds set inline_data ...' for enable/disable of inline data

This makes the management interface a bit more consistent.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: fix 'mds set allow_new_snaps'
Sage Weil [Mon, 3 Feb 2014 21:19:14 +0000 (13:19 -0800)]
mon: fix 'mds set allow_new_snaps'

We had already added this as a flag (set/unset) when I generalized the
'mds set_max_mds' to be 'ceph mds set <var> <val>'.  Switch the snaps
flag to be a key/value to with true/false (similar to the hashpspool
pool flag) since there are fewer users and the var/val approach is more
general.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1179 from dachary/wip-force-proposal
Sage Weil [Tue, 4 Feb 2014 00:37:00 +0000 (16:37 -0800)]
Merge pull request #1179 from dachary/wip-force-proposal

mon: do not force proposal when no osds

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: do not force proposal when no osds 1179/head
Loic Dachary [Sun, 2 Feb 2014 00:09:52 +0000 (01:09 +0100)]
mon: do not force proposal when no osds

If there are no OSDs, there is no need to propose to paxos. It does not
hurt on a production cluster but it matters when running tests because
it effectively alway ignores --paxos-propose-interval.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1151 from ceph/wip-performance-configs
Gregory Farnum [Mon, 3 Feb 2014 23:06:12 +0000 (15:06 -0800)]
Merge pull request #1151 from ceph/wip-performance-configs

Performance improvements and config options

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge branch 'next'
Ken Dreyer [Mon, 3 Feb 2014 22:39:26 +0000 (22:39 +0000)]
Merge branch 'next'

11 years agov0.76 v0.76
Ken Dreyer [Mon, 3 Feb 2014 18:26:25 +0000 (18:26 +0000)]
v0.76

11 years agoclient: use 64-bit value in sync read eof logic
Sage Weil [Mon, 3 Feb 2014 16:54:14 +0000 (08:54 -0800)]
client: use 64-bit value in sync read eof logic

The file size can jump to a value that is very much larger than our current
position (for example, it could be a disk image file that gets a sparse
write at a large offset).  Use a 64-bit value so that 'some' doesn't
overflow.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: John Spray <john.spray@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sun, 2 Feb 2014 17:40:11 +0000 (09:40 -0800)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/mon/OSDMonitor.cc
src/osd/OSDMap.h

11 years agoMerge remote-tracking branch 'gh/wip-inline'
Sage Weil [Sun, 2 Feb 2014 17:15:27 +0000 (09:15 -0800)]
Merge remote-tracking branch 'gh/wip-inline'

Passed fs suite, sage-2014-02-01_22:18:10-fs-wip-inline-testing-basic-plana,
modulo a snap test error in the suite.

Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1165 from mo22/client_fuse_multithreading
Sage Weil [Sun, 2 Feb 2014 05:00:41 +0000 (21:00 -0800)]
Merge pull request #1165 from mo22/client_fuse_multithreading

client: ceph-fuse use fuse_session_loop_mt to allow multithreaded operat...

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoPipe, cephx: Message signing under config option 1151/head
Somnath Roy [Wed, 22 Jan 2014 18:30:32 +0000 (10:30 -0800)]
Pipe, cephx: Message signing under config option

The config option was present earlier but the option is checked
not in the beginning, so, it was doing some stuff. Now the config
option guard is at the very beginning of the function.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agocmp.h: boost tuple comparison is replaced by regular comparison
Somnath Roy [Wed, 22 Jan 2014 19:03:06 +0000 (11:03 -0800)]
cmp.h: boost tuple comparison is replaced by regular comparison

Profiler was showing this boost tuple comparison is expensive.
So, it is replaced by regular comparison.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoTrackedOp: optionally disable the actual tracking operations
Greg Farnum [Tue, 7 Jan 2014 18:05:57 +0000 (10:05 -0800)]
TrackedOp: optionally disable the actual tracking operations

To avoid op contention on global locks, optionally disable the
op tracking. Create an "osd_op_tracker" config to control it, then
in the OpTracker constructor set a bool. If it's set, the OpTracker
doesn't actually maintain its lists and avoids taking any locks. We
maintain the within-op tracking for now since it shouldn't contend,
but we can turn that off later on if we like.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoThrottle: Turn off throttle based on max bytes
Somnath Roy [Wed, 22 Jan 2014 18:49:50 +0000 (10:49 -0800)]
Throttle: Turn off throttle based on max bytes

If max throttle bytes is 0, throttle should not be doing anything.
This check is introduced in the beginning of each throttle function

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoThrottler: optionally disable use of perfcounters
Greg Farnum [Tue, 7 Jan 2014 17:43:28 +0000 (09:43 -0800)]
Throttler: optionally disable use of perfcounters

These can be expensive enough that we want to disable them. We're already
mostly set up for it to be optional, so just plug in a config option and
move a timestamp read under the "if (logger)" guard to set it up!

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agocommon/shared_cache.hpp: compact to a single lookup where possible
Samuel Just [Tue, 22 Oct 2013 23:17:33 +0000 (16:17 -0700)]
common/shared_cache.hpp: compact to a single lookup where possible

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agocommon/shared_cache.hpp: avoid list::size()
Samuel Just [Mon, 21 Oct 2013 20:56:06 +0000 (13:56 -0700)]
common/shared_cache.hpp: avoid list::size()

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1174 from alram/master
John Wilkins [Fri, 31 Jan 2014 22:20:37 +0000 (14:20 -0800)]
Merge pull request #1174 from alram/master

doc: rgw: el6 documentation fixes

11 years agodoc: rgw: el6 documentation fixes 1174/head
Alexandre Marangone [Fri, 31 Jan 2014 21:51:47 +0000 (13:51 -0800)]
doc: rgw: el6 documentation fixes

- fix a couple of typo for repo configuration and service restart
- the ceph package must be installed on RPM distro since the init
script relies on ceph-conf
- Note on radosgw service name for RPM distro

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
11 years agoMerge pull request #1162 from ceph/wip-5997
David Zafman [Fri, 31 Jan 2014 20:35:56 +0000 (12:35 -0800)]
Merge pull request #1162 from ceph/wip-5997

Fixes: #5997
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd: Change some be_compare_scrub_objects() args to const 1162/head
David Zafman [Thu, 30 Jan 2014 01:14:09 +0000 (17:14 -0800)]
osd: Change some be_compare_scrub_objects() args to const

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Change be_scan_list() arg to const
David Zafman [Thu, 30 Jan 2014 01:13:39 +0000 (17:13 -0800)]
osd: Change be_scan_list() arg to const

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agocommon: buffer::ptr::cmp() is a const function
David Zafman [Thu, 30 Jan 2014 01:08:50 +0000 (17:08 -0800)]
common: buffer::ptr::cmp() is a const function

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Move the rest of scrubbing routines to the backend
David Zafman [Wed, 29 Jan 2014 03:18:32 +0000 (19:18 -0800)]
osd: Move the rest of scrubbing routines to the backend

Move enum scrub_error_type to osd_types.h
Move PG::_compare_scrub_objects to ReplicatedBackend::be_compare_scrub_objects
Move PG::_select_auth_object to ReplicatedBackend::be_select_auth_object
Move PG::_compare_scrubmaps to ReplicatedBackend::be_compare_scrubmaps

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list()
David Zafman [Sat, 25 Jan 2014 02:11:52 +0000 (18:11 -0800)]
osd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list()

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Add scrub_supported() backend interface
David Zafman [Fri, 24 Jan 2014 03:55:27 +0000 (19:55 -0800)]
osd: Add scrub_supported() backend interface

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoOSDMap: fix deepish_copy_from
Sage Weil [Wed, 29 Jan 2014 02:46:37 +0000 (18:46 -0800)]
OSDMap: fix deepish_copy_from

Start with a shallow copy!

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d0f13f54146694a197535795da15b8832ef4b56f)

Conflicts:

src/osd/OSDMap.h

11 years agoOSDMonitor: use deepish_copy_from for remove_down_pg_temp
Sage Weil [Tue, 28 Jan 2014 19:00:34 +0000 (11:00 -0800)]
OSDMonitor: use deepish_copy_from for remove_down_pg_temp

This is a backport of 368852f6c0a884b8fdc80a5cd6f9ab72e814d412.

Make a deep copy of the OSDMap to avoid clobbering the in-memory copy with
the call to apply_incremental.

Fixes: #7060
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoOSDMap: deepish_copy_from()
Sage Weil [Fri, 24 Jan 2014 19:03:26 +0000 (11:03 -0800)]
OSDMap: deepish_copy_from()

Make a deep(ish) copy of another OSDMap.  Unfortunatley we can't make the
compiler-generated copy operator/constructors private until c++11.  :(

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit bd54b9841b9255406e56cdc7269bddb419453304)

11 years agoos/KeyValueStore: fix warning
Sage Weil [Fri, 31 Jan 2014 15:19:10 +0000 (07:19 -0800)]
os/KeyValueStore: fix warning

./os/KeyValueStore.h: In member function ‘std::string KeyValueStore::strip_object_key(uint64_t)’:
warning: ./os/KeyValueStore.h:173:31: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'wip-inline' of git://github.com/kylinstorage/ceph
Sage Weil [Fri, 31 Jan 2014 15:00:49 +0000 (07:00 -0800)]
Merge branch 'wip-inline' of git://github.com/kylinstorage/ceph

Conflicts:
src/include/ceph_features.h

11 years agoMerge pull request #1171 from ceph/wip-osdmap-features
Sage Weil [Fri, 31 Jan 2014 05:01:16 +0000 (21:01 -0800)]
Merge pull request #1171 from ceph/wip-osdmap-features

mon: encode full osdmap with same feature bits as the incremental

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1169 from dachary/wip-ceph-disk
Josh Durgin [Fri, 31 Jan 2014 00:04:09 +0000 (16:04 -0800)]
Merge pull request #1169 from dachary/wip-ceph-disk

Reviewed-by: Sage Weil <sage.weil@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge remote-tracking branch 'origin/next'
Josh Durgin [Thu, 30 Jan 2014 23:40:09 +0000 (15:40 -0800)]
Merge remote-tracking branch 'origin/next'

Conflicts:
src/test/ceph-disk.sh

11 years agomon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental 1171/head
Sage Weil [Thu, 30 Jan 2014 23:13:05 +0000 (15:13 -0800)]
mon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental

Each monitor is independently encoding the full OSDMap and storing it in
its local store.  Sometime this happens when we do not have a valid value
for quorum_features (for example, it can happen during sync).

Instead, use the feature bits the Incremental was encoded with for the full
OSDMap so that they always match.

Note that this conveniently the *only* place in the mon where we encode
the full OSDMap, so we're capturing all paths.  Yay!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoOSDMap: note encoding features in Incremental encoding
Sage Weil [Thu, 30 Jan 2014 23:09:58 +0000 (15:09 -0800)]
OSDMap: note encoding features in Incremental encoding

The monitor will need to know what features the incremental was encoded
with so that it can encode the OSDMap using the same bits.  Introduce a
member that is set during decode.  During encode, encoding the value passed
in by the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1170 from ceph/wip-pybind-enverr
Josh Durgin [Thu, 30 Jan 2014 21:10:37 +0000 (13:10 -0800)]
Merge pull request #1170 from ceph/wip-pybind-enverr

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agopybind: improve EnvironmentError output 1170/head
Ilya Dryomov [Thu, 30 Jan 2014 21:04:12 +0000 (23:04 +0200)]
pybind: improve EnvironmentError output

Follow 70c7c9e600c5 ("pybind/rados.py: improve error output") and
improve EnvironmentError output for librbd and libcephfs too.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agorgw: fix build on centos
Yehuda Sadeh [Thu, 30 Jan 2014 18:35:04 +0000 (10:35 -0800)]
rgw: fix build on centos

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1145 from dachary/wip-mailmap
Loic Dachary [Thu, 30 Jan 2014 20:15:21 +0000 (12:15 -0800)]
Merge pull request #1145 from dachary/wip-mailmap

mailmap: organization affiliations

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agomailmap: Rutger ter Borg affiliation 1145/head
Loic Dachary [Mon, 27 Jan 2014 11:57:04 +0000 (12:57 +0100)]
mailmap: Rutger ter Borg affiliation

Reviewed-by: Rutger ter Borg <rutger@terborg.net>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Laurent Barbe affiliation
Loic Dachary [Mon, 27 Jan 2014 09:35:28 +0000 (10:35 +0100)]
mailmap: Laurent Barbe affiliation

Reviewed-by: Laurent Barbe <laurent@ksperis.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: anonymous contributions are unaffiliated
Loic Dachary [Mon, 27 Jan 2014 09:31:11 +0000 (10:31 +0100)]
mailmap: anonymous contributions are unaffiliated

there only are a few of them

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Andras Elso affiliation
Loic Dachary [Mon, 27 Jan 2014 06:14:11 +0000 (07:14 +0100)]
mailmap: Andras Elso affiliation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Ma Jianpeng affiliation
Loic Dachary [Mon, 27 Jan 2014 05:40:05 +0000 (06:40 +0100)]
mailmap: Ma Jianpeng affiliation

and name normalization

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Simon Leinen is with SWITCH
Loic Dachary [Mon, 27 Jan 2014 05:35:01 +0000 (06:35 +0100)]
mailmap: Simon Leinen is with SWITCH

Signed-off-by: Loic Dachary <loic@dachary.org>