]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agotest-shared-cache: 2597/head
Cheng Cheng [Mon, 29 Sep 2014 14:41:32 +0000 (10:41 -0400)]
test-shared-cache:
  Add test for "lower_bound" method.
  Add multithread tests for "lookup" and "lower_bound" methods.

Signed-off-by: Cheng Cheng <ccheng.leo@gmail.com>
               Loic Dachary <loic@dachary.org>

10 years agotest-shared-cache:
cchengleo [Mon, 8 Sep 2014 14:37:56 +0000 (10:37 -0400)]
test-shared-cache:
  Initial draft for the unit test of "common/shared_cache.hpp".

Signed-off-by: Cheng Cheng <ccheng.leo@gmail.com>
               Loic Dachary <loic@dachary.org>

10 years agoMerge pull request #2398 from xiaoxichen/refactor_lrc_crush
Loic Dachary [Sat, 6 Sep 2014 10:40:35 +0000 (12:40 +0200)]
Merge pull request #2398 from xiaoxichen/refactor_lrc_crush

Refactor ErasureCodeLrc::create_ruleset

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agoMerge pull request #2410 from dachary/wip-9368
Loic Dachary [Sat, 6 Sep 2014 01:01:48 +0000 (03:01 +0200)]
Merge pull request #2410 from dachary/wip-9368

erasure-code: init function is extern "C"

10 years agoerasure-code: init function is extern "C" 2410/head
Loic Dachary [Sat, 6 Sep 2014 00:55:15 +0000 (02:55 +0200)]
erasure-code: init function is extern "C"

Otherwise it is not found and the real cause obscured by the test
setup. The thread returns immediately and the timeout test sometime
fails.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agodoc: Update logging path to reflect log rotate script default path.
John Wilkins [Fri, 5 Sep 2014 21:17:47 +0000 (14:17 -0700)]
doc: Update logging path to reflect log rotate script default path.

Fixes: #9351
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agoMerge pull request #2407 from ceph/wip-formatter-va
Josh Durgin [Fri, 5 Sep 2014 21:09:51 +0000 (14:09 -0700)]
Merge pull request #2407 from ceph/wip-formatter-va

formatter: clean up dump_format()

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2408 from theanalyst/doc/contributing
Loic Dachary [Fri, 5 Sep 2014 18:59:39 +0000 (20:59 +0200)]
Merge pull request #2408 from theanalyst/doc/contributing

doc: Add a contributing file at the root of repo

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agodoc: Add a contributing file at the root of repo 2408/head
Abhishek Lekshmanan [Fri, 5 Sep 2014 18:04:17 +0000 (23:34 +0530)]
doc: Add a contributing file at the root of repo

Github shows up a `guidelines for contributing` while opening a new pull
request for any repository with a CONTRIBUTING file at the repo
root, which allows for a quick overview to contribute to the
repository.

Currently this file just links to the Submitting Patches and the
documentation start guide.

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agoMerge pull request #2406 from alram/master
Yehuda Sadeh [Fri, 5 Sep 2014 17:48:20 +0000 (10:48 -0700)]
Merge pull request #2406 from alram/master

rgw: add .log to default log path

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add .log to default log path 2406/head
Alexandre Marangone [Fri, 5 Sep 2014 17:36:24 +0000 (10:36 -0700)]
rgw: add .log to default log path

Fixes: #9353
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
10 years agoformatter: clean up dump_format() 2407/head
Yehuda Sadeh [Fri, 5 Sep 2014 17:29:08 +0000 (10:29 -0700)]
formatter: clean up dump_format()

Create a common dump_format_va() function, and make all the different
variants call it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #2329 from theanalyst/f/s3_bucket_loc
Yehuda Sadeh [Fri, 5 Sep 2014 16:06:39 +0000 (09:06 -0700)]
Merge pull request #2329 from theanalyst/f/s3_bucket_loc

WIP: S3: Implementation for S3 Get Bucket Location

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #2405 from dachary/wip-workunits
Loic Dachary [Fri, 5 Sep 2014 15:56:45 +0000 (17:56 +0200)]
Merge pull request #2405 from dachary/wip-workunits

qa: scripts to help test ceph-qa-suite

Reviewed-by: Cheng Cheng <ccheng.leo@gmail.com>
10 years agoqa: scripts to help test ceph-qa-suite 2405/head
Loic Dachary [Fri, 5 Sep 2014 11:40:27 +0000 (13:40 +0200)]
qa: scripts to help test ceph-qa-suite

This workunit will be used by tests as a placeholder that always return
true. This is helpful in tests when a script from the qa/workunits
directory is mandatory but we do not care about testing anything.  For
an example of how it can be used, check
https://github.com/ceph/ceph-qa-suite/pull/120

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agorgw: Implementation for S3 Get Bucket Location 2329/head
Abhishek Lekshmanan [Mon, 25 Aug 2014 08:31:54 +0000 (14:01 +0530)]
rgw: Implementation for S3 Get Bucket Location

S3 API supports getting the location for a bucket, which gives out one
of those geographic zones (US-WEST-1, EU for eg). Also it returns an
empty string for the default region.
(http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html)

Since LocationConstraint corresponds to regions in our case, this API
returns the region, for the "default" region empty string is returned

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agotest/formatter: Add tests for dump_format_ns
Abhishek Lekshmanan [Sat, 30 Aug 2014 08:12:42 +0000 (13:42 +0530)]
test/formatter: Add tests for dump_format_ns

Adding basic unit test to test the new formatter class'
dump_format_ns. Since the functionality only affects XML (and other
implementations mimic dump_format exactly), tests are added for these.
`fmt.close_section()` is avoided in the tests as this calls an
assert (and there is no section to close) and this triggers a test
failure.

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agorgw_formats: dump_format_ns implementation
Abhishek Lekshmanan [Wed, 27 Aug 2014 10:41:53 +0000 (16:11 +0530)]
rgw_formats: dump_format_ns implementation

Since the base formatter was extended with a dump_format_ns class,
implementing this here. For now, this is exactly same as dump_format, as
the concept of ns in json is not used.

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agoFormatter: add a dump_format_ns to base Formatter
Abhishek Lekshmanan [Wed, 27 Aug 2014 06:32:19 +0000 (12:02 +0530)]
Formatter: add a dump_format_ns to base Formatter

`dump_format_ns` is a generic formatter to dump a simple format along
with a namespace. It is `dump_format` with an optional ns. This also
extends the XML formatter with this functionality. This allows creation
of xml tags with ns and a specified format. The JSON Format doesn't
define a ns, and here the functionality is exactly same as that of
`dump_format`

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agoRefactor ErasureCodeLrc::create_ruleset 2398/head
Xiaoxi Chen [Thu, 4 Sep 2014 15:47:51 +0000 (23:47 +0800)]
Refactor ErasureCodeLrc::create_ruleset

Refactor ErasureCodeLrc::create_ruleset
1.Use CrushWrapper instead of crush C-api.
2.Make ruleset_id == rule_id, consist as the behavior in
  CrushWrapper::add_simple_ruleset().

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
10 years agoMerge pull request #2375 from ceph/wip-8648
Yan, Zheng [Fri, 5 Sep 2014 00:56:36 +0000 (08:56 +0800)]
Merge pull request #2375 from ceph/wip-8648

mds: clear objects' dirty flags after log segment is expired

10 years agoMerge pull request #2393 from dachary/wip-warning
David Zafman [Fri, 5 Sep 2014 00:33:21 +0000 (17:33 -0700)]
Merge pull request #2393 from dachary/wip-warning

erasure-code: warning fix

Reviewed-by: David Zafman <dzafman@redhat.com>
10 years agomds: clear objects' dirty flags after log segment is expired 2375/head
Yan, Zheng [Tue, 2 Sep 2014 09:10:41 +0000 (17:10 +0800)]
mds: clear objects' dirty flags after log segment is expired

When standby-replay MDS detects a log segment is expired, it should check
the expired segment's dirty lists and clear corresponding objects' dirty
bits. Otherwise these objects will be pinned in the standby-replay MDS's
cache forever.

Fixes: #8648
Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2399 from ceph/wip-8366
John Wilkins [Thu, 4 Sep 2014 17:51:17 +0000 (10:51 -0700)]
Merge pull request #2399 from ceph/wip-8366

doc: adds a navigational menu for docs

Reviewed-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: fix missing bracket 2399/head
Alfredo Deza [Thu, 4 Sep 2014 01:21:45 +0000 (21:21 -0400)]
doc: fix missing bracket

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agodoc: attempt to get the ayni JS into all head tags
Alfredo Deza [Thu, 4 Sep 2014 00:47:54 +0000 (20:47 -0400)]
doc: attempt to get the ayni JS into all head tags

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agoerasure-code: warning fix 2393/head
Loic Dachary [Thu, 4 Sep 2014 08:14:03 +0000 (10:14 +0200)]
erasure-code: warning fix

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2392 from majianpeng/fix1
Loic Dachary [Thu, 4 Sep 2014 08:04:28 +0000 (10:04 +0200)]
Merge pull request #2392 from majianpeng/fix1

FileStore: Remove unused code.

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agoFileStore: Remove unused code. 2392/head
Ma Jianpeng [Thu, 4 Sep 2014 06:01:20 +0000 (14:01 +0800)]
FileStore: Remove unused code.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
10 years agoMerge pull request #2373 from ceph/wip-9026
Gregory Farnum [Thu, 4 Sep 2014 04:08:15 +0000 (21:08 -0700)]
Merge pull request #2373 from ceph/wip-9026

client: vxattr support for stat

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge remote-tracking branch 'origin/next'
John Spray [Wed, 3 Sep 2014 12:52:32 +0000 (13:52 +0100)]
Merge remote-tracking branch 'origin/next'

10 years agoMerge pull request #2377 from ceph/wip-session-stats
John Spray [Wed, 3 Sep 2014 12:39:25 +0000 (13:39 +0100)]
Merge pull request #2377 from ceph/wip-session-stats

mds: cap and lease count in `session ls` asok

Reviewed-by: Yan, Zheng <ukernel@gmail.com>
10 years agoMerge pull request #2376 from ceph/wip-request-count
John Spray [Wed, 3 Sep 2014 12:39:19 +0000 (13:39 +0100)]
Merge pull request #2376 from ceph/wip-request-count

mds: Fix Session::get_request_count

Reviewed-by: Yan, Zheng <ukernel@gmail.com>
10 years agoclient: vxattr support for rstat 2373/head
Yan, Zheng [Tue, 2 Sep 2014 06:10:52 +0000 (14:10 +0800)]
client: vxattr support for rstat

copy the kernel client code (which uses table to present vxattrs)

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2363 from ceph/wip-9285
Samuel Just [Tue, 2 Sep 2014 21:09:55 +0000 (14:09 -0700)]
Merge pull request #2363 from ceph/wip-9285

osd/ReplicatedPG: do not evict blocked objects

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2343 from ceph/wip-9151
John Spray [Tue, 2 Sep 2014 21:02:59 +0000 (22:02 +0100)]
Merge pull request #2343 from ceph/wip-9151

Wip 9151 + 9152

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2362 from ceph/wip-9294
Samuel Just [Tue, 2 Sep 2014 19:47:51 +0000 (12:47 -0700)]
Merge pull request #2362 from ceph/wip-9294

osd/ReplicatedPG: avoid dereferencing iterator at end()

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2322 from ceph/wip-doc-authentication
John Wilkins [Tue, 2 Sep 2014 18:40:22 +0000 (11:40 -0700)]
Merge pull request #2322 from ceph/wip-doc-authentication

doc: Refactored authentication docs.

Reviewed-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Provided additional detail on daemon-specific caps syntax. 2322/head
John Wilkins [Tue, 2 Sep 2014 18:38:16 +0000 (11:38 -0700)]
doc: Provided additional detail on daemon-specific caps syntax.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Updated Keyring settings from comments and ceph-deploy defaults.
John Wilkins [Tue, 2 Sep 2014 18:37:33 +0000 (11:37 -0700)]
doc: Updated Keyring settings from comments and ceph-deploy defaults.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agoMerge pull request #2372 from dachary/wip-disk-thread-ioprio
Loic Dachary [Tue, 2 Sep 2014 17:18:35 +0000 (19:18 +0200)]
Merge pull request #2372 from dachary/wip-disk-thread-ioprio

documentation: document disk thread ioprio options

Reviewed-by: Volker Voigt <volker.voigt@1und1.de>
10 years agodocumentation: disk thread ioprio options 2372/head
Loic Dachary [Mon, 1 Sep 2014 17:15:57 +0000 (19:15 +0200)]
documentation: disk thread ioprio options

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomon: add MDS metric metadata to health detail 2343/head
John Spray [Mon, 1 Sep 2014 17:43:11 +0000 (18:43 +0100)]
mon: add MDS metric metadata to health detail

This is a bit wonky because the mon health structure expects
a string, and we have a key-val structure, but it's better
to output this somehow than to have it rot as a purely internal
thing.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: add thread to progress queues outside dispatch
John Spray [Wed, 27 Aug 2014 21:36:10 +0000 (22:36 +0100)]
mds: add thread to progress queues outside dispatch

This speeds up processing of queued waiters.

Fixes: #9252
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomon: handle beacon health metrics in MDSMonitor
John Spray [Wed, 27 Aug 2014 18:04:03 +0000 (19:04 +0100)]
mon: handle beacon health metrics in MDSMonitor

Fixes: #9151
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: populate health metrics in beacon
John Spray [Wed, 27 Aug 2014 18:03:40 +0000 (19:03 +0100)]
mds: populate health metrics in beacon

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomessages: add health fields to MMDSBeacon
John Spray [Wed, 27 Aug 2014 18:02:52 +0000 (19:02 +0100)]
messages: add health fields to MMDSBeacon

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: use HeartbeatMap to control beacons
John Spray [Wed, 27 Aug 2014 12:31:27 +0000 (13:31 +0100)]
mds: use HeartbeatMap to control beacons

...so that if something hogs mds_lock without
pinging the heartbeat map, we will stop sending
beacons to the mon and it will have the chance
to recognise that we are laggy.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: const getters in MDLog
John Spray [Tue, 26 Aug 2014 11:53:10 +0000 (12:53 +0100)]
mds: const getters in MDLog

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoinclude/CompatSet: more const-ness
John Spray [Tue, 26 Aug 2014 11:52:38 +0000 (12:52 +0100)]
include/CompatSet: more const-ness

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: promote Beacon to be a Dispatcher
John Spray [Fri, 22 Aug 2014 00:17:55 +0000 (01:17 +0100)]
mds: promote Beacon to be a Dispatcher

This allows it to handle its own MSG_MDS_BEACON
messages from the mon, outside of mds_lock.

This is less important than the sending of beacons
being outside the lock, but still nice to have and
gets all the beacon messaging in one place.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: extract beacon state from MDS lock
John Spray [Thu, 21 Aug 2014 16:54:55 +0000 (17:54 +0100)]
mds: extract beacon state from MDS lock

For clarity, give it its own class for the
state protected by the separate lock too.

Fixes: #9152
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoinclude/CompatSet: make merge const()
John Spray [Thu, 21 Aug 2014 17:46:41 +0000 (18:46 +0100)]
include/CompatSet: make merge const()

With usual shenanigans to deal with [] on map
not being const-safe.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: cap and lease count in `session ls` asok 2377/head
John Spray [Tue, 2 Sep 2014 12:16:03 +0000 (13:16 +0100)]
mds: cap and lease count in `session ls` asok

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: Fix Session::get_request_count 2376/head
John Spray [Tue, 2 Sep 2014 12:15:09 +0000 (13:15 +0100)]
mds: Fix Session::get_request_count

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2366 from dachary/wip-mailmap
Loic Dachary [Mon, 1 Sep 2014 09:24:12 +0000 (11:24 +0200)]
Merge pull request #2366 from dachary/wip-mailmap

mailmap: add .peoplemap

Reviewed-by: M Ranga Swami Reddy <swamireddy@gmail.com>
10 years agoMerge pull request #2370 from ceph/wip-9309
Loic Dachary [Mon, 1 Sep 2014 08:14:57 +0000 (10:14 +0200)]
Merge pull request #2370 from ceph/wip-9309

lockdep: increase max locks (1000 -> 2000)

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agolockdep: increase max locks (1000 -> 2000) 2370/head
Sage Weil [Mon, 1 Sep 2014 00:46:33 +0000 (17:46 -0700)]
lockdep: increase max locks (1000 -> 2000)

We hit the 1000 lock limit on

 ubuntu@teuthology:/a/teuthology-2014-08-31_02:30:01-rados-next-testing-basic-multi/463411

Fixes: #9309
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2369 from dachary/wip-mark-unfound-lost
Sage Weil [Mon, 1 Sep 2014 00:32:42 +0000 (17:32 -0700)]
Merge pull request #2369 from dachary/wip-mark-unfound-lost

documentation: add the mark_unfound_lost delete option

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2368 from dachary/wip-pg-const
Sage Weil [Mon, 1 Sep 2014 00:31:19 +0000 (17:31 -0700)]
Merge pull request #2368 from dachary/wip-pg-const

osd: MissingLoc::get_all_missing is const

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2367 from dachary/wip-early-fail
Sage Weil [Mon, 1 Sep 2014 00:30:35 +0000 (17:30 -0700)]
Merge pull request #2367 from dachary/wip-early-fail

tests: qa/workunits/cephtool/test.sh early fail

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodocumentation: add the mark_unfound_lost delete option 2369/head
Loic Dachary [Sun, 31 Aug 2014 22:33:20 +0000 (00:33 +0200)]
documentation: add the mark_unfound_lost delete option

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosd: MissingLoc::get_all_missing is const 2368/head
Loic Dachary [Sun, 31 Aug 2014 21:01:48 +0000 (23:01 +0200)]
osd: MissingLoc::get_all_missing is const

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agotests: qa/workunits/cephtool/test.sh early fail 2367/head
Loic Dachary [Sun, 31 Aug 2014 20:59:04 +0000 (22:59 +0200)]
tests: qa/workunits/cephtool/test.sh early fail

Add tests to fail as soon as an unexpected condition is met in
test_mon_osd. Otherwise the actual error will be more difficult find in
the logs.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomailmap: add .peoplemap 2366/head
Loic Dachary [Sun, 31 Aug 2014 17:14:55 +0000 (19:14 +0200)]
mailmap: add .peoplemap

In .mailmap, an individual may be represented by multiple mails which
may reflect an organization affiliation change that needs to be
preserved to find out which organization sponsored which commit.

The .peoplemap file aggregates these mails to show a single line for
each person

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2358 from dachary/wip-lrc
Loic Dachary [Sun, 31 Aug 2014 10:52:43 +0000 (12:52 +0200)]
Merge pull request #2358 from dachary/wip-lrc

rename LRC to lrc + preload

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoerasure-code: lowercase LRC plugin name 2358/head
Loic Dachary [Fri, 29 Aug 2014 21:58:34 +0000 (23:58 +0200)]
erasure-code: lowercase LRC plugin name

So that all erasure code plugins are lowercase.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocommon/LogEntry: fix warning on x86_64
Sage Weil [Sun, 31 Aug 2014 05:39:04 +0000 (22:39 -0700)]
common/LogEntry: fix warning on x86_64

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agocommon/LogEntry: fix warning on i386
Sage Weil [Sun, 31 Aug 2014 04:56:31 +0000 (21:56 -0700)]
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>
10 years agoosd/ReplicatedPG: do not evict blocked objects 2363/head
Sage Weil [Sat, 30 Aug 2014 02:27:34 +0000 (19:27 -0700)]
osd/ReplicatedPG: do not evict blocked objects

If the object is blocked, that means we are either still promoting it, or
we are in the process of doing a blocking flush.  In both cases, do not
evict it just yet.  For the promotion case in particular this can cause a
very long op delay because we'll have to restart the promotion, and this
can potentially loop indefinitely.

For the flush case, flushes are generally only blocking when the user
explicitly requests it.  In that case, we are not particularly concerned
that we may delay the objects eventual eviction as the user is probably
controlling that anyway (and even if they aren't, the agent will still
try this object again later).

Fixes: #9285
Reported-by: Wang, Zhiqiang <zhiqiang.wang@intel.com>
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd/ReplicatedPG: avoid dereferencing iterator at end() 2362/head
Sage Weil [Sat, 30 Aug 2014 02:16:56 +0000 (19:16 -0700)]
osd/ReplicatedPG: avoid dereferencing iterator at end()

The preceding loop could terminate with p == snapset.clones.end(), which
we assign to dnewest.  We can't dereference the iterator in that case.

For example:

 start_flush ffe627f3/foo/a/test-rados-api-plana05-22080-18/83 v430'42 uv130 blocking
  snapset b=[b,a]:[a,b]+head
 start_flush no older clones

prev_snapc will be 0, oi.snaps will be [a], p will end up at end(), get
assigned to dnewest, and we'll dereference.  It's only sometime harmful
though because we may still take the right (else) branch...

Fixes: #9294
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2360 from ceph/wip-9281
Sage Weil [Sat, 30 Aug 2014 00:46:26 +0000 (17:46 -0700)]
Merge pull request #2360 from ceph/wip-9281

tools: use cout instead of cerr in journal tool

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoerasure-code: preload LRC plugin
Loic Dachary [Fri, 29 Aug 2014 21:25:34 +0000 (23:25 +0200)]
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>
10 years agoMerge pull request #2359 from dachary/wip-fix-lrc
Loic Dachary [Sat, 30 Aug 2014 00:10:59 +0000 (02:10 +0200)]
Merge pull request #2359 from dachary/wip-fix-lrc

fix lrc tests and prototype

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2338 from ceph/wip-reweight
Sage Weil [Fri, 29 Aug 2014 23:56:40 +0000 (16:56 -0700)]
Merge pull request #2338 from ceph/wip-reweight

mon/OSDMonitor: make reweight_by_* output less misleading

10 years agoerasure-code: use s/get_str_map/get_json_str_map/ 2359/head
Loic Dachary [Fri, 29 Aug 2014 23:44:02 +0000 (01:44 +0200)]
erasure-code: use s/get_str_map/get_json_str_map/

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: mkfs.sh needs to know the plugin directory
Loic Dachary [Fri, 29 Aug 2014 23:43:03 +0000 (01:43 +0200)]
erasure-code: mkfs.sh needs to know the plugin directory

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge remote-tracking branch 'gh/wip-7988'
Sage Weil [Fri, 29 Aug 2014 23:10:16 +0000 (16:10 -0700)]
Merge remote-tracking branch 'gh/wip-7988'

Conflicts:
src/mds/RecoveryQueue.cc

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosd: OSDMap: ordered blacklist on non-classic encode function
Joao Eduardo Luis [Fri, 29 Aug 2014 19:21:25 +0000 (20:21 +0100)]
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>
10 years agoMerge pull request #1921 from dachary/wip-7238-lrc-plugin
Samuel Just [Fri, 29 Aug 2014 21:08:48 +0000 (14:08 -0700)]
Merge pull request #1921 from dachary/wip-7238-lrc-plugin

erasure-code: locally repairable code plugin

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoerasure-code: ECRecPred must be true if all chunks can be recovered 1921/head
Loic Dachary [Wed, 27 Aug 2014 15:05:02 +0000 (17:05 +0200)]
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>
10 years agoerasure-code: LRC plugin documentation
Loic Dachary [Sat, 23 Aug 2014 00:11:34 +0000 (02:11 +0200)]
erasure-code: LRC plugin documentation

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: test LRC pool, profile and crush ruleset
Loic Dachary [Sun, 8 Jun 2014 15:25:41 +0000 (17:25 +0200)]
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>
10 years agoerasure-code: high level LRC configuration
Loic Dachary [Fri, 15 Aug 2014 16:33:38 +0000 (18:33 +0200)]
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>
10 years agoerasure-code: locally repairable code plugin
Loic Dachary [Sun, 8 Jun 2014 12:19:18 +0000 (14:19 +0200)]
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>
10 years agoerasure-code: delegate chunk remapping to the plugin
Loic Dachary [Sun, 24 Aug 2014 18:52:24 +0000 (20:52 +0200)]
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>
10 years agoerasure-code: override the default only if the plugin match
Loic Dachary [Sun, 24 Aug 2014 18:57:16 +0000 (20:57 +0200)]
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>
10 years agoerasure-code: relax profile parameter syntax
Loic Dachary [Sun, 8 Jun 2014 15:08:01 +0000 (17:08 +0200)]
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>
10 years agoerasure-code: add ErasureCodeInterface::get_coding_chunk_count
Loic Dachary [Wed, 6 Aug 2014 14:50:16 +0000 (16:50 +0200)]
erasure-code: add ErasureCodeInterface::get_coding_chunk_count

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agotools: use cout instead of cerr in journal tool 2360/head
John Spray [Fri, 29 Aug 2014 17:34:39 +0000 (18:34 +0100)]
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>
10 years agoMerge pull request #2258 from ceph/wip-mds-recover
John Spray [Fri, 29 Aug 2014 16:19:49 +0000 (17:19 +0100)]
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>
10 years agoMerge pull request #2353 from wonzhq/compile-warn
Sage Weil [Fri, 29 Aug 2014 15:32:59 +0000 (08:32 -0700)]
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>
10 years agomds/RecoveryQueue: do not start prioritized items synchronously 2258/head
Sage Weil [Fri, 29 Aug 2014 15:29:35 +0000 (08:29 -0700)]
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>
10 years agoMerge pull request #2352 from wonzhq/local-mtime
Sage Weil [Fri, 29 Aug 2014 15:18:05 +0000 (08:18 -0700)]
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>
10 years agoMerge pull request #2354 from dachary/wip-9273-mon-preload-erasure-code
Sage Weil [Fri, 29 Aug 2014 15:17:06 +0000 (08:17 -0700)]
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>
10 years agoMerge pull request #2355 from ceph/wip-hadoop
Sage Weil [Fri, 29 Aug 2014 14:11:39 +0000 (07:11 -0700)]
Merge pull request #2355 from ceph/wip-hadoop

Wip hadoop

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2340 from ceph/wip-blacklist-mds
Sage Weil [Fri, 29 Aug 2014 13:55:16 +0000 (06:55 -0700)]
Merge pull request #2340 from ceph/wip-blacklist-mds

mds: restart on -EBLACKLISTED

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoqa: fix+cleanup hadoop wordcount test 2355/head
John Spray [Fri, 29 Aug 2014 12:29:22 +0000 (13:29 +0100)]
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>
10 years agoerasure-code: preload the default plugins in the mon 2354/head
Loic Dachary [Fri, 29 Aug 2014 10:06:49 +0000 (12:06 +0200)]
erasure-code: preload the default plugins in the mon

The commit 9b802701f78288ba4f706c65b853415c69002d27 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>
10 years agoTest: fixing a compile warning in ceph_objectstore_tool.cc 2353/head
Zhiqiang Wang [Fri, 29 Aug 2014 08:39:40 +0000 (16:39 +0800)]
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>