Commit Graph

21604 Commits

Author SHA1 Message Date
Dan Mick
0d48879320 rbd: gracefully handle extra arguments
Instead of looping across all args, with increments inside the loop,
which can run off the end of the vector, demand that the final
argument parsing have exactly the right number of args, or complain
about the extras and die.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 18:08:28 -07:00
Josh Durgin
f1ad419282 qa: report success if race is not detected
This test still verifies that the race is handled correctly if it
occurs, but will no longer clutter test results with spurious failures
when the race is not reproduced.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 16:50:46 -07:00
Dan Mick
37ffb278c8 qa scripts: Replace cut -f 1 with awk '{print $1;}'
This is to handle TextTable output, which doesn't use tabs

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 17:04:09 -07:00
Dan Mick
bed55369a9 rbd: Use TextTable for showmapped and lock list
Also update ocf/rbd.in to handle new output form (spaces)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2012-10-04 16:20:13 -07:00
Dan Mick
61b2e4d6ac rbd: use TextTable to implement ls -l
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 15:20:29 -07:00
Dan Mick
fb88683cd1 Add TextTable class for table output
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 15:20:29 -07:00
Dan Mick
9889d819d7 librbd: fix error handling in get_parent_info
Return ENOENT if no parent.
Return error if pool reverse lookup fails.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 15:20:29 -07:00
Tommi Virtanen
3ba7ab2ba5 doc: Whitespace cleanup.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-04 14:54:17 -07:00
Tommi Virtanen
790b508903 doc: rst syntax fixes.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-04 14:54:17 -07:00
Tommi Virtanen
36f1698486 rbd.py: Fix docstring syntax of list_lockers().
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-04 14:54:17 -07:00
Tommi Virtanen
2411ba696d rbd.py: Docstring syntax.
It's meth for referring to Python class methods:
http://sphinx.pocoo.org/domains.html#python-roles

The links to format() and features() are currently
dead because those methods don't have docstrings.
They'll start working once docstrings are added.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-04 14:54:17 -07:00
Sean Channel
c65ffe9f7f admin/build-doc: Use installed Sphinx and its dependencies, when possible.
This avoids the delay of installing Sphinx inside the virtualenv;
especially, compiling lxml is slow.

If Sphinx is not installed system-wide (or it's too old), this will
still install a copy inside the virtualenv, to keep working.

Thanks to Sean for the push to make this happen, and testing the
various scenarios; I (Tv) took the liberty of changing the commit to
use venv-python for the manpage build too, avoid the nonstandard
"which" command, be more careful about quoting, and explain more fully
what's going on in the comment.

Closes: https://github.com/ceph/ceph/pull/24
Signed-off-by: Sean Channel <pentabular@gmail.com>
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-10-04 14:53:20 -07:00
Sage Weil
ad97bbb0a1 Merge remote-tracking branch 'gh/next' 2012-10-04 10:08:46 -07:00
Joao Eduardo Luis
d5c3c47619 mon: Elector: clean ack set on election start
We should never consider old 'acks' from monitors on a new election. We
usually do it, but we didn't if an election expired, because this code
didn't foresee the possibility of monitors changing ranks in-between
elections -- which doesn't happen if we specify the monmap during the
monitor's mkfs, but may happen when relying on 'mon initial peers'.

Failing to do so triggered an assertion after fixing bug #3252.

Backport: argonaut

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-04 17:36:10 +01:00
Joao Eduardo Luis
35f5effa73 mon: Elector: bootstrap on new monmap from elector
Whenever we update the monmap we should bootstrap, in order to reset the
monitor's on-going activities and re-probe.

Not doing so contributed to bug #3252, during which we entered an infinite
election cycle. This may only happen though when we rely on 'mon initial
peers'. Specifying a monmap during the monitor's mkfs should not trigger
this bug.

Fixes: #3252
Backport: argonaut

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-04 17:36:03 +01:00
Joao Eduardo Luis
a6ba95fec0 mon: dump formatted crushmap on report
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-04 17:11:35 +01:00
Sage Weil
36efcb5518 mon: do not tick() until all paxos instances recover
We cannot propose until they all recover.

Fixes: #3260
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-03 16:24:18 -07:00
Sage Weil
db7c41934b Merge branch 'wip-mds' 2012-10-03 10:43:49 -07:00
Sam Lang
fec1912111 client: Fix #2215 with cache inval in thread
The client currently deadlocks with kernel buffer cache invalidation
enabled, due to the client lock calling the invalidate callback, which
in turn sends up calls back to the userspace process which try to lock
the same client lock.  The fix is to invoke the invalidate callback in
a separate thread, allowing _release, _flushed, etc. to complete,
unlocking the client lock so that the invalidate callback avoids deadlock
when the up call is made.

We construct a separate work queue (Finisher) that allows scheduling
the invalidate callbacks in a separate thread.  The thread only starts
when the invalidate callback is set.  If no callback is set, the cache
capability reference is decremented inline as before.

Some callers of invalidate_inode_cache (flush and update_inode_file_bits)
don't expect the cache capability to be decremented.  Pass a keep_caps flag to
only decrement the capability ref in the _release case.

Also, we need to make sure the mds is aware that the client has dropped
the cache capability, so we add a call to check_caps in put_cap_ref for the
CEPH_CAP_FILE_CACHE capability.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-03 11:38:11 -05:00
Sam Lang
847728e5a1 client: Remove unnecessary checkafter parameter
The logic in put_cap_ref doesn't do anything but inode->put_cap_ref
if cap is set to CEPH_CAP_FILE_CACHE, so checkafter isn't needed.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-03 11:38:11 -05:00
Sam Lang
68fbbea234 ceph-fuse: Test for fuse cache issue (#2215)
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-03 11:38:11 -05:00
Sage Weil
2de5670583 mds: make migrate_stray() specify full path
The handle_client_rename() check expects a full path rooted in the MDSDIR.
Do so in migrate_stray().

Also, use the committed (not projected) dn linkage; this was a carry-over
from the original switch to this API forever ago, but the current callers
don't need to migrate an uncommitted stray.  This also aligns us with
reintegrate_stray().

Reported-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-03 09:12:40 -07:00
Sage Weil
74ea0cb541 doc: update release-process.rst
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-03 08:44:52 -07:00
Sage Weil
9cabbb26c1 mds: fix stray reintegration check in handle_client_rename
The stray reintegration generates a source path that will be rooted in a
(possibly remote) MDS's MDSDIR; adjust this check accordingly.  This is a
holdover from way back when the straydir was the base of the tree instead
of mdsdir.

Reported-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-03 08:23:08 -07:00
Gary Lowell
2519bd3932 doc: Added description of ceph release process. 2012-10-02 23:41:35 -07:00
Dan Mick
01bfe55962 Merge branch 'wip-msgr' into next 2012-10-02 16:06:59 -07:00
Dan Mick
67a201d64b Avoid sign-extension of non-magic Message* values
Cast to (unsigned long) when checking for magic values, so
real ptrs don't get sign-extended.  Avoids triggering
assert(inq == &local_queue) failure.

Fixes: #3251
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
2012-10-02 16:04:35 -07:00
Josh Durgin
9e8f69a0da qa: try to reproduce a race more times
This was failing occassionally in the nightly runs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-02 12:33:07 -07:00
Yan, Zheng
e8df6a74ca mds: Avoid creating unnecessary snaprealm
When moving directory between snaprealms, we can avoid creating snaprealm
if the directory doesn't has its own snaprealm and directory was created
after both realms' newest snapshot.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:26:20 -07:00
Yan, Zheng
5673523242 mds: Properly re-calculate mdsdir inode's auth bit
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:26:20 -07:00
Yan, Zheng
60b93a71d1 mds: Trim non auth subtree directory
Trim non auth subtree directory if all its dentries were trimmed
and it's not bound of auth subtree.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:26:19 -07:00
Yan, Zheng
d2861d9a02 mds: Properly update dirty dir fragstat during log replay
Dirty dir fragstat is managed by filelock instead of nestlock.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:24:49 -07:00
Yan, Zheng
f8110cb082 mds: Allow export subtrees in other MDS' stray directory
Stray migration is implemented by rename, it may create auth subtrees
in other MDS' stray directory.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:24:48 -07:00
Yan, Zheng
1cc28d5887 mds: Avoid save unnecessary parent snaprealm
We can avoid save parent snaprealm if current_parent_since is greater
than parent snaprealm's newest sequence.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:23:54 -07:00
Yan, Zheng
824e593bd6 mds: Set metablob.renamed_dirino in do_rename_rollback()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:23:37 -07:00
Yan, Zheng
35dc221870 mds: Fix xlock imports
Xlock imports and capability imports are uncorrelated, we should call
xlock_import() even there is no capability import.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:22:47 -07:00
Yan, Zheng
bc1e52ff5f mds: Allow rename request for stray migration/reintegration
Allow rename request to modify system directory if it is for stray
migration/reintegration.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:22:35 -07:00
Yan, Zheng
c6c6de5d0d mds: Add finish callback to waiting_for_base_ino wait queue
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:22:25 -07:00
Yan, Zheng
7004829c35 mds: Consider stopping MDS when finding peer inode
To migrate strays, the receiving MDS need find stopping MDS' mdsdir

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:22:23 -07:00
Yan, Zheng
b8aeb76795 mds: Don't drop client request from MDS
MDS may send client request for stray migration/reintegration.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2012-10-02 11:22:21 -07:00
Sage Weil
e2f6ae03b8 filejournal: check lseek() return value on darwin
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-02 10:42:50 -07:00
Sage Weil
13b841c746 osdmap, mon: optional dump 'osd tree' in json
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-02 10:42:50 -07:00
Sam Lang
14de7a5336 client: Resolves coverity NULL dereference issue
Client::insert_trace() was handling readdir and lssnap replies
assuming that the directory inode was not null.  This commit
checks that the directory inode (returned as part of the trace)
is not null, and invokes insert_readdir_results() for the readdir
and lssnap replies.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-10-02 09:27:50 -07:00
Sage Weil
d250bb85f0 libcephfs: destroy cmount on ceph_shutdown()
Otherwise this chunk of the heap is leaked.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-01 21:08:27 -07:00
Sage Weil
965ab908fc filestore: check ioctl SYNC return code
CID 716860: Unchecked return value (CHECKED_RETURN)
At (22): Calling function "ioctl(int, unsigned long, ...)" without checking return value (as is done elsewhere 30 out of 31 times).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-01 21:02:43 -07:00
Samuel Just
8237f6869f obj_bencher: fix leak in error path
CID 717076: Resource leak (RESOURCE_LEAK)At (26): Variable "newContents" going
out of scope leaks the storage it points to.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-10-01 15:41:24 -07:00
Samuel Just
709ff1457b PG: assert auth is not end in _compare_scrubmaps
This should make coverity happy.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-10-01 15:27:10 -07:00
Samuel Just
7ca754bec0 FileStore: copy paste error _do_copy_range
CID 728419: Copy-paste error (COPY_PASTE_ERROR)At (2): "srcoff" in "actual !=
(int64_t)srcoff" looks like a copy-paste error. Should it say "dstoff" instead?

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-10-01 15:23:00 -07:00
John Wilkins
106dc66fe4 doc: Removed languages from librados in tech-specific stack diagrams.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-10-01 14:53:57 -07:00
John Wilkins
763ae7c5b3 doc: Added stack diagram for rgw. Noted NO MDS. Corrected namespace comment.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-10-01 14:09:21 -07:00