Commit Graph

35619 Commits

Author SHA1 Message Date
Loic Dachary
9fac072380 documentation: add the mark_unfound_lost delete option
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-01 00:42:19 +02:00
Loic Dachary
fb79062fb4 Merge pull request #2358 from dachary/wip-lrc
rename LRC to lrc + preload

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-31 12:52:43 +02:00
Loic Dachary
177202e4df erasure-code: lowercase LRC plugin name
So that all erasure code plugins are lowercase.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-31 12:51:03 +02:00
Sage Weil
4c9fdbf648 common/LogEntry: fix warning on x86_64
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-30 22:39:04 -07:00
Sage Weil
a24c8bac2b common/LogEntry: fix warning on i386
common/LogEntry.cc: In member function 'void LogEntry::log_to_syslog(std::string, std::string)':
warning: common/LogEntry.cc:161:20: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
msg.c_str());
^

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-30 21:56:31 -07:00
Sage Weil
bb26c66b82 Merge pull request #2360 from ceph/wip-9281
tools: use cout instead of cerr in journal tool

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 17:46:26 -07:00
Loic Dachary
d20432ecc0 erasure-code: preload LRC plugin
Add LRC to the list of erasure code plugins preloaded by default.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-30 02:12:47 +02:00
Loic Dachary
67c552becd Merge pull request #2359 from dachary/wip-fix-lrc
fix lrc tests and prototype 

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-30 02:10:59 +02:00
Sage Weil
b97f807a89 Merge pull request #2338 from ceph/wip-reweight
mon/OSDMonitor: make reweight_by_* output less misleading
2014-08-29 16:56:40 -07:00
Loic Dachary
93beff19b4 erasure-code: use s/get_str_map/get_json_str_map/
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-30 01:44:02 +02:00
Loic Dachary
6388934b23 erasure-code: mkfs.sh needs to know the plugin directory
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-30 01:43:03 +02:00
Sage Weil
21e25e77c2 Merge remote-tracking branch 'gh/wip-7988'
Conflicts:
	src/mds/RecoveryQueue.cc

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 16:11:38 -07:00
Joao Eduardo Luis
81102044f4 osd: OSDMap: ordered blacklist on non-classic encode function
Fixes: #9211
Backport: firefly

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 16:06:46 -07:00
Samuel Just
94fe3bcafd Merge pull request #1921 from dachary/wip-7238-lrc-plugin
erasure-code: locally repairable code plugin

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-08-29 14:08:48 -07:00
Loic Dachary
45a61ad6b3 erasure-code: ECRecPred must be true if all chunks can be recovered
ECRecPred assumes recovering any number of chunk is possible as long as
at least K chunks are available. It builds the want() set accordingly in
the constructor and arbitrarily set the first K chunks. But it would be
the same if it set the last K chunks.

While this is correct for jerasure and isa plugins, it is not true in
general. The predicate should assume that all chunks are going to be
recovered and return true if they can all be recovered. Otherwise, the
following can happen:

  * a PG has chunks 0,1,2,3 for K=2, M=2
  * ECRecPred is initialized a set want to 0,1 because K=2
  * ECRecPred claims the plugin can recover when provided 0,1
  * the plugin is then required to recover 0,1 using 2,3 and fails

This can happen for the LRC plugin with k=4,m=2,l=3 which is

  01234567
  DDc_DDc_
  DDDc____
  ____DDDc

and if chunks 0,1,2,3 are missing there is no way to recover chunks
4,5,6,7.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-29 19:39:57 +02:00
Loic Dachary
734ae88ef0 erasure-code: LRC plugin documentation
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-29 19:39:57 +02:00
Loic Dachary
01b943b25e erasure-code: test LRC pool, profile and crush ruleset
Using the command line to create an LRC pool validates that the plugin
can be loaded and the ruleset created immediately after the crush table
is populated with the default rulesets.

Add a test that takes out the first OSD holding data for an object and
checks the recovery is effective by retrieving the object content and
checking it is as expected.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-08-29 19:39:57 +02:00
Loic Dachary
c22260175d erasure-code: high level LRC configuration
Add a configuration mode to the LRC plugin, suitable for most use cases
and simpler to explain and understand. It uses k,m parameters similar to
the jerasure and isa plugins and adds l for locality. For instance:

   k=4 m=2 l=3
   ruleset_locality=rack
   ruleset_failure_domain=host

Will translate into

   local_group_count = (k+m)/l

   ruleset-steps = "["
    " [\"choose\", \"rack\", " + local_group_count + "], "
    " [\"chooseleaf\", \"host\", " + (l + 1) + "], "
    "]";

   layers = "[ "
      "  [ \"DDc_DDc_\", \"\" ],"
      "  [ \"DDDc____\", \"\" ],"
      "  [ \"____DDDc\", \"\" ],"
      "]";

It is less flexible because k+m must be a multiple of l and other
similar relationships and also because it cannot express recursive
configurations with locality in the datacenter and locality in a rack
within the datacenter.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-08-29 19:38:57 +02:00
Loic Dachary
b0fd48158b erasure-code: locally repairable code plugin
Recursively apply erasure code techniques so that recovering from the
loss of some chunks only require a subset of the available chunks, most
of the time.

http://tracker.ceph.com/issues/7238 Fixes: #7238

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-08-29 19:38:57 +02:00
Loic Dachary
c2ca011708 erasure-code: delegate chunk remapping to the plugin
Remapping the chunks after they have been encoded by the plugin is fine
if remapping is transparent to the plugin. However, the goal is to
delegate the remapping of the chunks to the plugin, for LRC in
particular. The chunks are therefore reordered according to the
directions found in the mapping array before they are passed to
decode_chunks.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-29 19:38:57 +02:00
Loic Dachary
b517ca4888 erasure-code: override the default only if the plugin match
When setting a new erasure coded profile, the key/value of the default
profile are re-used so that ruleset-failure-domain=osd can be overridden
like so:

        ceph osd erasure-code-profile set ruleset-failure-domain=osd

This is however not appropriate if the plugin is different from the
defaut plugin (for instance LRC instead of jerasure) because the
parameters are not the same.

If the plugin is changed, the default profile is not reused.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-29 19:38:57 +02:00
Loic Dachary
4670d9e6aa erasure-code: relax profile parameter syntax
Do not restrict the character set of the key=value pairs of osd
erasure-code-profile set to allow for things like:

             layers='[
                       [ "_aAA_aAA", "" ],
                       [ "bBBB____", "" ],
                       [ "____cCCC", "" ],
                     ]'

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-08-29 19:38:57 +02:00
Loic Dachary
e2e07d954d erasure-code: add ErasureCodeInterface::get_coding_chunk_count
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-08-29 19:38:56 +02:00
John Spray
9fc26840cf tools: use cout instead of cerr in journal tool
Aside from being a bit odd to begin with, using stderr
was causing tests to fail because the output was polluted
by log output which is also on stderr.

Fixes: 9281

Signed-off-by: John Spray <john.spray@redhat.com>
2014-08-29 18:34:39 +01:00
John Spray
8cf21ec485 Merge pull request #2258 from ceph/wip-mds-recover
mds: make max file recovers tunable

Reviewed-by: Yan, Zheng <ukernel@gmail.com>
Reviewed-by: John Spray <john.spray@redhat.com>
2014-08-29 17:19:49 +01:00
Sage Weil
9a86858d28 Merge pull request #2353 from wonzhq/compile-warn
Test: fixing a compile warning in ceph_objectstore_tool.cc

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 08:32:59 -07:00
Sage Weil
a9941458f0 mds/RecoveryQueue: do not start prioritized items synchronously
When we prioritize an item move it into a second priority list/set, but
do not start immediately, so that we still obey the max.  When we go to
start an item, pull items first off the priority list, then off the regular
list.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-29 08:29:35 -07:00
Sage Weil
08fc1f339c Merge pull request #2352 from wonzhq/local-mtime
Cache tiering: use local_mtime to calculate the age of objects during evicting

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 08:18:05 -07:00
Sage Weil
150542dd59 Merge pull request #2354 from dachary/wip-9273-mon-preload-erasure-code
erasure-code: preload the default plugins in the mon

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 08:17:06 -07:00
Sage Weil
6d79ed5217 Merge pull request #2355 from ceph/wip-hadoop
Wip hadoop

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 07:11:39 -07:00
Sage Weil
fce95c3b3e Merge pull request #2340 from ceph/wip-blacklist-mds
mds: restart on -EBLACKLISTED

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-29 06:55:16 -07:00
John Spray
e0b19e3023 qa: fix+cleanup hadoop wordcount test
The glob for the examples jar was wrong.

Fixes: #9260

Signed-off-by: John Spray <john.spray@redhat.com>
2014-08-29 13:29:22 +01:00
Loic Dachary
76b8e57ba6 erasure-code: preload the default plugins in the mon
The commit 9b802701f7 preloads the
supported plugins in the OSD. They must also be preloaded in the mon for
the same reasons.

http://tracker.ceph.com/issues/9273 Fixes: #9273

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-29 12:12:32 +02:00
Zhiqiang Wang
c3e1466b46 Test: fixing a compile warning in ceph_objectstore_tool.cc
For the compiler's sake:
tools/ceph_objectstore_tool.cc:2547:15: warning: ‘r’ may be used
uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
2014-08-29 16:39:40 +08:00
Zhiqiang Wang
1b4272601a Cache tiering: use local_mtime to calculate the age of objects during
evicting

Commit 13b9dc70 introduces local_mtime to fix an issue when doing
flushing. Should also use this to calculate the object age when doing
evicting.

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
2014-08-29 16:06:30 +08:00
John Wilkins
335c1f745e doc: Added rbd-replay-prep and rbd-replay manpages to block device TOC.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-08-28 18:07:51 -07:00
John Wilkins
b965398980 doc: Fixed broken hyperlink.
Fixes: #9116

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-08-28 17:45:51 -07:00
John Wilkins
7948e13b9d doc: Added sysctl max thread count discussion.
Fixes: #6142

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-08-28 17:25:07 -07:00
Sage Weil
9011e37802 Merge pull request #2351 from ceph/wip-9266
client: fix dispatcher ordering (broken fuse)

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-28 17:08:26 -07:00
John Spray
a257291a9d client: fix dispatcher ordering (broken fuse)
Objecter never saw any OSD maps because of 1e1ee480 and
the dispatchers being in the wrong order -- ignoring map
in Client was hiding it from Objecter.

Fixes: #9266

Signed-off-by: John Spray <john.spray@redhat.com>
2014-08-29 00:59:32 +01:00
Samuel Just
038992b1da Merge pull request #2332 from ceph/wip-8231-forreview
Wip 8231 forreview

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-08-28 16:37:37 -07:00
David Zafman
ce29b7681e Fix ceph_scratchtoolpp to create and delete its own pool
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-08-28 16:22:15 -07:00
David Zafman
a03f719eb3 ceph_objectstore_tool: Bug fixes and test improvements
ceph_objectgstore_tool:
Fix bugs in the way collection_list_partial() was being called
which caused objects to be seen over and over again.

Unit test:
Fix get_objs() to walk pg tree for pg with sub-directories
Create more objects to test object listing code
Limit number of larger objects
Limit number of objects which get attributes and omaps

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-08-28 16:22:15 -07:00
David Zafman
23ec93a861 ceph_objectstore_tool, test: Implement import-rados feature and unit test code
Fixes: #8276

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
David Zafman
b193812b58 tools/rados: Improve trigger for op_size rounding info message
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
David Zafman
54dcbf2488 test: ceph_objectstore_tool unit test improvements
Add namespaces to testing
Increase filesize so export will have multiple chunks
Put json for each object into the db dict

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
David Zafman
3694068b67 ceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
David Zafman
9325ec15d4 ceph_objectstore_tool: Add past_intervals to export/import code
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
David Zafman
a2bd2aa7ba ceph_objectstore_tool: Minor improvements
Make all non-error non-debug output to stdout
Fix a message

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
David Zafman
f01e334c69 ceph_objectstore_tool, test: Add list-pgs operations and unit test case
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00