Commit Graph

32963 Commits

Author SHA1 Message Date
Sage Weil
3a794d5fe1 Merge pull request #1677 from ceph/wip-poolset-noblock
mon: Don't block on EAGAIN from `osd pool set`

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-17 10:03:26 -07:00
John Spray
40e8dbbb6b mon: EBUSY instead of EAGAIN when pgs creating
In 69321bf, EAGAIN changed behaviour to block indefinitely
rather than returning to user.  Change the return for
`osd pool set` operations that are blocked by creating PGs
to return EBUSY instead of EAGAIN, so that they are excepted
from this blocking behaviour.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-04-17 15:28:22 +01:00
Gregory Farnum
2e375b6f4e Merge pull request #1675 from guangyy/wip-bench
Make rados/rest bench work for multiple write instances without metadata conflict.

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-04-16 21:57:41 -07:00
Samuel Just
75a5bd5d49 Merge pull request #1681 from ceph/wip-8043
mon/OSDMonitor: require force argument to split a cache pool

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-16 18:16:11 -07:00
Sage Weil
6d58e3c9fc Merge pull request #1682 from ceph/wip-8020
OSD: split pg stats during pg split

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-16 18:13:01 -07:00
Samuel Just
18caa1cd8f OSD: split pg stats during pg split
Fixes: #8020
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-16 18:10:02 -07:00
Samuel Just
5e4a5dc6ea osd_types::osd_stat_sum_t: fix floor for num_objects_omap
Introduced in a130a4452e
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-16 18:08:35 -07:00
David Zafman
a3d759ebdd Merge branch 'wip-8100'
Reviewed-by: Mark Nelson <mark.nelson@inktank.com>
2014-04-16 15:09:12 -07:00
David Zafman
a3d452acdf common/obj_bencher: Fix error return check from read that is negative on error
Fixed read return value in d99f1d9f68

Fixes: #8100

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-04-16 15:06:55 -07:00
Sage Weil
24da7d0c17 Merge pull request #1680 from ceph/wip-7786
civetweb: update subproject
2014-04-16 11:49:58 -07:00
David Zafman
4db1984c2b osd/ReplicatedPG: add missing whitespace in debug output
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-04-16 11:08:23 -07:00
Guang Yang
8c7a5ab861 Use string instead of char* when saving arguments for rest-bench 2014-04-16 01:28:16 +00:00
Sage Weil
015df934af mon/OSDMonitor: require force argument to split a cache pool
There are several perils when splitting a cache pool:

 - split invalidstes pg stats, which disables the agent
 - a scrub must be manually triggered post-split to rebuild stats
 - the pool may fill the OSDs during that period.
 - or, the pool may end up beyond the 'full' mark and once scrub does
   complete and the agent activate we may block IO for a long time while
   we catch up with flush/evict

Make it a bit harder for users to shoot themselves in the foot.

Fixes: #8043
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-15 13:57:21 -07:00
Guang Yang
308758b787 Make rados/rest bench work for multiple write instances without metadata conflict.
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
2014-04-15 07:48:37 +00:00
Yan, Zheng
908fa5edcc Merge pull request #1666 from ceph/wip-mds
Wip mds
2014-04-15 08:13:01 +08: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
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