Commit Graph

42890 Commits

Author SHA1 Message Date
Joao Eduardo Luis
b9e6696c09 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
2c83e1e2b0 mon: Paxos: have wait_for_* functions requiring ops
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
5ca13692bb 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
903e219ece 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
fff540d40c 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
ed7e89a096 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
61f7dcaf76 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
7e1c8c9f72 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>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
c80bb614c6 mon: Monitor: mark events
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
91457df745 mon: MonOpRequest: change service names in mark_*_event()
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
176d7969bc mon: MonOpRequest: add service-specific 'mark event' functions
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
e28e5ec363 mon: MonOpRequest: add mark event functions
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:06:07 +01:00
Joao Eduardo Luis
7d90cb12b8 mon: Monitor: add admin socket command 'ops'
Dumps currently in-flight ops in the monitor

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:06:02 +01:00
Joao Eduardo Luis
19dac5fbab mon: MonOpRequest: add dump function
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 18:03:39 +01:00
Joao Eduardo Luis
df9486bcc7 mon: Monitor: have reply functions for op requests
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-07-16 18:03:39 +01:00
Joao Eduardo Luis
53bd1ba510 mon: MonOpRequest: add 'send_reply()' function
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-07-16 18:03:39 +01:00
Joao Eduardo Luis
5420fdbd84 mon: optracker (3): remove unecessary message variables
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-07-16 18:03:39 +01:00
Joao Eduardo Luis
2526347515 mon: optracker (2): remove all unecessary message put()
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-07-16 18:03:39 +01:00
Joao Eduardo Luis
c713d9a632 mon: optracker (1): support MonOpRequestRef
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-07-16 18:03:35 +01:00
Joao Eduardo Luis
203cb6ad45 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>
2015-07-16 17:08:39 +01:00
Joao Eduardo Luis
2731b19aec messages: MForward: pack a bufferlist instead of a message
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-07-16 17:08:39 +01:00
Sage Weil
2746f59da4 Merge remote-tracking branch 'gh/next' 2015-07-16 12:03:58 -04:00
Joao Eduardo Luis
c2d6e3d666 Merge branch 'wip-mon-scrub'
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:46:32 +01:00
Joao Eduardo Luis
f735a9905c Merge branch 'wip-11786'
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:44:22 +01:00
Joao Eduardo Luis
0ea794c96a Merge branch 'wip-11470'
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:21:18 +01:00
Joao Eduardo Luis
1551ebb632 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>
2015-07-16 16:20:41 +01:00
Joao Eduardo Luis
b207d87ebf 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>
2015-07-16 16:07:11 +01:00
Sage Weil
5d299612e5 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>
2015-07-16 11:05:04 -04:00
Sage Weil
edd68e3ade Merge pull request #5188 from athanatos/wip-11687
PG::find_best_info: ignore info.les for incomplete peer

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 11:03:18 -04:00
Joao Eduardo Luis
038452e70f mon: Monitor: use 'ceph mon metadata' instead of 'ceph mon_metadata'
'ceph mon_metadata' was added still during this dev cycle, so there is
no need to deprecate it first.

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 15:54:03 +01:00
Kefu Chai
6fac064a02 Merge pull request #5238 from tweenk/out-of-tree-build-fix
Makefile: fix out-of-tree build.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 22:03:52 +08:00
John Spray
03c556a9e7 Merge pull request #5256 from ceph/wip-ftbfs-i386-cls-cephfs
fix the FTBFS on i386 due to libcls_cephfs

Reviewed-by: John Spray <john.spray@redhat.com>
2015-07-16 14:42:49 +01:00
Kefu Chai
039dd1ac27 Merge pull request #5255 from hjwsm1989/fix-pgmonitor
mon/PGMonitor: use poolname reference instead of get it in osdmap

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 21:15:03 +08:00
Joao Eduardo Luis
955dcede2a mon: Monitor: use 'ceph mon sync force' instead of 'ceph sync force'
Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.

This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
574e596f1f mon: Monitor: use 'ceph mon scrub' instead of 'ceph scrub'
Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.

This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
16dcc40cfa mon: Monitor: use 'ceph mon compact' instead of 'ceph compact'
Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.

This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
66e7510cad qa/workunits: cephtool: test deprecated commands
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
c7f70a7edb PendingReleaseNotes: note deprecation of commands
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
7e8f72151b mon: MonCommands.h: DEPRECATE 'ceph sync force'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
9073ff4f2e mon: MonCommands.h: DEPRECATE 'ceph compact'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
1814d7441b mon: MonCommands.h: DEPRECATE 'ceph scrub'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
d9acd68cae mon: Monitor: allow deprecating commands and debugging as obsolete
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
16df92f68d mon: Monitor: add is_noforward() helper to MonCommand
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
5b2a4eb865 mon: Monitor: add support to have OBSOLETE commands
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
4c5d5bab1f mon: MonCommand: don't match help string in is_compat()
Otherwise it's virtually impossible to change a command's help string
without triggering a mismatch with the leader's command set.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
607b0e8e4f mon: MonCommands: add NOFORWARD to 'ceph sync force'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
0438bdd54b mon: MonCommand: add FLAG_NONE
Instead of passing '0' for commands without flags, pass FLAG_NONE
instead.  It's prettier and more obvious -- and it only costs 64 bits.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
af5efdfd29 mon: MonCommand: have flags as uint32_t instead of enum
Makes much more sense if we're OR'ing flags.  Or not as weird.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
b00ea63497 mon: MonCommands: accept FLAG(f) instead of 'f' in command sig
This allows us to do nifty stuff like 'FLAG(foo) | FLAG(bar)' and expand
it to (MonCommand::FLAG_foo | MonCommand::FLAG_bar), instead of being
bound by a single flag on macro expansion.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Krzysztof Kosiński
6ed554ce1b automake: Fix out-of-tree build.
Corrects minor Automake errors which prevented Ceph from building
when configure was invoked from a different directory than
the toplevel source directory.

Signed-off-by: Krzysztof Kosiński <krzysztof.kosinski@intel.com>
2015-07-16 10:32:34 +02:00