Commit Graph

33074 Commits

Author SHA1 Message Date
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
Yan, Zheng
924064f83b mds: dynamically adjust priority of committing dirfrags
Adjust priority of committing dirfrags according to number of
expiring log segments. The more expiring log segments, the higher
priority. Because it mean MDS does not trim log segments quickly
enough.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-16 15:11:38 +08:00
Yan, Zheng
0640a08534 mds: fix cap revoke confirmation
when the _revokes list is emptied, it doesn't mean that client has
released the revoking caps. It's possible that client was flusing
dirty metadata.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-16 13:51:04 +08:00
Guang Yang
8c7a5ab861 Use string instead of char* when saving arguments for rest-bench 2014-04-16 01:28:16 +00:00
Samuel Just
0d2177a180 ReplicatedPG::get_snapset_context: assert snap obj is not missing
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-15 15:37:46 -07: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
Joao Eduardo Luis
c252345889 osd: OSDMap: have osdmap json dump print valid boolean instead of string
Fixes: 8108

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-04-15 18:32:17 +01:00
John Spray
aa6df59e99 mds: Fix respawn (add path resolution)
Previously assumed that ceph-mds executable was in
PWD - now use /proc/self/exe to find the
executable whereever it may be.  Leave in old version
as a fallback for non-linux environments.

Also add a 'respawn' command so that it's easy to test
respawn with `ceph mds tell <id> respawn`

Fixes: #7966
2014-04-15 12:28:09 +01:00
Yan, Zheng
f6db1bc2b6 mds: share max size to client who is allowed for WR cap
WR cap is allowed for the loner client when filelock is in excl->mix
state. MDS should share max size with the loner client in this case.
Otherwise the client may wait for the max size forever.

Fixes: #8092
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-15 16:30:06 +08: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
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