Commit Graph

24171 Commits

Author SHA1 Message Date
Sage Weil
0be28af0bb Merge remote-tracking branch 'gh/next' 2013-02-24 13:22:47 -08:00
Neil Levine
35c951f362 Minor wording change.
Signed-off-by: Neil Levine <neil.levine@inktank.com>
2013-02-24 07:24:27 -08:00
Neil Levine
6bae2a5d46 Grammar typo
Signed-off-by: Neil Levine <neil.levine@inktank.com>
2013-02-24 07:24:27 -08:00
Neil Levine
3896896cf4 Changes to the OS support, multi-data center, and hypervisor questions.
Signed-off-by: Neil Levine <neil.levine@inktank.com>
2013-02-24 07:24:21 -08:00
Sage Weil
0cd215ee5b mds: reencode MDSMap in MMDSMap if MDSENC feature is not present
In some cases the MMDSMap message from mon -> client passes from leader ->
peon -> client, and the leader doesn't encode with the correct feature
bits.  As with MMOSDMap, we reencode the nested MDSMap based on the
features if relevant bits are not present.

We forgot to include this with the mds encoding changes.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-23 16:36:52 -08:00
Sage Weil
c07e8ea7dd qa/run_xfstests.sh: use $TESTDIR instead of /tmp/cephtest
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-23 08:38:10 -08:00
Sage Weil
8235b16c1a osd: an interval can't go readwrite if its acting is empty
Let's not forget that min_size can be zero.

Fixes: #4159
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 4277265d99)
2013-02-23 08:34:07 -08:00
Sage Weil
704db85013 mkcephfs: create mon data dir prior to ceph-mon --mkfs
ceph-mon now expects this directory to already exist.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-22 16:24:23 -08:00
John Wilkins
10f50d353e doc: Added a lot of info to OSD troubleshooting.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-22 15:38:20 -08:00
John Wilkins
e68f2c85d3 doc: Added mention of Admin Socket interface and brief description.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-22 15:37:03 -08:00
John Wilkins
73317bd78e doc: Changed title to OSD and PG, indicating both subjects are covered.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-22 15:35:24 -08:00
John Wilkins
ab7039d616 doc: Added references from monitoring OSD to troubleshooting OSD.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-22 15:34:38 -08:00
John Wilkins
97cc738963 doc: set maxdepth to 2, so TOC isn't so long with new OSD troubleshooting.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-02-22 15:33:43 -08:00
Sage Weil
7c94083643 client: use 4MB f_bsize and f_frsize for statfs
Old stat(1) reports:

  Block size: 1048576    Fundamental block size: 1048576

and the df(1) arithmetic works out.  New stat(1) reports:

  Block size: 1048576    Fundamental block size: 4096

which is what we are shoving into statvfs, but we have the b_size and
fr_size arithmetic swapped.  However, doing the *correct* reporting would
then break the old stat by making both sizes appear to be 4KB (or
whatever).

Sidestep the issue by making *both* values 4MB.. which is both large enough
to report large FS sizes, and also the default stripe size and thus a
"reasonable" value to report for a block size.

Perhaps in the future, when we no longer care about old userland, we can
report the page size for f_bsize, which is probably the "most correct"
thing to do.

Fixes: #3794.  See also #3793.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-02-22 15:15:31 -08:00
Sage Weil
64267eb3d8 test/librados/watch_notify: fix warning
In file included from test/librados/watch_notify.cc:8:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int, T2 = int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int, T2 = int, bool lhs_is_null_literal = false]’
test/librados/watch_notify.cc:67:224: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-22 14:57:45 -08:00
Sage Weil
53586e71f3 ceph-object-corpus: re-update
This was set by 9af94eea20, then single
paxos merge, then accidentally reverted by the next commit
6cb53740f2.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-22 14:40:10 -08:00
Samuel Just
2dae6a68ee PG::proc_replica_log: oinfo.last_complete must be *before* first entry in omissing
Fixes: #4189
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-22 14:19:55 -08:00
Sage Weil
e4fd70fcec Merge remote-tracking branch 'gh/wip-rbd-flatten-deadlock'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-22 14:23:45 -08:00
Sage Weil
e03657e452 Merge remote-tracking branch 'gh/wip-objecter-fsx'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-22 14:16:07 -08:00
David Zafman
d612a9abac Merge branch 'wip-3403-4-rebase'
Feature: #3403

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-02-22 12:50:19 -08:00
Josh Durgin
3105034067 objecter: don't resend linger ops unnecessarily
recalc_linger_op_target() was checking and then setting
linger_op->pgid and linger_op->active, but these were only set by
recalc_linger_op_target(). This was only called by handle_osd_map(),
so the first osdmap after a watch was established would cause a resend
of the watch. Analogous to the normal Op, set this information by
calling recalc_linger_op_target in send_linger().

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-21 23:33:46 -08:00
Josh Durgin
15bb9ba9fb objecter: initialize linger op snapid
Since they are write ops now, it must be CEPH_NOSNAP or the OSD
returns EINVAL.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-21 23:23:02 -08:00
David Zafman
5648117626 Add test for list_watchers() C++ interface
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-02-21 21:50:02 -08:00
David Zafman
1c3241e3bf Add listwatchers command to rados
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-02-21 21:50:02 -08:00
David Zafman
af339aee46 Add ObjectReadOperation and IoCtx functions
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-02-21 21:50:02 -08:00
David Zafman
cfe923920c librados: expose a list of watchers on an object
Add new op CEPH_OSD_OP_LIST_WATCHERS
Add Objecter handling

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-02-21 21:50:02 -08:00
David Zafman
bf5cf3318d Add rados_types.h header file
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-02-21 21:50:01 -08:00
Dan Mick
8c05af5dc3 configuration parsing: give better error for missing =
A ceph.conf line with "key" and no "= value" currently shows
"unexpected character while parsing putative key value,
at char N line M".  There's no reason it can't be clearer.

Fixes: #4229
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-21 21:45:27 -08:00
Sage Weil
dc181224ab osd/PG: fix typo, missing -> omissing
From ce7ffc3440.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-21 17:55:21 -08:00
Josh Durgin
94ae725465 test_librbd_fsx: fix image closing
Always close the image we opened in check_clone(), and check the
return code of the rbd_close() called before cloning.

Refs: #3958
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-21 17:39:22 -08:00
Sage Weil
6c08c7c1c6 objecter: separate out linger_read() and linger_mutate()
A watch is a mutation, while a notify is a read.  The mutations need to
pass in a proper snap context to be fully correct.

Also, make the WRITE flag implicit so the caller doesn't need to pass it
in.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-21 17:31:41 -08:00
Sage Weil
de4fa95f03 osd: make watch OSDOp print sanely
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-21 17:31:41 -08:00
Sage Weil
60ebf02a28 Merge branch 'next' 2013-02-21 17:30:46 -08:00
Sage Weil
dd007db3ca ceph_common.sh: fix iteration of items in ceph.conf
This broke in c8f528a407.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-21 17:30:06 -08:00
Dan Mick
6cb53740f2 ceph-conf.rst: missing '=' in example network settings
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-02-21 17:02:17 -08:00
Sage Weil
9af94eea20 Merge remote-tracking branch 'gh/wsp.bobtail.2merge' 2013-02-21 15:45:36 -08:00
Samuel Just
ce7ffc3440 PG::proc_replica_log: adjust oinfo.last_complete based on omissing
Otherwise, search_for_missing may neglect to check the missing
set for some objects assuming that if the need version is
prior to last_complete, the replica must have it.

Fixes: #4994
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-21 15:37:14 -08:00
Samuel Just
8086d1d8c0 Merge remote-tracking branch 'upstream/wip_clone_attrs'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-21 14:42:33 -08:00
Greg Farnum
79f09bf33e MDS: remove a few other unnecessary is_base() checks
We should let users remove xattrs as well as set them. ;) And
the check in handle_client_setlayout was totally useless -- perhaps
intended for setdirlayout?

This is a follow-on to 9f82ae60fa and
should be taken wherever it goes.

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-02-21 14:30:42 -08:00
Greg Farnum
9f82ae60fa mds: allow xattrs on the root inode
This was previously disallowed because Once Upon a Time, the root
inode wasn't persisted to disk and was an entirely in-memory construct. But
it's safe now, and has been for a while.

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-02-21 14:21:08 -08:00
Greg Farnum
6bd8781dda mds: use inode_t::layout for dir layout policy
This cherry-pick is going in the reverse direction of normal. That's
because this direction makes for the minimal change -- this patchset
is required to fix the loss of directory layouts we were previously
seeing, but fixing it requires changing the encoding versions. So we
wrote it on top of Bobtail and let it update the struct_v's as they existed
then. Note that we here change a few encoding versions in ways which are
NOT COMPATIBLE with previous development code (but not any releases). In
particular, development code introduced and this removes the
file_layout_policy_t, and some of the CInode and EMetaBlob encoding
struct_v values were used in development code to mean one thing, but
mean something different due to the Bobtail patch.

Remove the default_file_layout struct, which was just a ceph_file_layout,
and store it in the inode_t.  Rip out all the annoying code that put this
on the heap.

To aid in this usage, add a clear_layout() function to inode_t.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 36ed407e0f)
Conflicts:

	src/mds/CInode.cc
	src/mds/CInode.h
	src/mds/MDCache.cc
	src/mds/Server.cc
	src/mds/events/EMetaBlob.h
Cherry-pick-
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-21 13:44:01 -08:00
Sage Weil
84ef1649c5 mds: parse ceph.*.layout vxattr key/value content
Use qi to parse a strictly formatted set of key/value pairs.  Be picky
about whitespace.  Any subset of recognized keys is allowed.  Parse the
same set of keys as the ceph.*.layout.* vxattrs.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 5551aa5b3b)
2013-02-21 13:44:01 -08:00
Sage Weil
fea77682a6 osdc/Objecter: unwatch is a mutation, not a read
This was causing librados to unblock after the ACK on unwatch, which meant
that librbd users raced and tried to delete the image before the unwatch
change was committed..and got EBUSY.  See #3958.

The watch operation has a similar problem.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-21 13:28:47 -08:00
Samuel Just
81bd996428 FileStore::_clone: use _fsetattrs rather than _setattrs
The omap portion of the clone happened above in DBObjectMap::clone.
Only the fs stored attrs need to be explicitely copied.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-21 13:28:26 -08:00
Samuel Just
5b48e63c03 FileStore::_setattrs: use _fsetattrs
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-21 13:26:56 -08:00
Samuel Just
c33c51f01f FileStore: add _fsetattrs
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-21 13:26:40 -08:00
Samuel Just
2ec04f9633 FileStore::_setattrs: only do omap operations if necessary
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-21 13:25:49 -08:00
Samuel Just
83fad1c7f2 FileStore::_setattrs no need to grab an Index lock for the omap operations
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-21 13:24:42 -08:00
Yehuda Sadeh
08efb158ae Merge pull request #67 from jaharkes/content_length
Handle empty CONTENT_LENGTH environment variable.
2013-02-21 12:59:06 -08:00
Jan Harkes
ad00fc72e1 Fix failing > 4MB range requests through radosgw S3 API.
When a range request is made for more than rgw_get_obj_max_req_size
bytes the first returned chunk sets 'ret' to STATUS_PARTIAL_CONTENT and
all remaining chunks behave as if there is an error state and only
return a minimal header.

Fix this by passing STATUS_PARTIAL_CONTENT to set_req_state_err, but
leave the 'ret' member variable untouched.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit c83a01d4e8)
2013-02-21 12:51:40 -08:00