Commit Graph

28991 Commits

Author SHA1 Message Date
Samuel Just
6cccef2d8d ReplicatedBackend: wire in start_pushes
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
a287167cf8 ReplicatedBackend: handle stats properly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
656d084d00 ReplicatedBackend: track object contexts in Push/PullInfo
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
e7a0b23418 ReplicatedBackend: remove priority from Pull/PushInfo
Instead, we'll just nab the priority from the messages.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
9e8c3c3d82 ReplicatedPG/Backend: move prep_push and friends to ReplicatedBackend
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
3d6eb6ea5a ReplicatedPG: remove pushing/pulling
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
31c604225c ReplicatedPG/Backend: handle down pull sources
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
4bc0eab151 ReplicatedPG/Backend: split recover_missing out of prepare_pull
Also, move prepare_pull to PGBackend.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
273ac2b4b8 ReplicatedPG/Backend: shuffle over submit_push_*/build_push_op
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:27 -07:00
Samuel Just
fea30f5bea ReplicatedPG/Backend: move over send_pushes/send_pulls/prep_push_op_blank
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
c1c2debdb9 ReplicatedPG/Backend: move over _failed_push
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
f9810797af ReplicatedPG/Backend: move handle_*
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
666a316d5a ReplicatedPG/Backend: shuffle do_pull/do_push_reply
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
3e7347222c ReplicatedPG/Backend: move _do_push,_do_pull_response,do_push
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
8daaeba3f5 ReplicatedPG/Backend: convert sub_op_pull
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
0e16230fd7 ReplicatedPG: make log_subop_stats static
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
d53fc899eb ReplicatedPG/Backend: shuffle sub_op_push_reply
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:26 -07:00
Samuel Just
8d447be1c8 ReplicatedPG/Backend: shuffle sub_op_push over to ReplicatedBackend
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
087f708ba0 osd/: allow dout for ReplicatedBackend methods to work in ReplicatedPG.cc
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
7da308bba0 ReplicatedPG: extract PGBackend::Listener recovery callbacks
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
3148b12141 PG,ReplicatedPG: handle do_request in ReplicatedPG,PGBackend
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
30ac934e22 ReplicatedPG: pass on dump_recovery_info to PGBackend
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
138ccbee73 OSD,ReplicatedPG: let PGBackend handle the temp collection
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
62a1eb6f69 osd/: add PGBackend interfaces and stubs
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:25 -07:00
Samuel Just
f94e6a30a7 ReplicatedPG: Allow get_object_context caller to provide attributes
This will be used by PGBackend implementers to get the SnapSet
and ObjectInfo for newly recovered objects on the primary.

get_object_context may be called on a missing object for a lost_revert

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:24:17 -07:00
Samuel Just
5b7fa6272a ReplicatedPG: send_push is unused
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:21:15 -07:00
Samuel Just
de4cc8717e FileStore: ping tphandle between each operation within a transaction
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:21:15 -07:00
Samuel Just
5f44a949ef WorkQueue: add a workqueue which simply runs queued GenContexts
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-26 11:21:11 -07:00
Sage Weil
2b152e2b4d Merge pull request #644 from ceph/wip-6345
reverse the order of the mons in the init script when stopping

Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-26 10:42:09 -07:00
Sage Weil
179001b42c osd/ReplicatedPG: fix bl resize on write vs truncate race
If we resize the write due to the funky truncate behavior, we need to
resize the bufferlist to match.

Fixes: #6346
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-26 10:38:23 -07:00
Gregory Farnum
881309db3f Merge pull request #606 from ceph/wip-6332
Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-26 10:30:44 -07:00
Joao Eduardo Luis
bd0f29a2c2 mon: OSDMonitor: do not write full_latest during trim
On commit 81983bab we patched OSDMonitor::update_from_paxos() such that we
write the latest full map version to 'full_latest' each time the latest
full map was built from the incremental versions.

This change however clashed with OSDMonitor::encode_trim_extra(), which
also wrote to 'full_latest' on each trim, writing instead the version of
the *oldest* full map.  This duality of behaviors could lead the store
to an inconsistent state across the monitors (although there's no sign of
it actually imposing any issues besides rebuilding already existing full
maps on some monitors).

We now stop OSDMonitor::encode_trim_extra() from writing to 'full_latest'.
This function will still write out the oldest full map it has in the store,
but it will no longer write to full_latest, instead leaving it up to
OSDMonitor::update_from_paxos() to figure it out -- and it already does.

Fixes: #6378

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-26 10:27:46 -07:00
Greg Farnum
6b435f5d4f mon: don't list "--yes-i-really-mean-it" options as required
By default options are required, and that leads to the Ceph CLI making
users add this to their commands before even submitting it to the monitor. We
want them to see and think about the messages generated by the monitor!

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-26 19:23:30 +02:00
Sage Weil
89482cac83 Merge remote-tracking branch 'gh/next' 2013-09-26 10:21:54 -07:00
Alfredo Deza
9d5b724a22 do not quote the variable to loop over
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2013-09-26 13:10:26 -04:00
Sage Weil
f45675c2a2 msg/msg_types: use proper NI_MAXSERV when formatting an IP address
May as well be pedantic about it, even though we are leaving the port
in numeric form.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-26 09:51:56 -07:00
Alfredo Deza
5584b37163 reverse the order of the mons in the init script when stopping
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2013-09-26 12:49:19 -04:00
Greg Farnum
ca97fae81f qa: update snaps workunits for allow_new_snaps flag
Test that it works in snaptest-0.sh, and set the flag in
all the snap workunits so they continue to function.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2013-09-26 18:27:52 +02:00
Greg Farnum
9771b1d5d6 MDS: lock out snapshots until after a flag has been set in the MDSMap
This way users can't put snapshots on their clusters unless they explicitly
ask for them and have seen a warning message. We take a bit of the MDSMap
flags in order to do so. The only thing a little weird here is that anybody
who upgrades to this patch who already has snapshots will hit the EPERM
and have to go through the warning, but it doesn't impact existing snapshots
at all so they should be good.

To go along with this, we add "ever_allowed_snaps" and "explicitly_allowed_snaps"
members to the MDSMap, which are default to false and are set to true
when allow_new_snaps is set. Old maps decoded with new code default to true
and false, respectively, so we can tell.

Fixes: #6332

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-26 18:26:36 +02:00
Yan, Zheng
b144170544 mds: properly return log replay error
The only context that should see this is
C_MDS_BootStart, and it is prepared for failures,
so there's no reason to always return 0.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-09-26 09:14:52 -07:00
Sage Weil
1d67aeba72 common/crc32c_intel_fast: fix compile-time #ifdef
This wasn't getting built in!

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 3233336cc3)
2013-09-26 09:09:58 -07:00
Loic Dachary
a65a8678bf autoconf: fix build out of tree
so that the following works:

git clone git@github.com:ceph/ceph.git
cd ceph
./autogen.sh
mkdir ../build
cd ../build
../ceph/configure --with-radosgw
make check

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-26 11:47:26 +02:00
Sage Weil
7147ef7fbd Merge pull request #632 from ceph/wip-rworder
fix up read vs write ordering flags; make ceph_test_rados use it

Reviewed-by: Greg Farnum <greg@inktank.com>
2013-09-25 20:42:30 -07:00
Samuel Just
fde0f864a6 Context: add GenContext templated on the callback argument
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-09-25 19:18:42 -07:00
Sage Weil
3cffff2a1a mds/Server: fix LOOKUPSNAP
The current LOOKUPSNAP code path was dereferencing mdr->dn[0] and getting
SEGV.  Instead, set the do_lookup arg to false for getattr so that we do
not try to dereference this; for snaps it will always be NULL as we are
constructing a fake namespace for the .snap directory.  (This happens in
the path_traverse, the result of which is to set snapid--without any real
dentry).

With this fix, snaptest-0.sh passes.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-09-25 17:08:23 -07:00
Sage Weil
52c7f27963 Merge pull request #640 from ceph/wip-mon-pgmap
fix mon crash when osdmap and pgmap aren't yet synced

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-09-25 16:08:05 -07:00
Sage Weil
4d8f78bc65 mon/PGMonitor: fix segfault when osdmap and pgmap stats are out of sync
The leader mon is responsible for propagating changes in the osdmap
into the pgmap (e.g., when a pool or osd goes away).  If that hasn't
happened yet, the pg_map map will be out of sync with the current set
of pools.  We shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-25 15:47:39 -07:00
Sage Weil
aead63cf0b Merge pull request #637 from dachary/master
mailmap: add Matthew Roy, Matthew Wodrich
2013-09-25 15:39:22 -07:00
Sage Weil
9a9e4ca284 Merge pull request #639 from ceph/wip-gtest
Makefile: don't use srcdir in TESTS

Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
2013-09-25 15:39:01 -07:00
Sage Weil
479936806e Makefile: don't use srcdir in TESTS
src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/unittest_bufferlist.sh'
src/Makefile.am:1:   'src/Makefile-env.am' included from here
src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/test/encoding/check-generated.sh'
src/Makefile.am:1:   'src/Makefile-env.am' included from here

on my (raring) laptop.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-25 13:37:13 -07:00