]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoCache tiering: use local_mtime to calculate the age of objects during 2352/head
Zhiqiang Wang [Fri, 29 Aug 2014 08:06:30 +0000 (16:06 +0800)]
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>
10 years agodoc: Added rbd-replay-prep and rbd-replay manpages to block device TOC.
John Wilkins [Fri, 29 Aug 2014 01:07:51 +0000 (18:07 -0700)]
doc: Added rbd-replay-prep and rbd-replay manpages to block device TOC.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Fixed broken hyperlink.
John Wilkins [Fri, 29 Aug 2014 00:45:51 +0000 (17:45 -0700)]
doc: Fixed broken hyperlink.

Fixes: #9116
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Added sysctl max thread count discussion.
John Wilkins [Fri, 29 Aug 2014 00:25:07 +0000 (17:25 -0700)]
doc: Added sysctl max thread count discussion.

Fixes: #6142
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agoMerge pull request #2351 from ceph/wip-9266
Sage Weil [Fri, 29 Aug 2014 00:08:26 +0000 (17:08 -0700)]
Merge pull request #2351 from ceph/wip-9266

client: fix dispatcher ordering (broken fuse)

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoclient: fix dispatcher ordering (broken fuse) 2351/head
John Spray [Thu, 28 Aug 2014 23:53:44 +0000 (00:53 +0100)]
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>
10 years agoMerge pull request #2332 from ceph/wip-8231-forreview
Samuel Just [Thu, 28 Aug 2014 23:37:37 +0000 (16:37 -0700)]
Merge pull request #2332 from ceph/wip-8231-forreview

Wip 8231 forreview

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoFix ceph_scratchtoolpp to create and delete its own pool 2332/head
David Zafman [Thu, 21 Aug 2014 19:23:49 +0000 (12:23 -0700)]
Fix ceph_scratchtoolpp to create and delete its own pool

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoceph_objectstore_tool: Bug fixes and test improvements
David Zafman [Wed, 20 Aug 2014 08:33:45 +0000 (01:33 -0700)]
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>
10 years agoceph_objectstore_tool, test: Implement import-rados feature and unit test code
David Zafman [Wed, 6 Aug 2014 01:26:11 +0000 (18:26 -0700)]
ceph_objectstore_tool, test: Implement import-rados feature and unit test code

Fixes: #8276
Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agotools/rados: Improve trigger for op_size rounding info message
David Zafman [Fri, 8 Aug 2014 01:03:22 +0000 (18:03 -0700)]
tools/rados: Improve trigger for op_size rounding info message

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agotest: ceph_objectstore_tool unit test improvements
David Zafman [Thu, 7 Aug 2014 02:53:43 +0000 (19:53 -0700)]
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>
10 years agoceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes
David Zafman [Thu, 7 Aug 2014 20:31:48 +0000 (13:31 -0700)]
ceph_objectstore_tool: Add operation "rm-past-intervals" for testing purposes

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_objectstore_tool: Add past_intervals to export/import code
David Zafman [Thu, 7 Aug 2014 18:46:08 +0000 (11:46 -0700)]
ceph_objectstore_tool: Add past_intervals to export/import code

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_objectstore_tool: Minor improvements
David Zafman [Thu, 7 Aug 2014 21:11:21 +0000 (14:11 -0700)]
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>
10 years agoceph_objectstore_tool, test: Add list-pgs operations and unit test case
David Zafman [Tue, 5 Aug 2014 19:26:42 +0000 (12:26 -0700)]
ceph_objectstore_tool, test: Add list-pgs operations and unit test case

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoComplete replacement of ceph_filestore_tool and ceph_filestore_dump
David Zafman [Wed, 30 Jul 2014 19:39:49 +0000 (12:39 -0700)]
Complete replacement of ceph_filestore_tool and ceph_filestore_dump
with unified ceph_objectstore_tool

Move list-lost-objects and fix-lost-objects features from
  ceph_filestore_tool to ceph_objectstore_tool as list-lost, fix-lost
Change --type to --op for info, log, export...operations
Add --type for the ObjectStore type (defaults to filestore)
Change --filestore-path to --data-path
Update installation, Makefile.am, and .gitignore
Fix and rename test case to match
  Add some additional invalid option checks

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoRenames and removal towards a unified ceph_objectstore_tool
David Zafman [Wed, 30 Jul 2014 18:22:29 +0000 (11:22 -0700)]
Renames and removal towards a unified ceph_objectstore_tool

Rename ceph_filestore_dump.cc and ceph_filestore_dump.py
Remove ceph_filestore_tool.cc

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump.py: Replace ceph_filestore_dump.sh with better python version
David Zafman [Thu, 19 Jun 2014 18:00:25 +0000 (11:00 -0700)]
ceph_filestore_dump.py: Replace ceph_filestore_dump.sh with better python version

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agotest: ceph_filestore_dump.sh test improvements
David Zafman [Wed, 21 May 2014 19:45:33 +0000 (12:45 -0700)]
test: ceph_filestore_dump.sh test improvements

Add some usage error tests
Don't use the same var in second for loop
Add xattr/omap to rep pool and xattr to ec pool
Add list, get-bytes and set-bytes testing
Add list-attrs and get-attr

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add set-omaphdr object command
David Zafman [Tue, 20 May 2014 18:19:19 +0000 (11:19 -0700)]
ceph_filestore_dump: Add set-omaphdr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add get-omaphdr object command
David Zafman [Tue, 20 May 2014 17:44:37 +0000 (10:44 -0700)]
ceph_filestore_dump: Add get-omaphdr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add rm-omap object command
David Zafman [Tue, 20 May 2014 03:55:47 +0000 (20:55 -0700)]
ceph_filestore_dump: Add rm-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add set-omap object command
David Zafman [Tue, 20 May 2014 03:47:14 +0000 (20:47 -0700)]
ceph_filestore_dump: Add set-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add get-omap object command
David Zafman [Tue, 20 May 2014 03:37:01 +0000 (20:37 -0700)]
ceph_filestore_dump: Add get-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add rm-attr object command
David Zafman [Tue, 20 May 2014 01:33:24 +0000 (18:33 -0700)]
ceph_filestore_dump: Add rm-attr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add set-attr object command
David Zafman [Tue, 20 May 2014 01:17:27 +0000 (18:17 -0700)]
ceph_filestore_dump: Add set-attr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add get-attr object command
David Zafman [Thu, 15 May 2014 22:50:48 +0000 (15:50 -0700)]
ceph_filestore_dump: Add get-attr object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add set-bytes object command
David Zafman [Thu, 15 May 2014 00:52:09 +0000 (17:52 -0700)]
ceph_filestore_dump: Add set-bytes object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add get-bytes object command
David Zafman [Thu, 15 May 2014 00:51:29 +0000 (17:51 -0700)]
ceph_filestore_dump: Add get-bytes object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add list-omap object command
David Zafman [Thu, 15 May 2014 00:50:16 +0000 (17:50 -0700)]
ceph_filestore_dump: Add list-omap object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add list-attrs object command
David Zafman [Thu, 15 May 2014 01:32:42 +0000 (18:32 -0700)]
ceph_filestore_dump: Add list-attrs object command

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add --type list to output objects in a pg in json
David Zafman [Thu, 15 May 2014 00:39:17 +0000 (17:39 -0700)]
ceph_filestore_dump: Add --type list to output objects in a pg in json

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add remove object command and usage for new commands
David Zafman [Thu, 15 May 2014 00:44:31 +0000 (17:44 -0700)]
ceph_filestore_dump: Add remove object command and usage for new commands

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add utility function get_fd_data()
David Zafman [Sat, 7 Jun 2014 00:05:53 +0000 (17:05 -0700)]
ceph_filestore_dump: Add utility function get_fd_data()

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Fail import/export with a tty for stdin/stdout
David Zafman [Tue, 20 May 2014 01:16:52 +0000 (18:16 -0700)]
ceph_filestore_dump: Fail import/export with a tty for stdin/stdout

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filstore_dump: Save if stdout is a tty and add routine to clean binary strings
David Zafman [Tue, 20 May 2014 18:56:20 +0000 (11:56 -0700)]
ceph_filstore_dump: Save if stdout is a tty and add routine to clean binary strings

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agocommon: Add missing ghobject_t::decode() for json
David Zafman [Wed, 14 May 2014 22:30:11 +0000 (15:30 -0700)]
common: Add missing ghobject_t::decode() for json

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap
David Zafman [Wed, 14 May 2014 22:37:17 +0000 (15:37 -0700)]
ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoos: Add optional flags to generic ObjectStore creation (SKIP_JOURNAL_REPLAY
David Zafman [Wed, 14 May 2014 22:41:15 +0000 (15:41 -0700)]
os: Add optional flags to generic ObjectStore creation (SKIP_JOURNAL_REPLAY
and SKIP_MOUNT_OMAP)

Only FileStore cares about these flags, so passed on during create()

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Improve debug output by showing actual offset
David Zafman [Sat, 17 May 2014 01:20:11 +0000 (18:20 -0700)]
ceph_filestore_dump: Improve debug output by showing actual offset

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoceph_filestore_dump: Use cerr now that we aren't closing stderr
David Zafman [Wed, 14 May 2014 19:36:37 +0000 (12:36 -0700)]
ceph_filestore_dump: Use cerr now that we aren't closing stderr

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agocommon,ceph_filestore_dump: Add ability for utilities to suppress library dout output
David Zafman [Wed, 14 May 2014 19:42:21 +0000 (12:42 -0700)]
common,ceph_filestore_dump: Add ability for utilities to suppress library dout output

Suppress dout output with CODE_ENVIRONMENT_UTILITY_NODOUT
ceph_filestore_dump turns on dout output if --debug specified
When used it can still be enable with --log-to-stderr --err-to-stderr

Signed-off-by: David Zafman <david.zafman@inktank.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 28 Aug 2014 22:30:24 +0000 (15:30 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/osd/ReplicatedPG.cc

10 years agodoc/install/manual-deployment: move 'done' comment up
Sage Weil [Thu, 28 Aug 2014 21:34:27 +0000 (14:34 -0700)]
doc/install/manual-deployment: move 'done' comment up

It's the same for upstart and sysvinit.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge branch 'master' of git://github.com/flaf/ceph
Sage Weil [Thu, 28 Aug 2014 21:27:12 +0000 (14:27 -0700)]
Merge branch 'master' of git://github.com/flaf/ceph

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2248 from theanalyst/wip-8112
Sage Weil [Thu, 28 Aug 2014 21:24:11 +0000 (14:24 -0700)]
Merge pull request #2248 from theanalyst/wip-8112

rgw: move generic server usage after all options

10 years agoMerge pull request #2336 from wonzhq/release-op-ctx-lock
Samuel Just [Thu, 28 Aug 2014 20:37:08 +0000 (13:37 -0700)]
Merge pull request #2336 from wonzhq/release-op-ctx-lock

osd: Remove extra call to release_op_ctx_locks in eval_repop

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2350 from ceph/wip-8718
Sage Weil [Thu, 28 Aug 2014 19:42:00 +0000 (12:42 -0700)]
Merge pull request #2350 from ceph/wip-8718

rgw: don't try to authenticate a CORS preflight request

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2348 from athanatos/wip-9054
Sage Weil [Thu, 28 Aug 2014 19:40:16 +0000 (12:40 -0700)]
Merge pull request #2348 from athanatos/wip-9054

Wip 9054

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2294 from rootfs/wip-java-pom
Gregory Farnum [Thu, 28 Aug 2014 18:55:41 +0000 (11:55 -0700)]
Merge pull request #2294 from rootfs/wip-java-pom

add pom.xml so to deploy the libcephfs to maven repository.

Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2341 from dachary/wip-osd-crush
Sage Weil [Thu, 28 Aug 2014 18:52:12 +0000 (11:52 -0700)]
Merge pull request #2341 from dachary/wip-osd-crush

tests: reduce osd-crush.sh execution time

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2342 from ceph/wip-mds-namespace
Sage Weil [Thu, 28 Aug 2014 18:51:16 +0000 (11:51 -0700)]
Merge pull request #2342 from ceph/wip-mds-namespace

Wip mds namespace

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2349 from athanatos/wip-9240
Sage Weil [Thu, 28 Aug 2014 18:49:08 +0000 (11:49 -0700)]
Merge pull request #2349 from athanatos/wip-9240

Wip 9240

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorgw: don't try to authenticate a CORS preflight request 2350/head
Yehuda Sadeh [Thu, 28 Aug 2014 00:44:18 +0000 (17:44 -0700)]
rgw: don't try to authenticate a CORS preflight request

Fixes: #8718
Backport: firefly

CORS preflight requests don't need to be authenticated. Treat them as
coming from anonymous user.

Reported-by: Robert Hubbard <bobby.hubbard@garmin.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #2335 from ceph/wip-9218 6495f898acd71e1432f49940c63bd6925bf9b1d8
Samuel Just [Thu, 28 Aug 2014 18:30:31 +0000 (11:30 -0700)]
Merge pull request #2335 from ceph/wip-9218

osd: fix osd_tp shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2347 from athanatos/wip-9205
Sage Weil [Thu, 28 Aug 2014 18:19:54 +0000 (11:19 -0700)]
Merge pull request #2347 from athanatos/wip-9205

OSD::session_notify_pg_create: requeue at the start of the queue

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2346 from athanatos/wip-8777
Sage Weil [Thu, 28 Aug 2014 18:19:09 +0000 (11:19 -0700)]
Merge pull request #2346 from athanatos/wip-8777

PG: mark_log_for_rewrite on resurrection

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2345 from athanatos/wip-9259
Sage Weil [Thu, 28 Aug 2014 18:18:52 +0000 (11:18 -0700)]
Merge pull request #2345 from athanatos/wip-9259

PG::can_discard_op: do discard old subopreplies

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge branch 'wip-8639'
Sage Weil [Thu, 28 Aug 2014 17:59:40 +0000 (10:59 -0700)]
Merge branch 'wip-8639'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agotest/mon/*: prime mon with initial command before injection
Sage Weil [Thu, 28 Aug 2014 17:59:18 +0000 (10:59 -0700)]
test/mon/*: prime mon with initial command before injection

The osdmonitor_prepare_command is very fragile.  Send an initial command
to the mon beforehand.  This seems to prevent the initial command from
getting combined into an early mon proposal with some other stuff.

Alternatively, we could remove these tests and this mechanism entirely as
it is likely to great in the future when the next set of mon changes are
made, but they have shown themselves to be useful it catching other
regressions, so we'll patch them up for a bit longer.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2344 from ceph/wip-8863
Samuel Just [Thu, 28 Aug 2014 17:34:10 +0000 (10:34 -0700)]
Merge pull request #2344 from ceph/wip-8863

osd/PG: fix crash from second backfill reservation rejection

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2297 from ceph/wip-9173
John Spray [Thu, 28 Aug 2014 16:20:20 +0000 (17:20 +0100)]
Merge pull request #2297 from ceph/wip-9173

Wip 9173

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2299 from dachary/wip-jerasure-upgrade
Loic Dachary [Thu, 28 Aug 2014 16:10:12 +0000 (18:10 +0200)]
Merge pull request #2299 from dachary/wip-jerasure-upgrade

erasure-code: jerasure upgrade

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomds: remove `using namespace std` in headers 2342/head
John Spray [Thu, 28 Aug 2014 12:41:21 +0000 (13:41 +0100)]
mds: remove `using namespace std` in headers

Avoid polluting global namespace: .cc files should
do the `using` if they want it.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomessages: remove `using namespace std` in headers
John Spray [Thu, 28 Aug 2014 12:40:34 +0000 (13:40 +0100)]
messages: remove `using namespace std` in headers

Avoid polluting global namespace: .cc files should
do the `using` if they want it.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agotests: reduce osd-crush.sh execution time 2341/head
Loic Dachary [Thu, 28 Aug 2014 10:47:03 +0000 (12:47 +0200)]
tests: reduce osd-crush.sh execution time

A loop creating 255 crush rulesets via the command line takes
minutes. It is replaced by the generation of a crushmap instead.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: assert the PluginRegistry lock is held when it must 2299/head
Loic Dachary [Sat, 23 Aug 2014 09:07:29 +0000 (11:07 +0200)]
erasure-code: assert the PluginRegistry lock is held when it must

Add lock to the preload method and assert that it is held by methods
requiring it. Although preload is called at bootstrap and does not
require the lock, adding it does not hurt and makes the lock policy
clearer to understand.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: add Ceph version check to plugins
Loic Dachary [Thu, 21 Aug 2014 16:38:52 +0000 (18:38 +0200)]
erasure-code: add Ceph version check to plugins

Add the __erasure_code_version function to all plugins, to return the
Ceph version against which they have been compiled. When a plugin is
loaded, an error is thrown if the version of the plugin does not match
the version of the daemon loading it.

If the symbol does not exist, which will be true of older plugins, set
the version to "an older version" so it never matches.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: implement ErasureCodePluginRegistry::remove
Loic Dachary [Thu, 21 Aug 2014 16:37:14 +0000 (18:37 +0200)]
erasure-code: implement ErasureCodePluginRegistry::remove

Which is symmetric to the add method and used for test.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: wrap lines for emacs compile command
Loic Dachary [Thu, 21 Aug 2014 16:35:52 +0000 (18:35 +0200)]
erasure-code: wrap lines for emacs compile command

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: jerasure preloads the plugin variant
Loic Dachary [Thu, 21 Aug 2014 16:31:02 +0000 (18:31 +0200)]
erasure-code: jerasure preloads the plugin variant

The variant selection depending on the available CPU features is
encapsulated in a helper. The helper is used in the factory() method and
in the load() method.

The factory() method may load a variant that is not the default, for
benchmark purposes. Such a variant is not preloaded by the load() method
and upgrading while running may be problematic. However, running with a
non standard variant is used for benchmarking and upgrades in this
context are not a concern.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: add Red Hat to copyright notices
Loic Dachary [Thu, 21 Aug 2014 16:28:30 +0000 (18:28 +0200)]
erasure-code: add Red Hat to copyright notices

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: remove unused errno.h include
Loic Dachary [Thu, 21 Aug 2014 16:27:06 +0000 (18:27 +0200)]
erasure-code: remove unused errno.h include

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: add directory to plugin init functions
Loic Dachary [Thu, 21 Aug 2014 16:22:18 +0000 (18:22 +0200)]
erasure-code: add directory to plugin init functions

The prototype of the init functions of erasure coded plugins is changed
from

   int __erasure_code_init(char *plugin_name)

to

   int __erasure_code_init(char *plugin_name, char *directory)

The jerasure plugin will find optimized variants in this directory and
load them. The load() and preload() functions of
ErasureCodePluginRegistry only use a directory instead of a more generic
parameters map. The parameters map was only used for the directory entry
anyway.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: preload the isa plugin by default
Loic Dachary [Thu, 21 Aug 2014 13:19:22 +0000 (15:19 +0200)]
erasure-code: preload the isa plugin by default

But only do so when it has been compiled because a recent enough yasm
has been found.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agodoc: Update docs about OSD benchmark syntax
Wido den Hollander [Thu, 28 Aug 2014 06:18:16 +0000 (08:18 +0200)]
doc: Update docs about OSD benchmark syntax

10 years agoRevert "doc: Update docs about OSD benchmark syntax"
Wido den Hollander [Thu, 28 Aug 2014 06:16:03 +0000 (08:16 +0200)]
Revert "doc: Update docs about OSD benchmark syntax"

This reverts commit 36f15c3026debd808920a04bc3a60c96b119405b.

Commit included submodule change which was not supposed to happen.

10 years agodoc: Update docs about OSD benchmark syntax
Wido den Hollander [Thu, 28 Aug 2014 06:12:30 +0000 (08:12 +0200)]
doc: Update docs about OSD benchmark syntax

10 years agoMerge pull request #2310 from ceph/wip-9148
Sage Weil [Thu, 28 Aug 2014 00:26:34 +0000 (17:26 -0700)]
Merge pull request #2310 from ceph/wip-9148

Wip 9148

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoPG::can_discard_op: do discard old subopreplies 2345/head
Samuel Just [Wed, 27 Aug 2014 23:21:41 +0000 (16:21 -0700)]
PG::can_discard_op: do discard old subopreplies

Otherwise, a sub_op_reply from a previous interval can stick around
until we either one day go active again and get rid of it or delete the
pg which is holding it on its waiting_for_active list.  While it sticks
around futily waiting for the pg to once more go active, it will cause
harmless slow request warnings.

Fixes: #9259
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agocivetweb: update submodule 2310/head
Yehuda Sadeh [Mon, 25 Aug 2014 17:33:23 +0000 (10:33 -0700)]
civetweb: update submodule

Add access log api

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #2339 from leseb/sample-ceph-conf-addition
Sage Weil [Wed, 27 Aug 2014 21:43:33 +0000 (14:43 -0700)]
Merge pull request #2339 from leseb/sample-ceph-conf-addition

sample.ceph.conf: some updates

10 years agomon: flush paxos write on shutdown
Sage Weil [Mon, 25 Aug 2014 04:10:27 +0000 (21:10 -0700)]
mon: flush paxos write on shutdown

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: WRITING != WRITING_PREVIOUS
Sage Weil [Mon, 25 Aug 2014 04:01:07 +0000 (21:01 -0700)]
mon/Paxos: WRITING != WRITING_PREVIOUS

This distinction is important: the update-previous state should not be
writeable, as reflected by PaxosService::is_writeable().

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: _reset() before updating state
Sage Weil [Thu, 21 Aug 2014 23:18:01 +0000 (16:18 -0700)]
mon: _reset() before updating state

In _reset() we call Paxos::restart(), which waits for commit completion,
and assumes the state hasn't been twiddled yet.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: flush before scrub
Sage Weil [Thu, 21 Aug 2014 19:19:18 +0000 (12:19 -0700)]
mon: flush before scrub

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: flush io on reset()
Sage Weil [Thu, 21 Aug 2014 03:57:56 +0000 (20:57 -0700)]
mon/Paxos: flush io on reset()

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: make backend write async
Sage Weil [Tue, 19 Aug 2014 23:48:34 +0000 (16:48 -0700)]
mon/Paxos: make backend write async

Move into the WRITING state and do the write to leveldb (or whatever the
backend is) asynchronously.

A few tricks here:
 - we can't do the is_updating() state check because we will always be in
   REFRESH.  Instead, make commit_proposal() tolerate the case where it is
   called but the top proposal isn't the one we just did (or the list is
   empty).  This makes the callers simpler.
 - do_refresh() may call bootstrap.  If we do bootstrap while in REFRESH,
   don't do a sync/flush on the backend store because *we* are async
   completion thread and we'll deadlock.  All other callers need to wait
   for this, though!

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos[Service]: allow reads during WRITING state
Sage Weil [Tue, 19 Aug 2014 23:45:46 +0000 (16:45 -0700)]
mon/Paxos[Service]: allow reads during WRITING state

The REFRESH state is not readable; that's when we are re-reading our state
out of leveldb, and we hold the mon_lock during the period.  So, strictly
speaking, it doesn't matter whether we include it here since none of these
call sites would be visited while in that state.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: add writing and refresh states
Sage Weil [Tue, 19 Aug 2014 23:44:06 +0000 (16:44 -0700)]
mon/Paxos: add writing and refresh states

The new transition will be

 (updating or updating-previous) -> writing -> refresh -> active

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: move post-commit finish work into commit_finish()
Sage Weil [Sun, 17 Aug 2014 05:29:04 +0000 (22:29 -0700)]
mon/Paxos: move post-commit finish work into commit_finish()

The main change here is that we are merging the singleton and clustered
finish code together.  This is mostly a code shuffle, except for one
semantic change: we now trigger the commit waiters before finish_round()
in the singleton case, whereas before we did not.  I don't think there
was a specific reason why it differed from the clustered case.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: break commit() into two pieces
Sage Weil [Sun, 17 Aug 2014 05:22:01 +0000 (22:22 -0700)]
mon/Paxos: break commit() into two pieces

One part happens before the txn starts, the other after.  Move all of the
internal state update to the bottom half.  Eventually this will matter.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/MonitorDBStore: assert closed in destructor
Sage Weil [Wed, 20 Aug 2014 04:23:36 +0000 (21:23 -0700)]
mon/MonitorDBStore: assert closed in destructor

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/MonitorDBStore: drop useless ctor
Sage Weil [Sun, 17 Aug 2014 05:11:59 +0000 (22:11 -0700)]
mon/MonitorDBStore: drop useless ctor

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/MonitorDBStore: add async queue_transaction()
Sage Weil [Sun, 10 Aug 2014 22:19:06 +0000 (15:19 -0700)]
mon/MonitorDBStore: add async queue_transaction()

Do the transaction async, and then trigger a callback.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/MonitorDBStore: add close() method
Sage Weil [Sun, 10 Aug 2014 22:17:45 +0000 (15:17 -0700)]
mon/MonitorDBStore: add close() method

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: interact with MonitorDBStore::Transactions by shared_ptr Ref
Sage Weil [Sun, 10 Aug 2014 22:08:33 +0000 (15:08 -0700)]
mon: interact with MonitorDBStore::Transactions by shared_ptr Ref

TransactionRef everywhere!

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agocommon/Finisher: fix perfcounter
Sage Weil [Wed, 20 Aug 2014 04:29:41 +0000 (21:29 -0700)]
common/Finisher: fix perfcounter

Make sure we add in the nubmer of elements when we queue them
from a list or deque or vector.

Fix the type to be a counter.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/OSDMonitor: fix double-free on old MOSDBoot
Sage Weil [Tue, 19 Aug 2014 23:43:02 +0000 (16:43 -0700)]
mon/OSDMonitor: fix double-free on old MOSDBoot

send_latest() does an m->put().

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>