Commit Graph

33062 Commits

Author SHA1 Message Date
Yan, Zheng
908fa5edcc Merge pull request #1666 from ceph/wip-mds
Wip mds
2014-04-15 08:13:01 +08:00
Samuel Just
9b7fa388c5 ReplicatedPG::process_copy_chunk: don't check snaps if we got head
Even if we are promoting a clone, we may be reading from head.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:55:16 -07:00
Samuel Just
43b7c3a277 ReplicatedPG::finish_promote: soid.clone may have been trimed, fix assert
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:55:16 -07:00
Samuel Just
3f7861e243 ReplicatedPG::agent_work: skip if head is missing
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:55:16 -07:00
Samuel Just
d39e00311f ReplicatedPG::cancel_flush: requeue dup_ops even if !op
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:55:16 -07:00
Samuel Just
edda6f7442 ReplicatedPG::_rollback_to: fix comment, clone certainly could be missing
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:55:16 -07:00
Samuel Just
9f6f7d35a1 Merge pull request #1673 from ceph/wip-stress-watch
ceph_test_stress_watch: test over cache pool

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-14 16:12:31 -07:00
Samuel Just
895b6d4d58 Merge pull request #1667 from ceph/wip-8089
osd: fix dup request ahndling for ENOENT and cache ops

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:11:47 -07:00
Samuel Just
898ee4894e Merge pull request #1654 from ceph/wip-7940
Wip 7940

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:10:42 -07:00
Samuel Just
cab29ac19d Merge pull request #1664 from ceph/wip-8085
osd: handle misdirected pg command

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:09:50 -07:00
Samuel Just
a2323a61ce Merge pull request #1660 from ceph/wip-hitset-missing
osd: handle hitset-get on a missing hit_set object

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-14 16:07:41 -07:00
Sage Weil
37ed4b60ba ceph_test_stress_watch: test over cache pool
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-14 15:57:28 -07:00
Josh Durgin
4388d876ca Merge pull request #1661 from ceph/wip-objecter
objecter: make linger watch the correct pool/object

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-14 15:36:10 -07:00
Josh Durgin
ab4a35f75e Merge pull request #1672 from ceph/wip-strerror
Use cpp_strerror() wherever possible, and use autoconf for portability

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-14 13:57:36 -07:00
Dan Mick
d0a7632a31 Use cpp_strerror() wherever possible, and use autoconf for portability
strerror_r is not portable; on Gnu libc it returns char * and sometimes
does not fill in the supplied buffer.  Use autoconf to test which
version this platform uses and adapt.

Clean up the random calls to strerror and strerror_r (along with all
their private little one-use buffers) and regularize the code to use
cpp_strerror almost everywhere.  Where changed, any negation of the
error code is also removed, since cpp_strerror() will do that.

Note: some tools were using their own calls to strerror/strerror_r, so
will now get a (%d) in their output that wasn't there before; hence
the change to test/cli/monmaptool/print-nonexistent.t

Fixes: #8041
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-04-14 13:07:17 -07:00
Josh Durgin
29d83fef77 Merge pull request #1668 from ceph/wip-librados-tests
ceph_test_rados_api_*: fix build warnings and memset ranges

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-14 11:44:34 -07:00
Samuel Just
502cc61406 ReplicatedPG::agent_work: skip hitset objects before getting object context
Otherwise, we might read the attr on a hitset object we are in the
process of deleting.

Fixes: #8086
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-14 11:08:00 -07:00
Sage Weil
0d4aed88a1 mon: fix Session ref leak in handle_get_version
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-14 09:27:27 -07:00
Sage Weil
d0d162a552 buffer: use Mutex instead of Spinlock for raw crcs
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-14 08:56:18 -07:00
Loic Dachary
64cd332e6e Merge pull request #1622 from dachary/wip-mailmap
mailmap updates

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
2014-04-14 11:52:17 +02:00
Yan, Zheng
7c17fc4ae6 mds: don't modify inode when calculating client ranges
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-14 17:31:41 +08:00
Yan, Zheng
3dd88006b0 Merge pull request #1669 from ceph/wip-client-debug
client: print inode max_size
2014-04-14 16:39:40 +08:00
Yan, Zheng
65ec24e392 client: print inode max_size
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-14 16:38:22 +08:00
Sage Weil
d6c71b7624 osd/ReplicatedPG: add missing whitespace in debug output
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-13 21:59:23 -07:00
Sage Weil
171d5c50f6 ceph_test_rados_api_*: fix build warnings, memset ranges
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-13 21:37:31 -07:00
Sage Weil
8905e3e228 osd/ReplicatedPG: handle dup ops earlier in do_op
Current the dup op checks happen in execute_ctx, long after we handle
cache ops or get the obc and (potentially) return ENOENT.  That means that
object deletions and cache ops both aren't properly idempotent.

This is easy to fix by moving the check earlier in do_op.

Fixes: #8089
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-13 21:33:16 -07:00
Yan, Zheng
26659a5ae4 mds: don't issue/revoke caps before client has caps
If early reply is not allowed, MDS does not send reply to client immediately
after Locker::issue_new_caps adds new caps. So MDS can revoke the caps before
sending reply to client.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-13 20:38:04 +08:00
Yan, Zheng
bd8aa6f46e mds: do file recover after authpin inode
MDCache::do_file_recover may call Locker::evel_gather, which may change
filelock to stable state. So we should authpin the inode (for unstable
lock state) first.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-13 20:33:43 +08:00
Sage Weil
a72bcddfc8 osd/ReplicatedPG: handle misdirected do_command
We can get a query on a pg we still have but are no longer primary for.  If
that happens, do not reply.  The client will resend to the correct OSD
assuming it has the map.  Send them the latest incremental so that we know
they know there is something new.  We don't know the exact epoch they have,
unfortunately, because MCommand doesn't include it, but a newer inc is
enough to make them request the right incrementals from a mon.  Eventually
they will figure it out and Objecter will resend the request to the
correct target.

It is possible we should include epoch in the MCommand message so that we
can do this mapping "correctly" (as in, the same way MOSDOp does).  That
makes MCommand less general, though... a PG-specific command message might
be the most precise thing.  Another day...

Fixes: #8085
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-12 22:23:26 -07:00
Yan, Zheng
4ccc845c0a mds: fix typo in Server::do_rename_rollback()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-12 14:14:48 +08:00
Sage Weil
93b933fbeb Merge pull request #1659 from ceph/wip-8054
mds: finish table servers recovery after creating newfs

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-11 22:33:27 -07:00
Sage Weil
809d0fab38 osd/ReplicatedPG: handle missing hit_set on HITSET_GET rados op
Fixes: #8081
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 17:46:44 -07:00
Samuel Just
d72602f64f Merge pull request #1655 from ceph/wip-8077
osd: handle missing hti_set objects in agent_load_hit_sets

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-11 17:33:10 -07:00
Sage Weil
53a4b71966 ceph_test_rados_api_watch_notify: test over cache pool
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 17:11:43 -07:00
Sage Weil
b31107b777 test/librados/TestCase: add Param option that can set up a cache pool
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 17:11:43 -07:00
David Zafman
3ce407800d test: Add --pool-snaps option to ceph_test_rados
Fixes: #7940

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-04-11 16:22:27 -07:00
David Zafman
09b5538cd5 test: Fix ceph_test_rados to not core dump with invalid arguments
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-04-11 16:22:27 -07:00
David Zafman
b6b0c3bd0c librados: Add ObjectWriteOperation::snap_rollback() for pool snapshots
snap_rollback() is the same as selfmanaged_snap_rollback() but we want an
independent interface for pool snapshots.  Should really take snapname
for consistency with other pool snapshot interfaces.

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-04-11 16:22:27 -07:00
David Zafman
6e0496b96f librados: Rollback interface additions
Add C interface rados_ioctx_snap_rollback() and indicate that rados_rollback()
is deprecated.

Add C++ interface IoCtx::snap_rollback() and indicate that IoCtx::rollback()
is deprecated.

Modify snapshot test case to use new function names.

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-04-11 16:22:27 -07:00
Samuel Just
3853cc9050 Merge pull request #1658 from ceph/wip-8008
osd: fix repair_object

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-11 15:50:58 -07:00
Samuel Just
2e40afcdce Merge pull request #1657 from ceph/wip-8063
ceph_test_rados_api_tier: fix scrub test

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-11 15:50:38 -07:00
Sage Weil
6ff645f592 osd/PG: fix repair_object when missing on primary
If the object is missing on the primary, we need to fully populate the
missing_loc.needs_recovery_map.  This broke with the recent refactoring of
recovery for EC, somewhere around 84e2f39c55.

Fixes: #8008
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 15:39:23 -07:00
Sage Weil
19acfebc4d ceph_test_librados_tier: tolerage EAGAIN from pg scrub command
We may get EAGAIN if the osd happens to be down, for example due to
thrashing.  Try a few times and then give up.

Note that the other place we try to scrub we don't even check the return
value as we are poking ever pg in the pool.  And the scrub commands get
lost due to any peering event, etc.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 14:48:26 -07:00
Gregory Farnum
b1db075147 Merge pull request #1656 from ceph/wip-osd-boot
mon: fix osd boot check

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-04-11 14:44:01 -07:00
Sage Weil
39b9d9d8c4 mon/OSDMonitor: fix osd epoch in boot check
This was introduced in 4c99e978a7 and was
incorrect; boot_epoch is the previous epoch the osd booted in, not the
latest map epoch that the OSD currently has.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 14:32:21 -07:00
Sage Weil
78df66f520 osd/ReplicatedPG: skip missing hit_sets when loading into memory
We weren't handling hit_sets that were missing.

Two changes here:

1- Load the hit_sets oldest to newest.  That means that if we stop partway
   through loading, and then add another to the end of the list, and then
   try again to load some more, we will still catch them all.
2- If the object is missing, stop.  We'll try again the next time
   agent_work() is called.

Fixes: #8077
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 13:14:58 -07:00
Yan, Zheng
7077438be9 mds: finish table servers recovery after creating newfs
Fixes: #8054
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-12 03:23:11 +08:00
Sage Weil
052519ed4a Revert "mds: finish table servers recovery after creating newfs"
This reverts commit f6c20730c1.

This breaks single MDS startup.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-11 10:33:11 -07:00
Loic Dachary
f374591219 Merge pull request #1650 from dachary/wip-erasure-code-doc
erasure-code: document the ruleset-root profile parameter

Reviewed-by: Mark Nelson <mark.nelson@inktank.com>
2014-04-11 19:20:35 +02:00
Josh Durgin
fcd94d6abd Merge pull request #1630 from ceph/wip-7450
Wip 7450

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-11 10:04:57 -07:00