]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agodoc: minor fixups to rpm install doc
Sage Weil [Thu, 27 Sep 2012 00:38:24 +0000 (17:38 -0700)]
doc: minor fixups to rpm install doc

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: draft rpm installation
Gary Lowell [Wed, 26 Sep 2012 20:47:29 +0000 (13:47 -0700)]
doc: draft rpm installation

12 years agoMerge remote-tracking branch 'gh/wip-3186
Sage Weil [Thu, 27 Sep 2012 00:06:03 +0000 (17:06 -0700)]
Merge remote-tracking branch 'gh/wip-3186

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: different test for multi object delete
Yehuda Sadeh [Wed, 26 Sep 2012 23:55:15 +0000 (16:55 -0700)]
rgw: different test for multi object delete

We need to check for the existence of the sub-resource.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-coverity-client'
Sage Weil [Wed, 26 Sep 2012 23:45:07 +0000 (16:45 -0700)]
Merge branch 'wip-coverity-client'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoclient: Fix coverity UNINIT_CTOR defects
Sam Lang [Wed, 26 Sep 2012 02:32:52 +0000 (19:32 -0700)]
client: Fix coverity UNINIT_CTOR defects

Coverity finds cases where constructors are not initializing
all the members of the struct/class.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fix coverity 716909 [FORWARD_NULL]
Sam Lang [Wed, 26 Sep 2012 02:11:45 +0000 (19:11 -0700)]
client: Fix coverity 716909 [FORWARD_NULL]

If we fill the request path from the dentry instead of the inode, we
need to use the dentry inode.  This fixes a segfault that would occur
in the case where request->inode is in fact null.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Add asserts for coverity bugs
Sam Lang [Wed, 26 Sep 2012 02:03:49 +0000 (19:03 -0700)]
client: Add asserts for coverity bugs

Coverity 716907-716909 [FORWARD_NULL} doesn't like using a pointer
that might be null.  Assertions check that pointers are valid
before dereferencing.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fixes coverity defect 716891
Sam Lang [Tue, 25 Sep 2012 16:13:26 +0000 (09:13 -0700)]
client:  Fixes coverity defect 716891

Fix for coverity defect 716891 [DEADCODE] in
Client::encode_dentry_release where the released var is initialized
to 0, but never set, so the pre-emptive release of the dentry
capability (if requested by the drop flag) never happens.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fixes coverity defect 716890 [DEADCODE]
Sam Lang [Tue, 25 Sep 2012 16:07:00 +0000 (09:07 -0700)]
client:  Fixes coverity defect 716890 [DEADCODE]

In choose_target_mds, the mds number is initialized to 0 and
then a separate target mds number is chosen based on the inode
set in the request.  If the inode isn't set, we drop to choosing
a random mds, but only if the mds number is < 0, which doesn't
happen with the initialize to 0.  This fix initializes the mds
number to -1, ensuring a random mds is chosen.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Coverity fixes for 716841-716844
Sam Lang [Tue, 25 Sep 2012 16:04:02 +0000 (09:04 -0700)]
client: Coverity fixes for 716841-716844

Fixes coverity errors (CHECKED_RETURN) for all calls to
Client::path_walk() where return value wasn't getting checked
in case of error.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agocephfs: Fixes for coverity bugs 716840 and 716970
Sam Lang [Tue, 25 Sep 2012 14:03:57 +0000 (07:03 -0700)]
cephfs:  Fixes for coverity bugs 716840 and 716970

Fixes for two coverity bugs in cephfs.cc.

716840 (CHECKED_RETURN) reported that the return value from
fstat wasn't getting checked.  It now is checked, reports an
error and returns to the caller.

716970 (NEGATIVE_RETURNS) reported that the file descriptor passed
to fstat (*fd) might be negative, which isn't allowed.  The check at
the top that open failed wasn't aborting the function (when *fd < 0),
now it does.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomds: Move check for empty path lookup to getattr
Sam Lang [Wed, 26 Sep 2012 23:04:50 +0000 (16:04 -0700)]
mds: Move check for empty path lookup to getattr

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agodoc: Fixed typo.
John Wilkins [Wed, 26 Sep 2012 18:06:26 +0000 (11:06 -0700)]
doc: Fixed typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-mon-gv'
Sage Weil [Wed, 26 Sep 2012 16:47:18 +0000 (09:47 -0700)]
Merge remote-tracking branch 'gh/wip-mon-gv'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Conflicts:
src/include/ceph_features.h

12 years agoclient: Fix for #3184 cfuse segv with no keyring
Sam Lang [Mon, 24 Sep 2012 16:55:25 +0000 (09:55 -0700)]
client: Fix for #3184 cfuse segv with no keyring

Fixes bug #3184 where the ceph-fuse client segfaults if authx is
enabled but no keyring file is present.  This was due to the
client->init() return value not getting checked.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomds: fix ino release on session close
Sage Weil [Sat, 22 Sep 2012 05:20:09 +0000 (22:20 -0700)]
mds: fix ino release on session close

If we project an inode release, we need to follow through, even if for
some reason we decide to keep the session active.  Clear out the session
interval_sets in case that happens.

Fixes: #1677
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-rbd-coverity
Sage Weil [Wed, 26 Sep 2012 05:31:23 +0000 (22:31 -0700)]
Merge remote-tracking branch 'gh/wip-rbd-coverity

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoclient: Put all libcephfs gtest tests into one bin
Sam Lang [Wed, 26 Sep 2012 01:14:12 +0000 (18:14 -0700)]
client: Put all libcephfs gtest tests into one bin

* Modify the Makefile.am to run all gtest libcephfs tests through
a single binary: test_libcephfs.

* Add tests for #2285, #3186, and #2778

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomds: Handle empty relpath from client getattr
Sam Lang [Wed, 26 Sep 2012 00:55:05 +0000 (17:55 -0700)]
mds: Handle empty relpath from client getattr

A bug in the client (see 2b54391) results in an empty relpath on
a lookup request.  This causes a segfault in the mds, because the
getattr logic expects a lookup to have a relpath to place in the
response.  The fix here ensures that lookups include a non-empty
relpath, o.w. aborting the request and returning -EINVAL to the
client.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agodoc: Added an anchor to enable linking from CRUSH map section.
John Wilkins [Tue, 25 Sep 2012 21:55:54 +0000 (14:55 -0700)]
doc: Added an anchor to enable linking from CRUSH map section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Clarified descriptions, and improved IA and navigation.
John Wilkins [Tue, 25 Sep 2012 21:55:22 +0000 (14:55 -0700)]
doc: Clarified descriptions, and improved IA and navigation.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoclient: Fix to client filepath initializing
Sam Lang [Tue, 25 Sep 2012 21:48:32 +0000 (14:48 -0700)]
client: Fix to client filepath initializing

The filepath constructor that takes a const char * is missing the
initializer for the encoded member.  This results in uninitialized
memory, so the encoded field is sometimes true, resulting in mds
crashes (see #3186) and client errors with empty components in path
names.  This commit fixes #3186 and #2285.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomon: include auth mon's paxos version on latest gv calculation
Joao Eduardo Luis [Tue, 25 Sep 2012 21:32:29 +0000 (22:32 +0100)]
mon: include auth mon's paxos version on latest gv calculation

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: fix broken link in command reference
Ross Turk [Tue, 25 Sep 2012 19:59:42 +0000 (12:59 -0700)]
doc: fix broken link in command reference

Signed-off-by: Ross Turk <ross@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-2525'
Sage Weil [Tue, 25 Sep 2012 19:39:03 +0000 (12:39 -0700)]
Merge remote-tracking branch 'gh/wip-2525'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: init all variables in ctors
Josh Durgin [Tue, 25 Sep 2012 19:18:38 +0000 (12:18 -0700)]
librados: init all variables in ctors

C_aio_sparse_read_Ack's members are filled in by the only caller
immediately after construction, so make them arguments to the
constructor.

CID 717218: Uninitialized pointer field (UNINIT_CTOR)
At (4): Non-static class member "m" is not initialized in this
constructor nor in any functions that it calls.

WatchContext: these variables are unused, so remove them.

CID 717217: Uninitialized scalar field (UNINIT_CTOR)
At (4): Non-static class member "ver" is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agotest_librbd_fsx: add missing break statement
Josh Durgin [Tue, 25 Sep 2012 17:51:57 +0000 (10:51 -0700)]
test_librbd_fsx: add missing break statement

Fortunately we never used the -m option.

CID 716962: Missing break in switch (MISSING_BREAK)
At (1): This case (value 109) is not terminated by a 'break'
statement. # (use "git add <file>..." to update what will be
committed)

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: assert overflow will not happen
Josh Durgin [Tue, 25 Sep 2012 17:42:38 +0000 (10:42 -0700)]
librbd: assert overflow will not happen

CID 716937: Overflowed return value (INTEGER_OVERFLOW)
At (3): Overflowed or truncated value (or a value computed from an
overflowed or truncated value) "offset" used as return value.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomds: Adjust mydir auth when starting MDS that was stopped cleanly
Yan, Zheng [Tue, 25 Sep 2012 05:46:06 +0000 (13:46 +0800)]
mds: Adjust mydir auth when starting MDS that was stopped cleanly

When starting a MDS that was stopped cleanly, we need manually
adjust mydir's auth. This is because MDS log is empty in this case,
mydir's auth can not be adjusted during log replay.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agomds: Fix SessionMap::is_any_state()
Yan, Zheng [Mon, 24 Sep 2012 11:27:08 +0000 (19:27 +0800)]
mds: Fix SessionMap::is_any_state()

is_any_state() should return false when the by_state list is empty.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-rbd-coverity'
Josh Durgin [Tue, 25 Sep 2012 01:16:12 +0000 (18:16 -0700)]
Merge branch 'wip-rbd-coverity'

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agorbd: fix leak of dir handle in get_rbd_seq
Josh Durgin [Tue, 25 Sep 2012 00:35:09 +0000 (17:35 -0700)]
rbd: fix leak of dir handle in get_rbd_seq

CID 717098: Resource leak (RESOURCE_LEAK)
At (6): Variable "device_dir" going out of scope leaks the storage it
points to.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: fix leak of fd on error when reading an entire file
Josh Durgin [Mon, 24 Sep 2012 22:29:13 +0000 (15:29 -0700)]
rbd: fix leak of fd on error when reading an entire file

CID 717100: Resource leak (RESOURCE_LEAK)
At (6): Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: fix leak of fd when importing an image from a file
Josh Durgin [Mon, 24 Sep 2012 22:27:55 +0000 (15:27 -0700)]
rbd: fix leak of fd when importing an image from a file

CID 719579: Resource leak (RESOURCE_LEAK)
At (7): Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agosecret: close fd on error
Josh Durgin [Mon, 24 Sep 2012 22:20:14 +0000 (15:20 -0700)]
secret: close fd on error

CID 717079: Resource leak (RESOURCE_LEAK)
At (6): Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: always free buffer allocated by md_config_t::_get_val
Josh Durgin [Mon, 24 Sep 2012 22:12:11 +0000 (15:12 -0700)]
librados: always free buffer allocated by md_config_t::_get_val

CID 717083: Resource leak (RESOURCE_LEAK)
At (3): Variable "str" going out of scope leaks the storage it points
to.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: fix use without NULL check in rados_pool_list
Josh Durgin [Mon, 24 Sep 2012 22:03:56 +0000 (15:03 -0700)]
librados: fix use without NULL check in rados_pool_list

CID 716911: Dereference after null check (FORWARD_NULL)
At (5): Passing null pointer "b" to function "strncat(char *, char
const *, size_t)", which dereferences it. (The dereference is assumed
on the basis of the 'nonnull' parameter attribute.)

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrados: init everything in default IoCtxImpl ctor
Josh Durgin [Mon, 24 Sep 2012 21:56:45 +0000 (14:56 -0700)]
librados: init everything in default IoCtxImpl ctor

CID 717219: Uninitialized pointer field (UNINIT_CTOR)
At (14): Non-static class member "objecter" is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: make sure we have a device before trying to unmap
Josh Durgin [Mon, 24 Sep 2012 21:49:27 +0000 (14:49 -0700)]
rbd: make sure we have a device before trying to unmap

CID 717444: Explicit null dereferenced (FORWARD_NULL)
 At (48): Passing null pointer "devpath" to function
"do_kernel_rm(char const *)", which dereferences it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: fix list for more than 1024 format 2 images
Josh Durgin [Mon, 24 Sep 2012 21:28:40 +0000 (14:28 -0700)]
librbd: fix list for more than 1024 format 2 images

r was not being set in the loop.

CID 716936: Infinite loop (INFINITE_LOOP)
At (1): Top of the loop.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: don't allow order to be more than 64
Josh Durgin [Mon, 24 Sep 2012 21:26:51 +0000 (14:26 -0700)]
librbd: don't allow order to be more than 64

Otherwise it will overflow a uint64_t when shifting.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: use 64-bits to shift order
Josh Durgin [Mon, 24 Sep 2012 21:25:26 +0000 (14:25 -0700)]
librbd: use 64-bits to shift order

Order is never actually this high currently, but it be via librbd.

CID 716937: Overflowed return value (INTEGER_OVERFLOW)
At (3): Overflowed or truncated value (or a value computed from an
overflowed or truncated value) "offset" used as return value.

CID 717012: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
At (1): Potentially overflowing expression "1 << obj_order" with type
"int" (32 bits, signed) is evaluated using 32-bit arithmetic before
being used in a context which expects an expression of type "uint64_t"
(64 bits, unsigned). To avoid overflow, cast the left operand to
"uint64_t" before performing the left shift.

CID 717011: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
At (1): Potentially overflowing expression "1 << order" with type
"int" (32 bits, signed) is evaluated using 32-bit arithmetic before
being used in a context which expects an expression of type "uint64_t"
(64 bits, unsigned). To avoid overflow, cast the left operand to
"uint64_t" before performing the left shift.

CID 717013: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
At (1): Potentially overflowing expression "1 << order" with type
"int" (32 bits, signed) is evaluated using 32-bit arithmetic before
being used in a context which expects an expression of type "uint64_t"
(64 bits, unsigned). To avoid overflow, cast the left operand to
"uint64_t" before performing the left shift.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: init cookie in WatchCtx ctor
Josh Durgin [Mon, 24 Sep 2012 20:42:57 +0000 (13:42 -0700)]
librbd: init cookie in WatchCtx ctor

CID 717226: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "cookie" is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: init m_req in LibrbdWriteback::C_Read ctor
Josh Durgin [Mon, 24 Sep 2012 20:40:50 +0000 (13:40 -0700)]
librbd: init m_req in LibrbdWriteback::C_Read ctor

CID 717225: Uninitialized pointer field (UNINIT_CTOR)
At (2): Non-static class member "m_req" is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: initialize on-disk header in ImageCtx ctor
Josh Durgin [Mon, 24 Sep 2012 20:32:11 +0000 (13:32 -0700)]
librbd: initialize on-disk header in ImageCtx ctor

CID 717224: Uninitialized scalar field (UNINIT_CTOR)
At (26): Non-static class member field "header.snaps" is not
initialized in this constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: init everything in default AioRequest constructors
Josh Durgin [Mon, 24 Sep 2012 20:19:59 +0000 (13:19 -0700)]
librbd: init everything in default AioRequest constructors

CID 717222: Uninitialized pointer field (UNINIT_CTOR)
At (16): Non-static class member "m_hide_enoent" is not initialized
in this constructor nor in any functions that it calls.

CID 717223: Uninitialized scalar field (UNINIT_CTOR)
At (4): Non-static class member "m_has_parent" is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: fix coverity warnings for AioCompletions
Josh Durgin [Mon, 24 Sep 2012 19:58:21 +0000 (12:58 -0700)]
librbd: fix coverity warnings for AioCompletions

CID 717220: Uninitialized pointer field (UNINIT_CTOR)
At (4): Non-static class member "aio_type" is not initialized in this
constructor nor in any functions that it calls.

CID 717221: Uninitialized pointer field (UNINIT_CTOR)
At (2): Non-static class member "m_req" is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Mon, 24 Sep 2012 20:16:23 +0000 (13:16 -0700)]
Merge branch 'next'

12 years agodoc: Added messaging section to ref. Placeholders. Definitions needed.
John Wilkins [Mon, 24 Sep 2012 04:55:53 +0000 (21:55 -0700)]
doc: Added messaging section to ref. Placeholders. Definitions needed.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added space for Emacs users.
John Wilkins [Mon, 24 Sep 2012 04:54:44 +0000 (21:54 -0700)]
doc: Added space for Emacs users.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added journal section placeholders. Definitions needed.
John Wilkins [Mon, 24 Sep 2012 04:54:20 +0000 (21:54 -0700)]
doc: Added journal section placeholders. Definitions needed.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed hyperlink.
John Wilkins [Mon, 24 Sep 2012 04:53:36 +0000 (21:53 -0700)]
doc: Fixed hyperlink.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Clean up and added placeholders for new definitions.
John Wilkins [Mon, 24 Sep 2012 04:52:43 +0000 (21:52 -0700)]
doc: Clean up and added placeholders for new definitions.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed hyperlink.
John Wilkins [Mon, 24 Sep 2012 04:51:43 +0000 (21:51 -0700)]
doc: Fixed hyperlink.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed hyperlink.
John Wilkins [Mon, 24 Sep 2012 04:51:26 +0000 (21:51 -0700)]
doc: Fixed hyperlink.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Restored "Differences from Posix" to /doc/dev
John Wilkins [Mon, 24 Sep 2012 04:50:53 +0000 (21:50 -0700)]
doc: Restored "Differences from Posix" to /doc/dev

Fixes: #3185
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Adds package deps to list in README
Sam Lang [Sun, 23 Sep 2012 23:58:46 +0000 (16:58 -0700)]
doc: Adds package deps to list in README

The README provides a list of packages needed to successfully
configure ceph.  uuid-dev and libatomic-ops-dev are missing from
the list.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agolibrados: cleanup: use Mutex::Locker
Sage Weil [Sat, 22 Sep 2012 05:36:41 +0000 (22:36 -0700)]
librados: cleanup: use Mutex::Locker

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrados: protect lookup_pool, get_pool_name with lock
Sage Weil [Sat, 22 Sep 2012 05:36:08 +0000 (22:36 -0700)]
librados: protect lookup_pool, get_pool_name with lock

Fixes: #2525
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: tolerate no session on no_reply()
Sage Weil [Sat, 22 Sep 2012 04:05:27 +0000 (21:05 -0700)]
mon: tolerate no session on no_reply()

We remove the Session* in ms_handle_reset().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Accepter: assert that listen_sd always >= 0
Sage Weil [Thu, 20 Sep 2012 17:15:23 +0000 (10:15 -0700)]
msg/Accepter: assert that listen_sd always >= 0

The listen_sd is set by bind(); we should never call stop() when it is
is still negative.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Accepter: fix race in accepter shutdown
Sage Weil [Thu, 20 Sep 2012 17:14:24 +0000 (10:14 -0700)]
msg/Accepter: fix race in accepter shutdown

We want to avoid a race like:

- entry() starts, populates pfd with listen_sd, gets past !done check
- stop() does shutdown + close on listen_sd
- someone else opens a new fd
- entry() thread calls poll(2) on wrong sd
- stop() calls join, waits forever for entry thread

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: prepare_update_index should not error on system bucket
Yehuda Sadeh [Fri, 21 Sep 2012 16:53:49 +0000 (09:53 -0700)]
rgw: prepare_update_index should not error on system bucket

Should just return true. This way we don't need higher level
functions to be aware of system buckets. Also, don't use
marker.empty() to test for system bucket, use bucket_is_system().

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph-object-corpus: update with v0.52 objects
Sage Weil [Thu, 20 Sep 2012 23:49:32 +0000 (16:49 -0700)]
ceph-object-corpus: update with v0.52 objects

These were generated a few days prior to v0.52 release, but well after
freeze.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'upstream/wip-osd-qlock'
Samuel Just [Thu, 20 Sep 2012 23:11:05 +0000 (16:11 -0700)]
Merge remote-tracking branch 'upstream/wip-osd-qlock'

12 years agouuid: include unistd to make encode testing work
Sage Weil [Thu, 20 Sep 2012 22:40:13 +0000 (15:40 -0700)]
uuid: include unistd to make encode testing work

The expanded encode/decode macros need getpid(2) and close(2).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoqa: move all rados class unit tests into qa/workunits/cls
Sage Weil [Thu, 20 Sep 2012 22:12:39 +0000 (15:12 -0700)]
qa: move all rados class unit tests into qa/workunits/cls

This includes the existing rbd one; teh suite is getting fixed to match.

See #3097.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: rename test_rados_api_cls_lock -> test_cls_lock
Sage Weil [Thu, 20 Sep 2012 21:43:26 +0000 (14:43 -0700)]
Makefile: rename test_rados_api_cls_lock -> test_cls_lock

Keep this consistent with the other rados classes

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-vstartfixes'
Sam Lang [Thu, 20 Sep 2012 21:24:26 +0000 (14:24 -0700)]
Merge branch 'wip-vstartfixes'

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agovstart.sh: Alternative fix for vstart.sh -n
Sam Lang [Thu, 20 Sep 2012 15:54:45 +0000 (08:54 -0700)]
vstart.sh: Alternative fix for vstart.sh -n

The previous fix (0f7c516f3e) breaks osd startup with -k.  This one
from dmick just tells the ceph-mon which keyring to use through the
command line rather than moving the keyring path to the [global]
section of the config file.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMakefile.am: librdb_fsx test needs math library on some platforms
Gary Lowell [Thu, 20 Sep 2012 20:47:09 +0000 (13:47 -0700)]
Makefile.am: librdb_fsx test needs math library on some platforms

12 years agoMerge remote-tracking branch 'gh/wip-1957'
Sage Weil [Thu, 20 Sep 2012 18:54:17 +0000 (11:54 -0700)]
Merge remote-tracking branch 'gh/wip-1957'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: link to full 0.48.2 changelog
Sage Weil [Thu, 20 Sep 2012 18:51:49 +0000 (11:51 -0700)]
doc: link to full 0.48.2 changelog

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: Clean up finished two phase commits
Yan, Zheng [Wed, 19 Sep 2012 07:52:36 +0000 (15:52 +0800)]
mds: Clean up finished two phase commits

When handling master request with slaves, the mds could crash
after receiving all slaves' commit acknowledgement, but before
journalling the ECommitted. Current MDS recovery code does not
handle this case correctly, the request will be left in
LogSegment's uncommitted_masters after recovery is finished.
It prevents LogSegment from being trimmed. The fix is find and
clean up request of this kind when recovery enters rejoin stage.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocfuse: Define CEPH_INO_DOTDOT (3) for top-level parentdir
Sam Lang [Thu, 20 Sep 2012 17:24:35 +0000 (10:24 -0700)]
cfuse: Define CEPH_INO_DOTDOT (3) for top-level parentdir

Defines the macro CEPH_INO_DOTDOT (to 3) and uses it as the top-level
parent directory (..) inode number.  The value of 2 is already taken
by the .ceph hidden directory.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoceph_common.sh: 'hostname -s' (instead of cut ...)
Sage Weil [Tue, 18 Sep 2012 20:31:06 +0000 (13:31 -0700)]
ceph_common.sh: 'hostname -s' (instead of cut ...)

This will also match up with the instructions in the docs.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: v0.48.2argonaut release notes
Sage Weil [Thu, 20 Sep 2012 16:42:58 +0000 (09:42 -0700)]
doc: v0.48.2argonaut release notes

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocfuse: Add the parent entry (..) for a top-level readdir
Sam Lang [Thu, 20 Sep 2012 00:47:21 +0000 (17:47 -0700)]
cfuse: Add the parent entry (..) for a top-level readdir

In the lowlevel fuse api, the current (.) and parent (..) entries
must be added manually in a readdir call.  For the root directory
the parent is not a ceph inode, so we give it a fake inode value
(2) and intercept that inode on a getattr.

Fixes: #1957
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge branch 'wip-mon'
Sage Weil [Thu, 20 Sep 2012 00:05:45 +0000 (17:05 -0700)]
Merge branch 'wip-mon'

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agodoc: Removed legacy doc. Not needed.
John Wilkins [Wed, 19 Sep 2012 23:28:40 +0000 (16:28 -0700)]
doc: Removed legacy doc. Not needed.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed legacy doc. Not needed.
John Wilkins [Wed, 19 Sep 2012 23:28:01 +0000 (16:28 -0700)]
doc: Removed legacy doc. Not needed.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed legacy doc. Not needed.
John Wilkins [Wed, 19 Sep 2012 23:27:16 +0000 (16:27 -0700)]
doc: Removed legacy doc. Not needed.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added enabling Swift access to rgw config.
John Wilkins [Wed, 19 Sep 2012 23:26:40 +0000 (16:26 -0700)]
doc: Added enabling Swift access to rgw config.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc; Added troubleshooting to index.
John Wilkins [Wed, 19 Sep 2012 23:25:49 +0000 (16:25 -0700)]
doc; Added troubleshooting to index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Copied contents of rgw troubleshooting over to the new ops section.
John Wilkins [Wed, 19 Sep 2012 23:25:11 +0000 (16:25 -0700)]
doc: Copied contents of rgw troubleshooting over to the new ops section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Reverted so that we don't force yes or non-interactive.
John Wilkins [Wed, 19 Sep 2012 23:24:12 +0000 (16:24 -0700)]
doc: Reverted so that we don't force yes or non-interactive.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed legacy usage.
John Wilkins [Wed, 19 Sep 2012 23:23:26 +0000 (16:23 -0700)]
doc: Removed legacy usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Cleanup, spell check, grammar check mostly.
John Wilkins [Wed, 19 Sep 2012 23:22:38 +0000 (16:22 -0700)]
doc: Cleanup, spell check, grammar check mostly.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Updating the index to remove legacy and uneeded entries.
John Wilkins [Wed, 19 Sep 2012 23:21:08 +0000 (16:21 -0700)]
doc: Updating the index to remove legacy and uneeded entries.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoFix description for --nodaemon
Sam Lang [Wed, 19 Sep 2012 22:34:24 +0000 (15:34 -0700)]
Fix description for --nodaemon

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomon: clean up recovered_leader() checks
Sage Weil [Wed, 19 Sep 2012 21:34:56 +0000 (14:34 -0700)]
mon: clean up recovered_leader() checks

Assert they are called only once per machine per election epoch.  Fix the
recovered_peon() caller to do that.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoAbort on failure
Sam Lang [Wed, 19 Sep 2012 21:34:04 +0000 (14:34 -0700)]
Abort on failure

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoFixup usage to reflect options available
Sam Lang [Wed, 19 Sep 2012 21:33:16 +0000 (14:33 -0700)]
Fixup usage to reflect options available

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoSwap current dir (.) with CEPH_BIN for OOT builds
Sam Lang [Wed, 19 Sep 2012 20:57:53 +0000 (13:57 -0700)]
Swap current dir (.) with CEPH_BIN for OOT builds

With out-of-tree builds, vstart.sh needs CEPH_BIN to be set, and
needs to look for init-ceph in CEPH_BIN rather than just ./init-ceph.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMove keyring option to global section
Sam Lang [Wed, 19 Sep 2012 20:22:59 +0000 (13:22 -0700)]
Move keyring option to global section

Using vstart.sh -n uses ceph-authtool to generate the keyring file
in ./keyring.  The vstart.sh script then writes out the ceph.conf
with a keyring option in the [client] section, so when the monitors
start, they can't find a keyring file.  This commit puts the keyring in
the [global] section.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomon: require MON_GV protocol feature
Sage Weil [Thu, 13 Sep 2012 00:49:24 +0000 (17:49 -0700)]
mon: require MON_GV protocol feature

Require the MON_GV feature when

 - we see the ondisk feature is set on bootup
 - we enable the ondisk feature

This means that once we form a quorum with the feature and enable it on
disk, there is no going back; we won't be able to talk to old monitors
without the feature, and a downgrade won't be possible.

Hopefully, in practice, any monitors with old code will be up at the time
we are upgrading, such that the quorum will not include the feature and we
won't make the transition.  Otherwise, if they are down, and the remaining
nodes have the feature and enable it, and the old code starts up, it won't
be able ot join until it is upgraded to the new code as well.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: move setting of ondisk GV feature into helper
Sage Weil [Thu, 13 Sep 2012 00:46:17 +0000 (17:46 -0700)]
mon: move setting of ondisk GV feature into helper

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: do not issue global versions if quorum does not support the feature
Sage Weil [Thu, 13 Sep 2012 00:37:40 +0000 (17:37 -0700)]
mon: do not issue global versions if quorum does not support the feature

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: set new incompat GV feature when paxos stabilizes for the first time
Sage Weil [Wed, 12 Sep 2012 23:23:33 +0000 (16:23 -0700)]
mon: set new incompat GV feature when paxos stabilizes for the first time

This is a marker that future versions will use to know whether they can
safely convert the monitor data to the new format.  If the GV feature is
not present, they will refuse to convert.

Also set the ondisk GV feature at the same time.

Signed-off-by: Sage Weil <sage@inktank.com>