]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agodoc: Removed "deprecated" from toctree. Confused some users.
John Wilkins [Tue, 20 Nov 2012 00:44:45 +0000 (16:44 -0800)]
doc: Removed "deprecated" from toctree. Confused some users.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removing old/unused images.
John Wilkins [Tue, 20 Nov 2012 00:34:04 +0000 (16:34 -0800)]
doc: Removing old/unused images.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Mon, 19 Nov 2012 16:04:19 +0000 (08:04 -0800)]
Merge branch 'next'

12 years agoMerge remote-tracking branch 'gh/wip-mon-parsing' into next
Sage Weil [Mon, 19 Nov 2012 05:20:36 +0000 (21:20 -0800)]
Merge remote-tracking branch 'gh/wip-mon-parsing' into next

12 years agoMerge branch 'wip-mon-leaks-fix' into next
Sage Weil [Sun, 18 Nov 2012 22:37:22 +0000 (14:37 -0800)]
Merge branch 'wip-mon-leaks-fix' into next

12 years agomon: shutdown async signal handler sooner
Sage Weil [Sun, 18 Nov 2012 16:34:35 +0000 (08:34 -0800)]
mon: shutdown async signal handler sooner

Before the mon, and lockdep, in particular.

#0  __pthread_mutex_lock (mutex=0x30) at pthread_mutex_lock.c:50
#1  0x0000000000816092 in ceph::log::Log::submit_entry (this=0x0, e=0x2f4a270) at log/Log.cc:138
#2  0x00000000007ee0f8 in handle_fatal_signal (signum=11) at global/signal_handler.cc:100
#3  <signal handler called>
#4  0x00000000008e1300 in lockdep_will_lock (name=0x959aa7 "SignalHandler::lock", id=17) at common/lockdep.cc:163
#5  0x00000000008867fc in Mutex::_will_lock (this=0x2f20428) at ./common/Mutex.h:56
#6  0x0000000000886605 in Mutex::Lock (this=0x2f20428, no_lockdep=false) at common/Mutex.cc:81
#7  0x00000000007eeb95 in SignalHandler::entry (this=0x2f20300) at global/signal_handler.cc:198
#8  0x00000000008b0bd1 in Thread::_entry_func (arg=0x2f20300) at common/Thread.cc:43
#9  0x00007f36fefd6b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007f36fd80b6dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

#0  0x00007f36fefd7e75 in pthread_join (threadid=139874129766144, thread_return=0x0) at pthread_join.c:89
#1  0x00000000008b11ec in Thread::join (this=0x2f20300, prval=0x0) at common/Thread.cc:130
#2  0x00000000007eeae7 in SignalHandler::shutdown (this=0x2f20300) at global/signal_handler.cc:186
#3  0x00000000007ee9cf in SignalHandler::~SignalHandler (this=0x2f20300, __in_chrg=<optimized out>) at global/signal_handler.cc:175
#4  0x00000000007eea58 in SignalHandler::~SignalHandler (this=0x2f20300, __in_chrg=<optimized out>) at global/signal_handler.cc:176
#5  0x00000000007ee643 in shutdown_async_signal_handler () at global/signal_handler.cc:324
#6  0x00000000006de9d2 in main (argc=7, argv=0x7fffbfb8a1e8) at ceph_mon.cc:439

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/AuthMonitor: refactor assign_global_id
Sage Weil [Sun, 18 Nov 2012 16:00:16 +0000 (08:00 -0800)]
mon/AuthMonitor: refactor assign_global_id

Move the failure logic into the caller, where we easier to do something
about it and return the right value to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/AuthMonitor: reorder session->put()
Sage Weil [Sun, 18 Nov 2012 15:52:49 +0000 (07:52 -0800)]
mon/AuthMonitor: reorder session->put()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: remove useless reader_joining
Sage Weil [Sun, 18 Nov 2012 04:57:50 +0000 (20:57 -0800)]
msg/Pipe: remove useless reader_joining

We set it but do not read it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: join previous reader threads
Sage Weil [Sun, 18 Nov 2012 04:56:50 +0000 (20:56 -0800)]
msg/Pipe: join previous reader threads

We may stop and then restart the reader thread.  Join previous threads
before we create new ones.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/DispatchQueue: fix message leak from discard_queue()
Sage Weil [Sun, 18 Nov 2012 00:36:44 +0000 (16:36 -0800)]
msg/DispatchQueue: fix message leak from discard_queue()

We need to drop the Message ref() here; the msgr owns one ref
independent of those from the intrusive_ptr's in the queue itself.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/SimpleMessenger: use put() on local_connection
Sage Weil [Sun, 18 Nov 2012 00:01:13 +0000 (16:01 -0800)]
msg/SimpleMessenger: use put() on local_connection

This aids leak debugging; not much else.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: clean up Subsription xlists
Sage Weil [Sat, 17 Nov 2012 22:21:07 +0000 (14:21 -0800)]
mon: clean up Subsription xlists

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: drop con->session reference in remove_session()
Sage Weil [Sun, 18 Nov 2012 16:19:41 +0000 (08:19 -0800)]
mon: drop con->session reference in remove_session()

This captures all callers.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: sessions get cleaned up before dtor
Sage Weil [Sat, 17 Nov 2012 16:52:42 +0000 (08:52 -0800)]
mon: sessions get cleaned up before dtor

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: don't leak session_security
Sage Weil [Fri, 16 Nov 2012 20:21:14 +0000 (12:21 -0800)]
msg/Pipe: don't leak session_security

Make sure we free old instances of sesseion_security before we reset the
pointer.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: make MSG_MON_PAXOS case a bit more consistent
Joao Eduardo Luis [Thu, 15 Nov 2012 02:16:53 +0000 (02:16 +0000)]
mon: Monitor: make MSG_MON_PAXOS case a bit more consistent

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Paxos{,Service}: finish contexts and put messages on shutdown
Joao Eduardo Luis [Thu, 15 Nov 2012 02:16:17 +0000 (02:16 +0000)]
mon: Paxos{,Service}: finish contexts and put messages on shutdown

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: finish contexts on shutdown
Joao Eduardo Luis [Wed, 14 Nov 2012 15:54:17 +0000 (15:54 +0000)]
mon: Monitor: finish contexts on shutdown

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: drop election messages if entity doesn't have enough caps
Joao Eduardo Luis [Tue, 13 Nov 2012 16:57:34 +0000 (16:57 +0000)]
mon: Monitor: drop election messages if entity doesn't have enough caps

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: remove all sessions on shutdown
Sage Weil [Tue, 13 Nov 2012 01:43:51 +0000 (17:43 -0800)]
mon: remove all sessions on shutdown

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph_mon: cleanup on shutdown
Joao Eduardo Luis [Mon, 12 Nov 2012 23:14:55 +0000 (23:14 +0000)]
ceph_mon: cleanup on shutdown

Properly cleanup the throttlers, 'g_ceph_context' and the
async_singnal_handler.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agorgw: add -lresolv flags to Makefile.am
Chen Baozi [Sun, 18 Nov 2012 06:34:21 +0000 (14:34 +0800)]
rgw: add -lresolv flags to Makefile.am

radosgw depends on libresolv since since the commit 951c6be. So we need to
add -lresolve flags, or it cannot link right library.

Signed-off-by: Chen Baozi <baozich@gmail.com>
12 years agomon/MonClient: use thread-safe RNG for picking monitors
Sage Weil [Sun, 4 Nov 2012 16:21:50 +0000 (08:21 -0800)]
mon/MonClient: use thread-safe RNG for picking monitors

Avoid using shared-state rand() when picking monitors.  This way we don't
screw with library users like test_librbd_fsx that rely on srand() and
rand() being deterministic.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3431' into next
Sage Weil [Sat, 17 Nov 2012 05:26:30 +0000 (21:26 -0800)]
Merge remote-tracking branch 'gh/wip-3431' into next

12 years agoMerge branch 'next'
Josh Durgin [Sat, 17 Nov 2012 01:14:28 +0000 (17:14 -0800)]
Merge branch 'next'

12 years agoMakefile.am: fix LDADD for test_objectcacher_stress
Josh Durgin [Sat, 17 Nov 2012 01:13:50 +0000 (17:13 -0800)]
Makefile.am: fix LDADD for test_objectcacher_stress

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-coverity' into next
Sage Weil [Sat, 17 Nov 2012 01:36:34 +0000 (17:36 -0800)]
Merge branch 'wip-coverity' into next

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoclient: fix lock leak in lazio_*() failure paths
Sage Weil [Sat, 17 Nov 2012 01:36:16 +0000 (17:36 -0800)]
client: fix lock leak in lazio_*() failure paths

CID 743400 (#1 of 1): Missing unlock (LOCK)
At (5): Returning without unlocking "this->client_lock._m".

CID 743399 (#1 of 1): Missing unlock (LOCK)
At (5): Returning without unlocking "this->client_lock._m".

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Sat, 17 Nov 2012 00:44:41 +0000 (16:44 -0800)]
Merge branch 'next'

12 years agoMerge branch 'wip-oc-hang' into next
Josh Durgin [Sat, 17 Nov 2012 00:43:00 +0000 (16:43 -0800)]
Merge branch 'wip-oc-hang' into next

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agoupstart: set high open file limits
Sage Weil [Sat, 17 Nov 2012 00:19:00 +0000 (16:19 -0800)]
upstart: set high open file limits

The default 1024 limit is easily hit on larger clusters.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Accepter: only close socket if >= 0
Sage Weil [Sat, 17 Nov 2012 00:10:30 +0000 (16:10 -0800)]
msg/Accepter: only close socket if >= 0

It is possible for rebind() to fail, in which case the OSD will go through
it's shutdown procedure and call stop().  This is simpler than trying to
avoid calling stop() when rebind() fails.

Fixes: #3504
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: default journal size to 5GB
Sage Weil [Sat, 17 Nov 2012 00:04:13 +0000 (16:04 -0800)]
osd: default journal size to 5GB

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: take cache lock when discarding data from cache
Josh Durgin [Fri, 16 Nov 2012 23:27:52 +0000 (15:27 -0800)]
librbd: take cache lock when discarding data from cache

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: fix off-by-one error in split
Josh Durgin [Fri, 16 Nov 2012 00:20:33 +0000 (16:20 -0800)]
ObjectCacher: fix off-by-one error in split

This error left a completion that should have been attached
to the right BufferHead on the left BufferHead, which would
result in the completion never being called unless the buffers
were merged before it's original read completed. This would cause
a hang in any higher level waiting for a read to complete.

The existing loop went backwards (using a forward iterator),
but stopped when the iterator reached the beginning of the map,
or when a waiter belonged to the left BufferHead.

If the first list of waiters should have been moved to the right
BufferHead, it was skipped because at that point the iterator
was at the beginning of the map, which was the main condition
of the loop.

Restructure the waiters-moving loop to go forward in the map instead,
so it's harder to make an off-by-one error.

Possibly-fixes: #3286
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: begin at the right place when iterating over BufferHeads
Josh Durgin [Thu, 15 Nov 2012 18:41:32 +0000 (10:41 -0800)]
ObjectCacher: begin at the right place when iterating over BufferHeads

If the desired offset overlaps a BH, data.lower_bound() will return
the element after it, since it's indexed by the start of a range.

The confusingly similarly named data_lower_bound() method fixes this,
and returns the correct starting element.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: add debug function to check BufferHead consistency
Josh Durgin [Fri, 16 Nov 2012 01:32:08 +0000 (17:32 -0800)]
ObjectCacher: add debug function to check BufferHead consistency

This isn't called because it's potentially expensive, but calling it
in various places can help future debugging.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: more debugging for read completions
Josh Durgin [Fri, 16 Nov 2012 00:53:37 +0000 (16:53 -0800)]
ObjectCacher: more debugging for read completions

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: assert lock is held everywhere
Josh Durgin [Thu, 15 Nov 2012 18:35:57 +0000 (10:35 -0800)]
ObjectCacher: assert lock is held everywhere

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: debug read waiters
Josh Durgin [Fri, 16 Nov 2012 19:56:46 +0000 (11:56 -0800)]
ObjectCacher: debug read waiters

Now we can tell which ones will be called.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: don't needlessly increment iterator
Josh Durgin [Fri, 16 Nov 2012 23:16:24 +0000 (15:16 -0800)]
ObjectCacher: don't needlessly increment iterator

This iterator is now reset on each run through the loop,
so there's no point in incrementing it here.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: retry reads when they are incomplete
Josh Durgin [Fri, 16 Nov 2012 20:26:16 +0000 (12:26 -0800)]
ObjectCacher: retry reads when they are incomplete

Skipping these callbacks when there's a racing write or
a gap in the results causes the original reads they represent
to never be completed. If the read falls within the range
of a BufferHead, retry all waiters no matter what.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: Added links to APIs.
John Wilkins [Fri, 16 Nov 2012 23:13:57 +0000 (15:13 -0800)]
doc: Added links to APIs.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: don't use 'pool=data' as an example
Greg Farnum [Fri, 16 Nov 2012 22:28:31 +0000 (14:28 -0800)]
doc: don't use 'pool=data' as an example

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agodoc: Added documentation for using CPU profiler.
John Wilkins [Fri, 16 Nov 2012 22:58:22 +0000 (14:58 -0800)]
doc: Added documentation for using CPU profiler.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added documentation for installing CPU profiler.
John Wilkins [Fri, 16 Nov 2012 22:57:55 +0000 (14:57 -0800)]
doc: Added documentation for installing CPU profiler.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added librbd to the RBD toc.
John Wilkins [Fri, 16 Nov 2012 22:57:15 +0000 (14:57 -0800)]
doc: Added librbd to the RBD toc.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added libcephfs to the CephFS section and moved librbd to RBD section.
John Wilkins [Fri, 16 Nov 2012 22:56:46 +0000 (14:56 -0800)]
doc: Added libcephfs to the CephFS section and moved librbd to RBD section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agocommon/ceph_argparse: fix malloc failure check
Sage Weil [Fri, 16 Nov 2012 22:19:25 +0000 (14:19 -0800)]
common/ceph_argparse: fix malloc failure check

CID 743418 (#1 of 1): Dereference before null check (REVERSE_INULL)
Null-checking "argv" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/MonClient: initialize ptr in ctor
Sage Weil [Fri, 16 Nov 2012 22:18:21 +0000 (14:18 -0800)]
mon/MonClient: initialize ptr in ctor

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

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/FileStore: fix fd leak in _rmattr
Sage Weil [Fri, 16 Nov 2012 22:15:23 +0000 (14:15 -0800)]
os/FileStore: fix fd leak in _rmattr

CID 743405 (#2 of 2): Resource leak (RESOURCE_LEAK)
At (16): Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/FileStore: fix fd leaks in _setattrs
Sage Weil [Fri, 16 Nov 2012 22:14:17 +0000 (14:14 -0800)]
os/FileStore: fix fd leaks in _setattrs

CID 743406 (#3 of 3): Resource leak (RESOURCE_LEAK)
At (26): Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: faux use-after-free
Sage Weil [Fri, 16 Nov 2012 22:11:05 +0000 (14:11 -0800)]
osdc/ObjectCacher: faux use-after-free

CID 743435 (#1 of 1): Use after free (USE_AFTER_FREE)
At (68): Passing freed pointer "rd" as an argument to function "std::basic_ostream<char, std::char_traits<char> >::operator <<(void const *)".

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest: add ObjectCacher stress test that does not use a cluster
Josh Durgin [Tue, 13 Nov 2012 18:28:32 +0000 (10:28 -0800)]
test: add ObjectCacher stress test that does not use a cluster

Use a fake writeback handler and respond to all requests with -ENOENT.
This tests that all operations will complete, and the cache doesn't
lose waiters or callbacks.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: more debugging for BufferHeads
Josh Durgin [Tue, 13 Nov 2012 18:01:30 +0000 (10:01 -0800)]
ObjectCacher: more debugging for BufferHeads

This is useful for checking for lost waiters.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agobuild: update for boost_thread library.
Gary Lowell [Fri, 16 Nov 2012 08:46:41 +0000 (00:46 -0800)]
build: update for boost_thread library.

There is a difference in naming conventions between debian and
rpm based distributions for this library.  In configure.ac we
check first for boost_thread-mt, then if it's not found check
for boost_thread.  A side effect of the AC_CEHCK_LIB macro is
to add the library to the $LIBS, so the explicit -llibboost_thread
in the Makefile has been removed.
(cherry picked from commit f0c7bb363000037bbf7d58ac6e2d39d0f10200fe)

12 years agomon: OSDMonitor: clarify some command replies
Joao Eduardo Luis [Fri, 16 Nov 2012 15:30:53 +0000 (15:30 +0000)]
mon: OSDMonitor: clarify some command replies

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: OSDMonitor: fix spacing when outputting items on command reply
Joao Eduardo Luis [Fri, 16 Nov 2012 15:30:24 +0000 (15:30 +0000)]
mon: OSDMonitor: fix spacing when outputting items on command reply

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
Gary Lowell [Fri, 16 Nov 2012 08:56:36 +0000 (00:56 -0800)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agobuild: update for boost_thread library.
Gary Lowell [Fri, 16 Nov 2012 08:46:41 +0000 (00:46 -0800)]
build: update for boost_thread library.

There is a difference in naming conventions between debian and
rpm based distributions for this library.  In configure.ac we
check first for boost_thread-mt, then if it's not found check
for boost_thread.  A side effect of the AC_CEHCK_LIB macro is
to add the library to the $LIBS, so the explicit -llibboost_thread
in the Makefile has been removed.

12 years agodoc: fix crush set syntax
Josh Durgin [Fri, 16 Nov 2012 07:04:55 +0000 (23:04 -0800)]
doc: fix crush set syntax

No commas between parameters, pool is required.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoos/FileStore: only try BTRFS_IOC_SUBVOL_CREATE on btrfs
Sage Weil [Fri, 16 Nov 2012 00:50:39 +0000 (16:50 -0800)]
os/FileStore: only try BTRFS_IOC_SUBVOL_CREATE on btrfs

Only try to create a btrfs subvolume if the fs is btrfs.  Otherwise, just
create a directory.  Then we can error out on *any* ioctl error, and not
rely on the ioctl error code to determine if we failed because we are on
a non-btrfs or a real error.

Fixes: #3052
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: clean up 'ceph osd ...' list output
Sage Weil [Fri, 16 Nov 2012 00:35:53 +0000 (16:35 -0800)]
mon: clean up 'ceph osd ...' list output

No more 'osd.0 is already inosd.1 is already in' crap.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: correctly identify crush names
Sage Weil [Fri, 16 Nov 2012 00:24:38 +0000 (16:24 -0800)]
mon: correctly identify crush names

get_item_id() returns 0 if the name already exists; that's not what we
want here.  Verify the name exists before checking its id.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: use parse_osd_id() throughout
Sage Weil [Fri, 16 Nov 2012 00:23:48 +0000 (16:23 -0800)]
mon: use parse_osd_id() throughout

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPrioritizedQueue: remove internal lock, not used
Samuel Just [Fri, 16 Nov 2012 00:01:18 +0000 (16:01 -0800)]
PrioritizedQueue: remove internal lock, not used

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoDispatchQueue: lock DispatchQueue when for get_queue_len()
Samuel Just [Thu, 15 Nov 2012 23:56:46 +0000 (15:56 -0800)]
DispatchQueue: lock DispatchQueue when for get_queue_len()

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorun_xfstests.sh: activate more tests that now work
Alex Elder [Thu, 15 Nov 2012 23:51:34 +0000 (17:51 -0600)]
run_xfstests.sh: activate more tests that now work

I've gone through the set of xfstests that were previously found to
not work.  Some of those now do work, and with the addition of an
option to pass to "mkfs.xfs" a large number of other tests now
produce expected output as well.

This patch updates the default list of tests to run to reflect
the result of this exercise.  The following 50 additional tests
are now run by default:

    029 074 078 084-087 100 105 117 121 124 126 129-134
    164 165 167 174 181 184 186 187 192 214-216 227 236
    237 241 243 245-249 257-259 261 277 278 280 285 286

Test 127 completed without error, but it took from 1-3 hours so I
kept that out of the list.

Signed-off-by: Alex Elder <elder@inktank.com>
12 years agodoc: add Hadoop configuration parameters
Noah Watkins [Thu, 15 Nov 2012 22:00:20 +0000 (14:00 -0800)]
doc: add Hadoop configuration parameters

fs.ceph.block.size and fs.ceph.replication.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 15 Nov 2012 19:36:20 +0000 (11:36 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agosmalliobench: fix init-only, add don-not-init
Samuel Just [Thu, 15 Nov 2012 18:35:24 +0000 (10:35 -0800)]
smalliobench: fix init-only, add don-not-init

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Mike Ryan <mike.ryan@inktank.com>
12 years agomsg/Pipe: fix leak of Authorizer
Sage Weil [Thu, 15 Nov 2012 18:06:07 +0000 (10:06 -0800)]
msg/Pipe: fix leak of Authorizer

Reported-by: Joao Luis <joao.luis@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3477' into next
Sage Weil [Thu, 15 Nov 2012 17:48:25 +0000 (09:48 -0800)]
Merge remote-tracking branch 'gh/wip-3477' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomsg/DispatchQueue: release throttle on messages when dropping an id
Samuel Just [Thu, 15 Nov 2012 00:30:51 +0000 (16:30 -0800)]
msg/DispatchQueue: release throttle on messages when dropping an id

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPrioritizedQueue: allow remove_by_class to return removed items
Samuel Just [Thu, 15 Nov 2012 00:30:05 +0000 (16:30 -0800)]
PrioritizedQueue: allow remove_by_class to return removed items

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agolibrbd: use delete[] properly
Sage Weil [Thu, 15 Nov 2012 00:59:06 +0000 (16:59 -0800)]
librbd: use delete[] properly

==4986== Mismatched free() / delete / delete []
==4986==    at 0x4C2658C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4986==    by 0x4ED8EA9: librbd::ImageCtx::~ImageCtx() (ImageCtx.cc:100)
==4986==    by 0x4EF3827: librbd::close_image(librbd::ImageCtx*) (internal.cc:1869)
==4986==    by 0x4EE8FB8: librbd::clone(librados::IoCtx&, char const*, char const*, librados::IoCtx&, char const*, unsigned long, int*, unsigned long, int) (internal.cc:900)
==4986==    by 0x4EC363C: rbd_clone2 (librbd.cc:553)
==4986==    by 0x404C85: do_clone (fsx.c:836)
==4986==    by 0x405639: test (fsx.c:1048)
==4986==    by 0x406369: main (fsx.c:1523)
==4986==  Address 0xd498b30 is 0 bytes inside a block of size 37 alloc'd
==4986==    at 0x4C26CF7: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4986==    by 0x4ED9B4D: librbd::ImageCtx::init_layout() (ImageCtx.cc:164)
==4986==    by 0x4ED9845: librbd::ImageCtx::init() (ImageCtx.cc:142)
==4986==    by 0x4EF3449: librbd::open_image(librbd::ImageCtx*, bool) (internal.cc:1828)
==4986==    by 0x4EE89E0: librbd::clone(librados::IoCtx&, char const*, char const*, librados::IoCtx&, char const*, unsigned long, int*, unsigned long, int) (internal.cc:871)
==4986==    by 0x4EC363C: rbd_clone2 (librbd.cc:553)
==4986==    by 0x404C85: do_clone (fsx.c:836)
==4986==    by 0x405639: test (fsx.c:1048)
==4986==    by 0x406369: main (fsx.c:1523)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoobjecter: fix leak of out_handlers
Sage Weil [Thu, 15 Nov 2012 00:54:17 +0000 (16:54 -0800)]
objecter: fix leak of out_handlers

The error paths don't use the handlers.  Make sure they get cleaned up.

Fixes: #3446
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: calculate failed_since relative to message receive time
Sage Weil [Thu, 15 Nov 2012 01:00:57 +0000 (17:00 -0800)]
mon: calculate failed_since relative to message receive time

Instead of looking at the current time we process the message, look at the
receive time.  This gives us a more real failure time given that messages
may be requeued.

It doesn't solve the problem when messages are forwarded between monitors
due to an election, but that's ok; this is still a net improvement.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: update post policy parser
Yehuda Sadeh [Thu, 15 Nov 2012 00:42:11 +0000 (16:42 -0800)]
rgw: update post policy parser

json parser semantics changed a little bit, so
needed to update the policy parser.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agomon: set default port when binding to random local ip
Sage Weil [Thu, 15 Nov 2012 00:26:58 +0000 (16:26 -0800)]
mon: set default port when binding to random local ip

Fixes #3135
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-asok' into next
Sage Weil [Thu, 15 Nov 2012 00:22:27 +0000 (16:22 -0800)]
Merge remote-tracking branch 'gh/wip-asok' into next

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: relax date format check
Yehuda Sadeh [Wed, 14 Nov 2012 19:30:34 +0000 (11:30 -0800)]
rgw: relax date format check

Don't try to parse beyond the GMT or UTC. Some clients use
special date formatting. If we end up misparsing the date
it'll fail in the authorization, so don't need to be too
restrictive.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agodoc: config-cluser move to new IA.
John Wilkins [Wed, 14 Nov 2012 22:57:51 +0000 (14:57 -0800)]
doc: config-cluser move to new IA.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Move of cluster ops for new IA.
John Wilkins [Wed, 14 Nov 2012 22:55:29 +0000 (14:55 -0800)]
doc: Move of cluster ops for new IA.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: add-or-rm-mons.rst: fix typo
Joao Eduardo Luis [Wed, 14 Nov 2012 10:06:31 +0000 (10:06 +0000)]
doc: add-or-rm-mons.rst: fix typo

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoclient: register admin socket commands without lock held
Sage Weil [Wed, 14 Nov 2012 02:18:24 +0000 (18:18 -0800)]
client: register admin socket commands without lock held

Avoid a lock cycle.

existing dependency Client::client_lock (11) -> AdminSocket::m_lock (16) at:
 ceph version 0.54-578-g7926ef5 (7926ef53935313501d4a7fe0e587f3e3b00b313c)
 1: (Mutex::Lock(bool)+0x41) [0x831337]
 2: (AdminSocket::register_command(std::string, AdminSocketHook*, std::string)+0x40) [0x873a32]
 3: (Client::init()+0x454) [0x6f4c24]
 4: (main()+0x637) [0x6ea399]
 5: (__libc_start_main()+0xed) [0x7fd97bbca76d]
 6: ./ceph-fuse() [0x6e9c59]

    -4> 2012-11-13 18:14:48.619714 7fd97b1a3700  0 new dependency AdminSocket::m_lock (16) -> Client::client_lock (11) creates a cycle at
 ceph version 0.54-578-g7926ef5 (7926ef53935313501d4a7fe0e587f3e3b00b313c)
 1: (Mutex::Lock(bool)+0x41) [0x831337]
 2: (Objecter::RequestStateHook::call(std::string, std::string, ceph::buffer::list&)+0x7a) [0x90627e]
 3: (AdminSocket::do_accept()+0xb1b) [0x87318f]
 4: (AdminSocket::entry()+0x2fa) [0x8725fe]
 5: (Thread::_entry_func(void*)+0x23) [0x86b335]
 6: (()+0x7e9a) [0x7fd97d279e9a]
 7: (clone()+0x6d) [0x7fd97bc9ccbd]

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoobjecter: separate locked and unlocked init/shutdown
Sage Weil [Wed, 14 Nov 2012 02:17:55 +0000 (18:17 -0800)]
objecter: separate locked and unlocked init/shutdown

We don't want to hold the lock while we register the admin socket commands
or else we create a lock cycle when we try to process them later.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Gary Lowell [Wed, 14 Nov 2012 01:29:47 +0000 (17:29 -0800)]
Merge branch 'next'

Conflicts:
configure.ac
src/rgw/rgw_common.cc

12 years agoosd/: add config helper for min_size and update build_simple*
Samuel Just [Wed, 14 Nov 2012 00:45:49 +0000 (16:45 -0800)]
osd/: add config helper for min_size and update build_simple*

min_size should never be set to 0 on a pool.  config.h
now has a helper to determine the correct default value.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc/release-notes: fix heading
Sage Weil [Wed, 14 Nov 2012 01:11:34 +0000 (17:11 -0800)]
doc/release-notes: fix heading

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: release-notes for v0.54
Sage Weil [Wed, 14 Nov 2012 00:24:23 +0000 (16:24 -0800)]
doc: release-notes for v0.54

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: update crush weight ramping process
Sage Weil [Tue, 13 Nov 2012 22:34:53 +0000 (14:34 -0800)]
doc: update crush weight ramping process

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: fix warning
Yehuda Sadeh [Tue, 13 Nov 2012 23:42:52 +0000 (15:42 -0800)]
rgw: fix warning

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-min-size'
Sage Weil [Tue, 13 Nov 2012 23:39:42 +0000 (15:39 -0800)]
Merge branch 'wip-min-size'

Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoosd: default pool min_size to 0 (which gives us size-size/2)
Sage Weil [Tue, 13 Nov 2012 23:16:56 +0000 (15:16 -0800)]
osd: default pool min_size to 0 (which gives us size-size/2)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: default min_size to size-size/2 if min_size default is 0
Sage Weil [Tue, 13 Nov 2012 23:11:42 +0000 (15:11 -0800)]
mon: default min_size to size-size/2 if min_size default is 0

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: default min_size to size - size/2
Sage Weil [Tue, 13 Nov 2012 21:27:45 +0000 (13:27 -0800)]
osd: default min_size to size - size/2

size -> min_size:
 5 -> 3
 4 -> 2
 3 -> 2
 2 -> 1

Basically, default to tolerating minority down.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: helpful warning in 'health detail' output about incomplete pgs
Sage Weil [Tue, 13 Nov 2012 21:25:50 +0000 (13:25 -0800)]
mon: helpful warning in 'health detail' output about incomplete pgs

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: start_boot() after init()
Sage Weil [Tue, 13 Nov 2012 21:25:31 +0000 (13:25 -0800)]
osd: start_boot() after init()

The previous trigger for start_boot() was racy, depending on whether we
got our rotating keys quickly.

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