]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoUpdate OSDMonitor.cc 5302/head
renhwztetecs [Tue, 21 Jul 2015 10:55:00 +0000 (18:55 +0800)]
Update OSDMonitor.cc

OSDMonitor::get_pools_health(), s/objects/bytes/

Fixes: #12402
Signed-off-by: ren.huanwen@zte.com.cn
10 years agoMerge pull request #5294 from ceph/wip-12354
Gregory Farnum [Tue, 21 Jul 2015 09:46:34 +0000 (10:46 +0100)]
Merge pull request #5294 from ceph/wip-12354

client: fix directory fsync

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #5288 from hjwsm1989/pgmonitor-overflow
Kefu Chai [Tue, 21 Jul 2015 09:10:50 +0000 (17:10 +0800)]
Merge pull request #5288 from hjwsm1989/pgmonitor-overflow

mon/PGMonitor: avoid overflow when checking num_objects against the threshold

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #5297 from ceph/wip-7647 5363/head
Orit Wasserman [Tue, 21 Jul 2015 07:02:12 +0000 (09:02 +0200)]
Merge pull request #5297 from ceph/wip-7647

rgw: avoid using slashes for generated secret keys

10 years agorgw: avoid using slashes for generated secret keys 5297/head
Yehuda Sadeh [Tue, 21 Jul 2015 03:27:33 +0000 (20:27 -0700)]
rgw: avoid using slashes for generated secret keys

Just use plain alphanumeric characterset.

Fixes: #7647
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoclient: fix directory fsync 5294/head
Yan, Zheng [Mon, 20 Jul 2015 08:46:39 +0000 (16:46 +0800)]
client: fix directory fsync

When opening a regular file, fuse assigns a 'struct Fh' pointer to
fuse_file_info::fh. but when openning a directory, fuse assigns a
'struct dir_result_t' to fuse_file_info::fh. So we need a seperate
function for fsyncdir (cast fuse_file_info::fh to a struct
dir_result_t pointer)

Fixes: #12354
Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #5291 from zhouyuan/rgw_s3_obj_version
Yehuda Sadeh [Mon, 20 Jul 2015 16:56:13 +0000 (09:56 -0700)]
Merge pull request #5291 from zhouyuan/rgw_s3_obj_version

rgw: doc: Mark S3 object version API as supported

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: doc: Mark S3 object version API as supported 5291/head
Yuan Zhou [Mon, 20 Jul 2015 07:37:09 +0000 (15:37 +0800)]
rgw: doc: Mark S3 object version API as supported

S3 object version is already in since Hammer.
Ref: http://marc.info/?l=ceph-devel&m=143715290627682

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
10 years ago mon/PGMonitor: avoid uint64_t overflow when checking pool 'target/max' status. 5288/head
huangjun [Mon, 20 Jul 2015 02:50:20 +0000 (10:50 +0800)]
  mon/PGMonitor: avoid uint64_t overflow when checking pool 'target/max' status.
Fixes: #12401
Signed-off-by: huangjun <hjwsm1989@gmail.com>
10 years agoMerge pull request #5282 from ceph/wip-fix-test-mon_deprecated_commands
Kefu Chai [Sat, 18 Jul 2015 17:07:16 +0000 (01:07 +0800)]
Merge pull request #5282 from ceph/wip-fix-test-mon_deprecated_commands

qa/workunits: cephtool: take EOPNOTSUPP as an alias of ENOTSUP

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoqa/workunits: cephtool: take EOPNOTSUPP as an alias of ENOTSUP 5282/head
Kefu Chai [Sat, 18 Jul 2015 16:13:26 +0000 (00:13 +0800)]
qa/workunits: cephtool: take EOPNOTSUPP as an alias of ENOTSUP

the proble breaks `test_mon_deprecated_commands` on ubuntu precise,
on the python shipped with ubuntu precise, errno.errorcode[95]
evalutes to `EOPNOTSUPP` but not `ENOTSUP`. but these two errnos
are equal in glibc.

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #5253 from ceph/wip-12262
David Zafman [Fri, 17 Jul 2015 22:58:14 +0000 (15:58 -0700)]
Merge pull request #5253 from ceph/wip-12262

Bug  fix for rados export
Add rados purge command
Fix and add rados tool testing to make check

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #5274 from zhouyuan/rgw_api_link
Sage Weil [Fri, 17 Jul 2015 21:22:52 +0000 (17:22 -0400)]
Merge pull request #5274 from zhouyuan/rgw_api_link

rgw: doc: adding S3/Swift API link

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agoMerge pull request #5281 from joehandzik/copyright_mailmap_update
Sage Weil [Fri, 17 Jul 2015 21:18:08 +0000 (17:18 -0400)]
Merge pull request #5281 from joehandzik/copyright_mailmap_update

doc: Adding Hewlett-Packard copyright messages

10 years agoMerge pull request #5270 from dachary/wip-releases
Sage Weil [Fri, 17 Jul 2015 20:50:43 +0000 (16:50 -0400)]
Merge pull request #5270 from dachary/wip-releases

doc: add v9.0.2 to the release timeline

10 years agodoc: Adding Hewlett-Packard copyright messages to files containing more than minor... 5281/head
Joe Handzik [Fri, 17 Jul 2015 19:43:45 +0000 (14:43 -0500)]
doc: Adding Hewlett-Packard copyright messages to files containing more than minor enhancements and build scripting

Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com>
10 years agotest: Make test_rados_tool.sh part of make check 5253/head
David Zafman [Wed, 15 Jul 2015 04:03:23 +0000 (21:03 -0700)]
test: Make test_rados_tool.sh part of make check

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agocommon, tools, test: Add "rados purge" feature to remove all objects from a pool
David Zafman [Tue, 14 Jul 2015 02:07:07 +0000 (19:07 -0700)]
common, tools, test: Add "rados purge" feature to remove all objects from a pool

This required creating an Object type which is a pair of strings an
object id and object namespace.  Functionally, nothing has changed
with regards to the bench and cleanup command semantics.  Those
commands still allow operation in the default or a specified namespace.

Fixes: #12262
Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoMerge pull request #5052 from ceph/wip-11815-restore-crushmap
Joao Eduardo Luis [Fri, 17 Jul 2015 15:50:25 +0000 (16:50 +0100)]
Merge pull request #5052 from ceph/wip-11815-restore-crushmap

tools: add a tool to restore crush map after a faulty one is injected

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
10 years agoMerge pull request #5246 from t-miyamae/wip-mshec-fixlogic3
Loic Dachary [Fri, 17 Jul 2015 13:49:14 +0000 (15:49 +0200)]
Merge pull request #5246 from t-miyamae/wip-mshec-fixlogic3

erasure code: shec performance optimization by SIMD instructions

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #5273 from wonzhq/rados-df
Kefu Chai [Fri, 17 Jul 2015 11:29:34 +0000 (19:29 +0800)]
Merge pull request #5273 from wonzhq/rados-df

rados.cc: fix an issue in the output of the 'rados df' command

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agotools: ceph-monstore-update-crush: fail early if mon's running 5052/head
Joao Eduardo Luis [Mon, 13 Jul 2015 14:05:50 +0000 (15:05 +0100)]
tools: ceph-monstore-update-crush: fail early if mon's running

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agotools: ceph_monstore_tool: describe behavior of rewrite command
Joao Eduardo Luis [Mon, 13 Jul 2015 11:35:13 +0000 (12:35 +0100)]
tools: ceph_monstore_tool: describe behavior of rewrite command

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agoosd/OSDMap: fix a typo in the comment
Kefu Chai [Thu, 25 Jun 2015 07:26:19 +0000 (15:26 +0800)]
osd/OSDMap: fix a typo in the comment

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoosd/OSDMap: remove unused dump_json()
Kefu Chai [Thu, 25 Jun 2015 07:25:19 +0000 (15:25 +0800)]
osd/OSDMap: remove unused dump_json()

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agopackage ceph-monstore-update-crush.sh
Kefu Chai [Tue, 23 Jun 2015 12:30:23 +0000 (20:30 +0800)]
package ceph-monstore-update-crush.sh

Fixes: #11815
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agotest: add a test to exercise ceph-monstore-update-crush.sh
Kefu Chai [Fri, 19 Jun 2015 15:15:58 +0000 (23:15 +0800)]
test: add a test to exercise ceph-monstore-update-crush.sh

Fixes: #11815
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agotools: add ceph-monstore-update-crush.sh
Kefu Chai [Tue, 23 Jun 2015 12:30:02 +0000 (20:30 +0800)]
tools: add ceph-monstore-update-crush.sh

Fixes: #11815
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoPendingReleaseNotes: add the notes about osdmaptool
Kefu Chai [Mon, 29 Jun 2015 15:44:02 +0000 (23:44 +0800)]
PendingReleaseNotes: add the notes about osdmaptool

* its '--dump-json' option is replaced by '--dump json'

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agotool/osdmaptool: replace --dump-json with --dump
Kefu Chai [Thu, 25 Jun 2015 07:20:17 +0000 (15:20 +0800)]
tool/osdmaptool: replace --dump-json with --dump

* --dump will accept a formatter argument.

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agotools/ceph-monstore-tools: add rewrite command
Kefu Chai [Fri, 19 Jun 2015 14:57:57 +0000 (22:57 +0800)]
tools/ceph-monstore-tools: add rewrite command

"rewrite" command will
 - add a new osdmap version to update current osdmap held by OSDMonitor
 - add a new paxos version, as a proposal it will
   * rewrite all osdmap epochs from specified epoch to  the last_committed
     one with the specified crush map.
   * add the new osdmap which is added just now
so the leader monitor can trigger a recovery process to apply the transaction
to all monitors in quorum, and hence bring them back to normal after being
injected with a faulty crushmap.

Fixes: #11815
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4807 from dachary/wip-11814-erasure-code-ruleset
Kefu Chai [Fri, 17 Jul 2015 10:25:42 +0000 (18:25 +0800)]
Merge pull request #4807 from dachary/wip-11814-erasure-code-ruleset

mon: validate implicit erasure code crush ruleset

Reviewed-by: Takeshi Miyamae <miyamae.takeshi@jp.fujitsu.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agorados.cc: fix an issue in the output of the 'rados df' command 5273/head
Zhiqiang Wang [Fri, 17 Jul 2015 03:28:19 +0000 (11:28 +0800)]
rados.cc: fix an issue in the output of the 'rados df' command

The output doesn't indent correctly without this fix. Right align the df
stats with their headers. Before this change some of them are 1
character off, and with a strange 'category' column.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
10 years agorgw: doc: adding S3/Swift API link 5274/head
Yuan Zhou [Fri, 17 Jul 2015 06:02:36 +0000 (14:02 +0800)]
rgw: doc: adding S3/Swift API link

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
10 years agoerasure code: shec add ceph-erasure-code-corpus 5246/head
Takeshi Miyamae [Fri, 17 Jul 2015 04:42:08 +0000 (13:42 +0900)]
erasure code: shec add ceph-erasure-code-corpus

Signed-off-by: Takeshi Miyamae <miyamae.takeshi@jp.fujitsu.com>
10 years agoMerge pull request #5260 from ceph/wip-12297-readdir
Yan, Zheng [Fri, 17 Jul 2015 01:14:36 +0000 (09:14 +0800)]
Merge pull request #5260 from ceph/wip-12297-readdir

DNM Client: check dir is still complete after dropping locks in _readdir_cache_cb

10 years agodoc: add v9.0.2 to the release timeline 5270/head
Loic Dachary [Thu, 16 Jul 2015 22:28:52 +0000 (00:28 +0200)]
doc: add v9.0.2 to the release timeline

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agodoc/release-notes: v9.0.2
Sage Weil [Thu, 16 Jul 2015 19:17:44 +0000 (15:17 -0400)]
doc/release-notes: v9.0.2

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #5268 from dachary/wip-ceph-port
David Zafman [Thu, 16 Jul 2015 19:17:34 +0000 (12:17 -0700)]
Merge pull request #5268 from dachary/wip-ceph-port

tests: test/cephtool-test-mon.sh uses 7202 7203 and 7204

Reviewed-by: David Zafman <dzafman@redhat.com>
10 years agotest: test_rados_tool.sh update due to new import/export semantics
David Zafman [Wed, 15 Jul 2015 00:47:24 +0000 (17:47 -0700)]
test: test_rados_tool.sh update due to new import/export semantics

Remove redundant check for rados binary
No longer use the attr command so remove check

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoMerge pull request #5266 from ceph/wip-ftbfs-cls-cephfs
Loic Dachary [Thu, 16 Jul 2015 19:02:54 +0000 (21:02 +0200)]
Merge pull request #5266 from ceph/wip-ftbfs-cls-cephfs

cls: fix the build on i386

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: test/cephtool-test-mon.sh uses 7202 7203 and 7204 5268/head
Loic Dachary [Thu, 16 Jul 2015 18:32:39 +0000 (20:32 +0200)]
tests: test/cephtool-test-mon.sh uses 7202 7203 and 7204

When running 3 mons, vstart uses ports starting from CEPH_PORT=7202 and
increments to 7203 for the second mon and 7204 for the third. Add a
comment showing the port number. The method for a test to figure out
which port is free is to grep for the port and if nothing matches, use
it. The grep will match 7204 and 7203 and 7202 from the comment and
reduce the chances of someone using 7203 because it was nowhere to be
found in the sources.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge branch 'wip-10507'
Joao Eduardo Luis [Thu, 16 Jul 2015 17:40:57 +0000 (18:40 +0100)]
Merge branch 'wip-10507'

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agomessages: MForward: get() message reference
Joao Eduardo Luis [Tue, 14 Jul 2015 15:52:35 +0000 (16:52 +0100)]
messages: MForward: get() message reference

Don't simply put() a reference if it has gone unclaimed without
get()'ing it first. This can cause nefarious consequences for those
users of MForward that do not expect this to happen.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: dump function as private
Joao Eduardo Luis [Tue, 30 Jun 2015 14:52:08 +0000 (15:52 +0100)]
mon: MonOpRequest: dump function as private

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: services: assert on unexpected op request type
Joao Eduardo Luis [Fri, 26 Jun 2015 09:29:04 +0000 (10:29 +0100)]
mon: services: assert on unexpected op request type

Ensures some type safety by asserting on the request type.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: set op request type during dispatch
Joao Eduardo Luis [Fri, 26 Jun 2015 09:28:36 +0000 (10:28 +0100)]
mon: Monitor: set op request type during dispatch

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: allow setting the op type
Joao Eduardo Luis [Fri, 26 Jun 2015 09:21:49 +0000 (10:21 +0100)]
mon: MonOpRequest: allow setting the op type

When we introduced the MonOpRequest in the monitor and moved pretty much
every single function receiving messages in their arguments to take op
requests, we basically lost the type safety that was guaranteed from
Monitor::dispatch().

This patch adds an op_type field to the op request, as an easy fix for
this now lacking safety.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: drop PaxoServiceMessage reply functions
Joao Eduardo Luis [Wed, 24 Jun 2015 23:12:33 +0000 (00:12 +0100)]
mon: Monitor: drop PaxoServiceMessage reply functions

The services are now fully using MonOpRequest and should stay that way.
Drop PaxosService-specific reply functions as we want nothing to do with
them :)

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MDSMonitor: use op-related no_reply()
Joao Eduardo Luis [Wed, 24 Jun 2015 22:49:54 +0000 (23:49 +0100)]
mon: MDSMonitor: use op-related no_reply()

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: OSDMonitor: use op requests when sending out full/incrementals
Joao Eduardo Luis [Wed, 24 Jun 2015 22:48:23 +0000 (23:48 +0100)]
mon: OSDMonitor: use op requests when sending out full/incrementals

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: OSDMonitor: move failure code to support op requests
Joao Eduardo Luis [Wed, 24 Jun 2015 16:54:33 +0000 (17:54 +0100)]
mon: OSDMonitor: move failure code to support op requests

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: have op-related no_reply()
Joao Eduardo Luis [Wed, 24 Jun 2015 16:54:05 +0000 (17:54 +0100)]
mon: Monitor: have op-related no_reply()

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: send_reply() belongs in the Monitor class
Joao Eduardo Luis [Wed, 24 Jun 2015 16:51:56 +0000 (17:51 +0100)]
mon: MonOpRequest: send_reply() belongs in the Monitor class

Op Requests should have no business replying to messages. Besides,
given the Monitor is currently the place to do this, because it is the
one with access to all things that may be required to validate state
(e.g., quorum features), permanently moving this code to the Monitor
class also avoid having duplicate/very similar code in two distinct
places.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: routed requests handling op requests
Joao Eduardo Luis [Wed, 24 Jun 2015 10:50:50 +0000 (11:50 +0100)]
mon: Monitor: routed requests handling op requests

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: forward_request_leader() taking ops instead
Joao Eduardo Luis [Fri, 19 Jun 2015 17:32:37 +0000 (18:32 +0100)]
mon: Monitor: forward_request_leader() taking ops instead

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: drop reply_command(MMonCommand *m,...)
Joao Eduardo Luis [Thu, 18 Jun 2015 15:39:07 +0000 (16:39 +0100)]
mon: Monitor: drop reply_command(MMonCommand *m,...)

Monitor commands are now op requests; always use ops when replying to
commands.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: use op's get_session() instead of getting from connection
Joao Eduardo Luis [Wed, 17 Jun 2015 15:07:37 +0000 (16:07 +0100)]
mon: use op's get_session() instead of getting from connection

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: services: use op-based reply_command()
Joao Eduardo Luis [Wed, 17 Jun 2015 14:54:41 +0000 (15:54 +0100)]
mon: services: use op-based reply_command()

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agocls: fix the build on i386 5266/head
Kefu Chai [Thu, 16 Jul 2015 17:12:03 +0000 (01:12 +0800)]
cls: fix the build on i386

this is a leftover of 0dae022

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agomon: Monitor: reply_command() wrapper for ops
Joao Eduardo Luis [Wed, 17 Jun 2015 14:53:12 +0000 (15:53 +0100)]
mon: Monitor: reply_command() wrapper for ops

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Paxos: mark events
Joao Eduardo Luis [Tue, 16 Jun 2015 13:32:46 +0000 (14:32 +0100)]
mon: Paxos: mark events

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: mark events
Joao Eduardo Luis [Wed, 10 Jun 2015 00:55:21 +0000 (01:55 +0100)]
mon: Monitor: mark events

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: PaxosService: mark events
Joao Eduardo Luis [Wed, 10 Jun 2015 00:55:10 +0000 (01:55 +0100)]
mon: PaxosService: mark events

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: mark events
Joao Eduardo Luis [Wed, 10 Jun 2015 00:54:53 +0000 (01:54 +0100)]
mon: MonOpRequest: mark events

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: services: mark events
Joao Eduardo Luis [Wed, 17 Jun 2015 11:57:08 +0000 (12:57 +0100)]
mon: services: mark events

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: services: use mon->send_reply(op,...) instead
Joao Eduardo Luis [Wed, 17 Jun 2015 11:59:34 +0000 (12:59 +0100)]
mon: services: use mon->send_reply(op,...) instead

We are replying to operations, not messages, so use the appropriate
function to do so (and mark events).

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: PaxosService: use wait_for_.*_ctx() in absence of an op
Joao Eduardo Luis [Thu, 18 Jun 2015 13:55:19 +0000 (14:55 +0100)]
mon: PaxosService: use wait_for_.*_ctx() in absence of an op

The vast majority of cases use PaxosService's wait_for_{state}()
functions to wait on given {state} before waking up a given op-related
callback.  E.g., to reply to a command once a proposal finishes.

However, there are a few cases[1] in which the callback waiting for the
state change does not map to an op.

To maintain compatibility, we were keeping the functions just taking a
callback and no op with the same name as those taking ops (because c++
is amazing that way), but we realized that developers could keep on
using these functions just as before, disregarding the fact that they
likely want to use the version taking the op.  As such, this patch
changes the name of the function taking only the callback, such that it
is used solely when the developer really wants to take just the
callback.

[1] at time of this patch, only three calls were being made that would
use only a callback.  Out of over one hundred calls using ops.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: services: use op-based wait_for_* functions
Joao Eduardo Luis [Wed, 10 Jun 2015 00:52:15 +0000 (01:52 +0100)]
mon: services: use op-based wait_for_* functions

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: PaxosService: have wait_for_* functions requiring an op
Joao Eduardo Luis [Wed, 10 Jun 2015 00:49:23 +0000 (01:49 +0100)]
mon: PaxosService: have wait_for_* functions requiring an op

Basically, so we can mark the op accordinly; we'll leave context-only
functions to maintain compatibility with other users of these functions
that do not use them for op-related callbacks.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Paxos: have wait_for_* functions requiring ops
Joao Eduardo Luis [Fri, 12 Jun 2015 18:20:32 +0000 (19:20 +0100)]
mon: Paxos: have wait_for_* functions requiring ops

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: PGMonitor: implement C_MonOp on op-related callback contexts
Joao Eduardo Luis [Wed, 17 Jun 2015 10:00:19 +0000 (11:00 +0100)]
mon: PGMonitor: implement C_MonOp on op-related callback contexts

These contexts deal with MonOpRequests, and we need to track their life
cycle; use C_MonOp to mark events when the callbacks are woken up for
some reason.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: OSDMonitor: implement C_MonOp on op-related callback contexts
Joao Eduardo Luis [Wed, 17 Jun 2015 10:00:06 +0000 (11:00 +0100)]
mon: OSDMonitor: implement C_MonOp on op-related callback contexts

These contexts deal with MonOpRequests, and we need to track their life
cycle; use C_MonOp to mark events when the callbacks are woken up for
some reason.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: LogMonitor: implements C_MonOp on op-related callback contexts
Joao Eduardo Luis [Wed, 17 Jun 2015 09:59:44 +0000 (10:59 +0100)]
mon: LogMonitor: implements C_MonOp on op-related callback contexts

These contexts deal with MonOpRequests, and we need to track their life
cycle; use C_MonOp to mark events when the callbacks are woken up for
some reason.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: PaxosService: implement C_MonOp on op-related callback contexts
Joao Eduardo Luis [Wed, 10 Jun 2015 00:55:59 +0000 (01:55 +0100)]
mon: PaxosService: implement C_MonOp on op-related callback contexts

These contexts deal with MonOpRequests, and we need to track their life
cycle; use C_MonOp to mark events when the callbacks are woken up for
some reason.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: implement C_MonOp on op-related callback contexts
Joao Eduardo Luis [Mon, 8 Jun 2015 14:04:37 +0000 (15:04 +0100)]
mon: Monitor: implement C_MonOp on op-related callback contexts

These contexts deal with MonOpRequests, and we need to track their life
cycle; use C_MonOp to mark events when the callbacks are woken up for some
reason.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon/mon_types.h: add C_MonOp abstract class
Joao Eduardo Luis [Fri, 5 Jun 2015 15:22:46 +0000 (16:22 +0100)]
mon/mon_types.h: add C_MonOp abstract class

To be used by monitor contexts relying on MonOpRequest, so that we can
easily track the lifespan of an event.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: mark events
Joao Eduardo Luis [Fri, 5 Jun 2015 15:11:57 +0000 (16:11 +0100)]
mon: Monitor: mark events

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: change service names in mark_*_event()
Joao Eduardo Luis [Wed, 17 Jun 2015 12:00:26 +0000 (13:00 +0100)]
mon: MonOpRequest: change service names in mark_*_event()

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: add service-specific 'mark event' functions
Joao Eduardo Luis [Wed, 10 Jun 2015 00:53:12 +0000 (01:53 +0100)]
mon: MonOpRequest: add service-specific 'mark event' functions

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: add mark event functions
Joao Eduardo Luis [Thu, 18 Jun 2015 00:34:10 +0000 (01:34 +0100)]
mon: MonOpRequest: add mark event functions

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: add admin socket command 'ops'
Joao Eduardo Luis [Fri, 5 Jun 2015 15:12:38 +0000 (16:12 +0100)]
mon: Monitor: add admin socket command 'ops'

Dumps currently in-flight ops in the monitor

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: MonOpRequest: add dump function
Joao Eduardo Luis [Thu, 18 Jun 2015 00:35:02 +0000 (01:35 +0100)]
mon: MonOpRequest: add dump function

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agomon: Monitor: have reply functions for op requests
Joao Eduardo Luis [Fri, 27 Feb 2015 19:06:56 +0000 (19:06 +0000)]
mon: Monitor: have reply functions for op requests

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MonOpRequest: add 'send_reply()' function
Joao Eduardo Luis [Fri, 27 Feb 2015 15:58:06 +0000 (15:58 +0000)]
mon: MonOpRequest: add 'send_reply()' function

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: optracker (3): remove unecessary message variables
Joao Eduardo Luis [Fri, 27 Feb 2015 14:31:23 +0000 (14:31 +0000)]
mon: optracker (3): remove unecessary message variables

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: optracker (2): remove all unecessary message put()
Joao Eduardo Luis [Wed, 25 Feb 2015 18:40:33 +0000 (18:40 +0000)]
mon: optracker (2): remove all unecessary message put()

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: optracker (1): support MonOpRequestRef
Joao Eduardo Luis [Thu, 12 Feb 2015 19:41:33 +0000 (19:41 +0000)]
mon: optracker (1): support MonOpRequestRef

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoClient: check dir is still complete after dropping locks in _readdir_cache_cb 5260/head
Greg Farnum [Thu, 16 Jul 2015 11:45:05 +0000 (04:45 -0700)]
Client: check dir is still complete after dropping locks in _readdir_cache_cb

We drop the lock when invoking the callback, which means the directory
we're looking at might get dentries trimmed out of memory. Make sure that
hasn't happened after we get the lock back. If it *has* happened, fall back
to requesting the directory contents from the MDS. Update the dirp location
pointers after each entry to facilitate this.
Because this requires we update the dirp->at_cache_name value on every loop,
we rework the updating scheme a bit: to dereference the dn->name before
unlocking, so we know it's filled in; and since we update it on every loop
we don't need to refer to the previous dentry explicitly like we did before.

This should also handle racing file deletes: we get back a trace on
the removed dentry and that will clear the COMPLETE|ORDERED flags.

Fixes #12297

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
10 years agomon: test the crush ruleset when creating a pool 4807/head
Loic Dachary [Thu, 16 Jul 2015 16:02:02 +0000 (18:02 +0200)]
mon: test the crush ruleset when creating a pool

We want to fix the following scenario:

 * an erasure code plugin (or another part of the code) creates a
   ruleset
 * the ruleset crashes during mapping (for whatever reason)
 * ceph osd pool create uses the bugous ruleset
 * the monitors try to do mapping a crash

Having a bugous ruleset in the crush map is very difficult prevent. The
catastrophic event of using it with a newly created pool can however be
prevented by calling the CrushTester just before creating the pool and
after all implicit or explicit crush ruleset creation happened.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agomon: MonOpRequest: have the monitor dealing with operations
Joao Eduardo Luis [Wed, 4 Feb 2015 17:46:28 +0000 (17:46 +0000)]
mon: MonOpRequest: have the monitor dealing with operations

Deal with op requests throughout the monitor state machine, instead of
Messages.  These op requests implement TrackedOp, which will be
trackable by the monitor via a OpTracker.  This will allow us to follow
the operation's life cycle, for the duration of any given operation.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomessages: MForward: pack a bufferlist instead of a message
Joao Eduardo Luis [Wed, 11 Feb 2015 14:48:22 +0000 (14:48 +0000)]
messages: MForward: pack a bufferlist instead of a message

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 16 Jul 2015 16:03:58 +0000 (12:03 -0400)]
Merge remote-tracking branch 'gh/next'

10 years agoerasure-code: set max_size to chunk_count() instead of 20 for shec
Loic Dachary [Sat, 30 May 2015 10:40:26 +0000 (12:40 +0200)]
erasure-code: set max_size to chunk_count() instead of 20 for shec

See 8b64fe93b088a3a33d357869c47e6bf928c3f0e4 for a detailed explanation.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge branch 'wip-mon-scrub'
Joao Eduardo Luis [Thu, 16 Jul 2015 15:46:32 +0000 (16:46 +0100)]
Merge branch 'wip-mon-scrub'

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge branch 'wip-11786'
Joao Eduardo Luis [Thu, 16 Jul 2015 15:44:22 +0000 (16:44 +0100)]
Merge branch 'wip-11786'

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge branch 'wip-11470'
Joao Eduardo Luis [Thu, 16 Jul 2015 15:21:18 +0000 (16:21 +0100)]
Merge branch 'wip-11470'

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: PaxosService: call post_refresh() instead of post_paxos_update()
Joao Eduardo Luis [Fri, 12 Jun 2015 18:21:10 +0000 (19:21 +0100)]
mon: PaxosService: call post_refresh() instead of post_paxos_update()

Whenever the monitor finishes committing a proposal, we call
Monitor::refresh_from_paxos() to nudge the services to refresh.  Once
all services have refreshed, we would then call each services
post_paxos_update().

However, due to an unfortunate, non-critical bug, some services (mainly
the LogMonitor) could have messages pending in their
'waiting_for_finished_proposal' callback queue [1], and we need to nudge
those callbacks.

This patch adds a new step during the refresh phase: instead of calling
directly the service's post_paxos_update(), we introduce a
PaxosService::post_refresh() which will call the services
post_paxos_update() function first and then nudge those callbacks when
appropriate.

[1] - Given the monitor will send MLog messages to itself, and given the
service is not readable before its initial state is proposed and
committed, some of the initial MLog's would be stuck waiting for the
proposal to finish.  However, by design, we only nudge those message's
callbacks when an election finishes or, if the leader, when the proposal
finishes.  On peons, however, we would only nudge those callbacks if an
election happened to be triggered, hence the need for an alternate path
to retry any message waiting for the initial proposal to finish.

Fixes: #11470
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
10 years agoMerge branch 'wip-11545'
Joao Eduardo Luis [Thu, 16 Jul 2015 15:07:11 +0000 (16:07 +0100)]
Merge branch 'wip-11545'

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #5251 from ceph/wip-12021-next
Sage Weil [Thu, 16 Jul 2015 15:05:04 +0000 (11:05 -0400)]
Merge pull request #5251 from ceph/wip-12021-next

OSDMonitor: allow addition of cache pool with non-empty snaps with co…

Reviewed-by: Sage Weil <sage@redhat.com>