]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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 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>
12 years agomon: make MRoute encoding backwards-compatible
Sage Weil [Tue, 18 Sep 2012 21:48:14 +0000 (14:48 -0700)]
mon: make MRoute encoding backwards-compatible

If the target as the NULLROUTE feature, use a new encoding that explicitly
indicates whether a message follows.  If the feature is absent, use the
old encoding.  The mon is responsible for not trying to send a null reply
if the target does not have the feature.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorbd/copy.sh: fix typo
Alex Elder [Wed, 19 Sep 2012 03:51:10 +0000 (22:51 -0500)]
rbd/copy.sh: fix typo

Or maybe it was a spello, or a thinko, or something.  In any case
I'm pretty sure Josh intended to call the function he added in
commit 78d6a60ca, and not the non-existent "test_import_args".

Signed-off-by: Alex Elder <elder@inktank.com>
(cherry picked from commit ed43d4de12a7aaa2fd46c1a80d9f338c4524fe47)

12 years agorbd/copy.sh: fix typo
Alex Elder [Wed, 19 Sep 2012 03:51:10 +0000 (22:51 -0500)]
rbd/copy.sh: fix typo

Or maybe it was a spello, or a thinko, or something.  In any case
I'm pretty sure Josh intended to call the function he added in
commit 78d6a60ca, and not the non-existent "test_import_args".

Signed-off-by: Alex Elder <elder@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 18 Sep 2012 23:49:58 +0000 (16:49 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoMerge remote branch 'origin/wip-librbd-locking'
Josh Durgin [Tue, 18 Sep 2012 23:06:25 +0000 (16:06 -0700)]
Merge remote branch 'origin/wip-librbd-locking'

Conflicts:
qa/workunits/rbd/copy.sh

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agolibrbd: bump version
Josh Durgin [Mon, 10 Sep 2012 17:50:44 +0000 (10:50 -0700)]
librbd: bump version

This marks the availability of the cloning and locking functions.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_rbd: remove locking methods
Josh Durgin [Sat, 8 Sep 2012 01:45:22 +0000 (18:45 -0700)]
cls_rbd: remove locking methods

These are unnecessary now that librbd is using the generic cls_lock.

Fixes: #2951
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: add locking commands
Josh Durgin [Sat, 8 Sep 2012 01:16:25 +0000 (17:16 -0800)]
rbd: add locking commands

The locker (entity_name_t) will be different each time the rbd
command line tool is run, so 'lock remove' is always breaking a lock.

Fixes: #2556
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoqa: update rbd tests and runner
Josh Durgin [Sat, 8 Sep 2012 01:14:39 +0000 (18:14 -0700)]
qa: update rbd tests and runner

* no longer need to wait for watch timeout since #2948 was fixed
* use --format 2 instead of --new-format
* add test_cls_rbd to run-rbd-tests script

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: use generic cls_lock instead of cls_rbd's locking
Josh Durgin [Sat, 1 Sep 2012 00:02:01 +0000 (17:02 -0700)]
librbd: use generic cls_lock instead of cls_rbd's locking

Update the librbd locking api to make more sense:
 * Add an optional tag to shared locking
 * only make shared vs exclusive different functions in the user-visible api
 * return a list of structs instead of a set of pairs
 * fix incorrect range checking in the C api
 * rename locks to lockers to be consistent with the generic locking class
 * rename other_locker parameter to client, to match the list_lockers usage

Fixes: #2952
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_lock_client: add ObjectOperation-based get_lock_info
Josh Durgin [Fri, 31 Aug 2012 23:51:43 +0000 (16:51 -0700)]
cls_lock_client: add ObjectOperation-based get_lock_info

This will be used by librbd to grab lock info along with
the rest of its header information in a single request.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_lock_types: add missing include
Josh Durgin [Fri, 31 Aug 2012 23:50:06 +0000 (16:50 -0700)]
cls_lock_types: add missing include

msg_types defines entity-related types used here.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_lock_client: return error when decoding fails
Josh Durgin [Fri, 31 Aug 2012 20:06:12 +0000 (13:06 -0700)]
cls_lock_client: return error when decoding fails

Library code shouldn't be using cerr either.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_lock_client: fix indentation
Josh Durgin [Fri, 31 Aug 2012 18:17:17 +0000 (11:17 -0700)]
cls_lock_client: fix indentation

Add indentation settings to header, and reindent.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_lock_client: change modified reference parameters to pointers
Josh Durgin [Fri, 31 Aug 2012 18:14:22 +0000 (10:14 -0800)]
cls_lock_client: change modified reference parameters to pointers

This makes it clear which parameters are modified,
as our style guide states.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_lock_client: clean up reference parameters
Josh Durgin [Fri, 31 Aug 2012 15:18:07 +0000 (08:18 -0700)]
cls_lock_client: clean up reference parameters

These should all be const. The remaining reference parameters
will be converted to pointers in another commit.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>