]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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 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>
12 years agovstart.sh: support -X by adding 'auth required = none' entries
Dan Mick [Tue, 13 Nov 2012 21:24:15 +0000 (13:24 -0800)]
vstart.sh: support -X by adding 'auth required = none' entries

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-rgw-integration'
Sage Weil [Tue, 13 Nov 2012 22:50:42 +0000 (14:50 -0800)]
Merge remote-tracking branch 'gh/wip-rgw-integration'

Conflicts:
src/common/config_opts.h

12 years agov0.54 v0.54
Gary Lowell [Tue, 13 Nov 2012 21:18:07 +0000 (13:18 -0800)]
v0.54

12 years agorgw: compile with -Woverloaded-virtual
Yehuda Sadeh [Tue, 13 Nov 2012 21:06:22 +0000 (13:06 -0800)]
rgw: compile with -Woverloaded-virtual

This will trigger a warning if RGWRados api changes while
RGWCache doesn't.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix RGWCache api
Yehuda Sadeh [Tue, 13 Nov 2012 20:09:05 +0000 (12:09 -0800)]
rgw: fix RGWCache api

RGWCache api diverted form RGWRados, crippling the cache.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix RGWCache api
Yehuda Sadeh [Tue, 13 Nov 2012 20:09:05 +0000 (12:09 -0800)]
rgw: fix RGWCache api

RGWCache api diverted form RGWRados, crippling the cache.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoosd: remove dead rotating key code from init
Sage Weil [Mon, 12 Nov 2012 15:06:42 +0000 (07:06 -0800)]
osd: remove dead rotating key code from init

Ancient, dead.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: defer boot until we have rotating keys
Sage Weil [Mon, 12 Nov 2012 15:06:25 +0000 (07:06 -0800)]
osd: defer boot until we have rotating keys

Make sure we have our rotating keys before we start booting.  This
ensures we can open connections with peers *before* we add ourselves to
the osdmap.  This behaviors marks instances of #3292, although it is
not clear whether it is responsible for the actual crash.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoMerge branches 'wip_persist_missing' and 'wip_recovery_qos'
Samuel Just [Tue, 13 Nov 2012 18:56:22 +0000 (10:56 -0800)]
Merge branches 'wip_persist_missing' and 'wip_recovery_qos'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: persist divergent_priors in ondisklog
Samuel Just [Mon, 5 Nov 2012 23:40:43 +0000 (15:40 -0800)]
PG: persist divergent_priors in ondisklog

Consider the following logs:

a) 10'10(5'7) foo
   12'11(4'3) bar

b) 10'10(5'7) foo
   13'11(4'4) baz

When the osd with a merges primary log b, bar is deleted and
added to the missing set with need=4'3 and have=0'0.  If
the osd then dies after deleting bar, but before recovering
bar, PG::read_state() on start up will fail to re-add bar
to the missing set, and bar will be incorrect on that osd.

Now, (4'3, bar) will be added to the divergent_priors mapping
to be scanned during read_state along with the log.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::merge_old_entry: fix case for divergent prior_version
Samuel Just [Mon, 5 Nov 2012 19:33:13 +0000 (11:33 -0800)]
PG::merge_old_entry: fix case for divergent prior_version

Previously, we asserted that a log entry with a divergent
prior_version must be a clone.  Consider the following
case:

6'11(6'2)  m foo
7'12(6'3) m bar
7'13(7'12) m bar

If this is merged with:

6'11(6'2)  m foo
8'12(6'4) m baz

we will hit the assert.

Merging a divergent entry with prior_version after current
tail, but not in the log implies that prior_version was a
divergent entry which we have already merged.  The missing
set and filestore collection must therefore have already
been adjusted.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPrioritizedQueue: use iterator to streamlink SubQueue::remove_by_class()
Sage Weil [Sat, 10 Nov 2012 11:57:23 +0000 (03:57 -0800)]
PrioritizedQueue: use iterator to streamlink SubQueue::remove_by_class()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPrioritizedQueue: avoid double-lookup on create_queue()
Sage Weil [Sat, 10 Nov 2012 11:51:25 +0000 (03:51 -0800)]
PrioritizedQueue: avoid double-lookup on create_queue()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/: de-prioritize recovery ops relative to client ops
Samuel Just [Sat, 29 Sep 2012 00:27:39 +0000 (17:27 -0700)]
osd/: de-prioritize recovery ops relative to client ops

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agomsg/: use PrioritizedQueue to handle DispatchQueue queueing
Samuel Just [Tue, 2 Oct 2012 23:20:24 +0000 (16:20 -0700)]
msg/: use PrioritizedQueue to handle DispatchQueue queueing

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: queue ops based on message priority
Samuel Just [Sat, 29 Sep 2012 00:24:40 +0000 (17:24 -0700)]
OSD: queue ops based on message priority

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: use PrioritizedQueue for OpWQ
Samuel Just [Mon, 1 Oct 2012 23:11:40 +0000 (16:11 -0700)]
OSD: use PrioritizedQueue for OpWQ

The OpWQ PriorityQueue replaces OSD::op_queue, PG::op_queue,
and PG::qlock.  The syncronization is now done as part of the
usual WorkQueue syncronization pattern.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoWorkQueue: Add WorkQueueVal for passing params by val
Samuel Just [Fri, 28 Sep 2012 18:50:59 +0000 (11:50 -0700)]
WorkQueue: Add WorkQueueVal for passing params by val

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agocommon: Add PriorititizedQueue
Samuel Just [Fri, 28 Sep 2012 18:50:30 +0000 (11:50 -0700)]
common: Add PriorititizedQueue

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPipe: we don't queue DispatchQueue codes on an actual pipe
Samuel Just [Tue, 2 Oct 2012 23:34:50 +0000 (16:34 -0700)]
Pipe: we don't queue DispatchQueue codes on an actual pipe

The dispatch queue event codes are now queued directly and
won't end up in a real Pipe.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agocommon: add RefCountedObj.cc with intrusive_ptr hooks
Samuel Just [Tue, 2 Oct 2012 20:33:11 +0000 (13:33 -0700)]
common: add RefCountedObj.cc with intrusive_ptr hooks

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agorgw_cache: change call signature to overwrite rgw_rados put_obj_meta()
caleb miles [Fri, 26 Oct 2012 19:17:05 +0000 (15:17 -0400)]
rgw_cache: change call signature to overwrite rgw_rados put_obj_meta()

Signed-off-by: caleb miles <caleb.miles@inktank.com>
12 years agorgw: unquote etag for if-match
Yehuda Sadeh [Wed, 7 Nov 2012 23:39:56 +0000 (15:39 -0800)]
rgw: unquote etag for if-match

Fixes: #3453
Passed ETag for copy/get request may be quoted.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: use thread safe version of gmtime
Sylvain Munaut [Thu, 8 Nov 2012 20:11:59 +0000 (12:11 -0800)]
rgw: use thread safe version of gmtime

Use gmtime_r instead of gmtime.

Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
12 years agorgw: don't convert object mtime to UTC
Yehuda Sadeh [Wed, 7 Nov 2012 21:21:15 +0000 (13:21 -0800)]
rgw: don't convert object mtime to UTC

Fixes: #3452
When we read object info, don't try to convert mtime to
UTC, it's already in UTC.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agojava: remove redundant src.dir
Noah Watkins [Tue, 13 Nov 2012 17:39:20 +0000 (09:39 -0800)]
java: remove redundant src.dir

Previous wip-fix-javadocs had an oversight, redefining src.dir.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agodoc: reorder some openstack/rbd instructions
Josh Durgin [Tue, 13 Nov 2012 16:14:09 +0000 (08:14 -0800)]
doc: reorder some openstack/rbd instructions

Move client creation to the section on setting up client auth, so you
don't skip it if you already have pools created.

Move CEPH_ARGS setting to the section on configuring OpenStack, since
it's a change for the OpenStack services, not purely ceph client
configuration.

A couple people were confused by the placement of these parts, and
they make more sense in these sections.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-client-asok'
Sage Weil [Tue, 13 Nov 2012 01:01:30 +0000 (17:01 -0800)]
Merge branch 'wip-client-asok'

12 years agojava: fix build.xml formatting
Noah Watkins [Mon, 12 Nov 2012 23:49:38 +0000 (15:49 -0800)]
java: fix build.xml formatting

set noet ts=2 sw=2 sws=2

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: fix javadoc builds
Noah Watkins [Mon, 12 Nov 2012 23:44:06 +0000 (15:44 -0800)]
java: fix javadoc builds

Don't build JavaDoc for tests, and fix the missing src.dir variable.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoosdc/ObjectCacher: only return ENOENT if ObjectSet is flagged
Sage Weil [Mon, 12 Nov 2012 23:40:08 +0000 (15:40 -0800)]
osdc/ObjectCacher: only return ENOENT if ObjectSet is flagged

The fs client can't handle ENOENT from the cache, but librbd wants it.
Also, the fs client will send down multiple ObjectExtents per io, but that
is incompatible with the ENOENT behavior.

Indicate which behavior we want via the ObjectSet, and update librbd to
explicitly ask for it.  This fixes the fs client, which is currently
broken (it returns ENOENT on read).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: unregister commands on shutdown
Sage Weil [Mon, 12 Nov 2012 23:00:11 +0000 (15:00 -0800)]
client: unregister commands on shutdown

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix null dentry crash on dump_cache
Sage Weil [Fri, 9 Nov 2012 20:02:17 +0000 (12:02 -0800)]
client: fix null dentry crash on dump_cache

Dentries can be NULL!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: dump mds session info
Sage Weil [Fri, 9 Nov 2012 20:01:50 +0000 (12:01 -0800)]
client: dump mds session info

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: add dump_cache asok command
Sage Weil [Mon, 12 Nov 2012 19:06:42 +0000 (11:06 -0800)]
client: add dump_cache asok command

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocommon: dumpers for ceph_{file,dir}_layout
Sage Weil [Mon, 12 Nov 2012 19:03:33 +0000 (11:03 -0800)]
common: dumpers for ceph_{file,dir}_layout

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: add mds_requests asok command
Sage Weil [Fri, 9 Nov 2012 04:37:56 +0000 (20:37 -0800)]
client: add mds_requests asok command

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: fix hadoop lib build
Sage Weil [Sat, 10 Nov 2012 09:46:33 +0000 (01:46 -0800)]
Makefile: fix hadoop lib build

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: use libclient.la for libcephfs
Sage Weil [Fri, 9 Nov 2012 05:12:39 +0000 (21:12 -0800)]
Makefile: use libclient.la for libcephfs

Avoid building these files twice!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Mon, 12 Nov 2012 23:03:12 +0000 (15:03 -0800)]
Merge branch 'next'

12 years agoMerge branch 'wip-client-leaks' into next
Sage Weil [Mon, 12 Nov 2012 23:02:51 +0000 (15:02 -0800)]
Merge branch 'wip-client-leaks' into next

12 years agoclient: fix null put in ~MetaSession
Sage Weil [Mon, 12 Nov 2012 23:02:41 +0000 (15:02 -0800)]
client: fix null put in ~MetaSession

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: fix create existence checking
Josh Durgin [Mon, 12 Nov 2012 21:59:36 +0000 (13:59 -0800)]
librbd: fix create existence checking

cda9e516b8bb09b8846814cc8d4ee2879a53b2d5 made us return 0 when the
image already existed, causing copy to erroneosly ignore an existing
image. Separate the case where we know the image exists from being
unable to tell whether it exists because of e.g. an authentication
problem.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: debug when copy occurs
Josh Durgin [Mon, 12 Nov 2012 21:57:18 +0000 (13:57 -0800)]
librbd: debug when copy occurs

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-javadoc'
Sage Weil [Mon, 12 Nov 2012 20:36:19 +0000 (12:36 -0800)]
Merge remote-tracking branch 'gh/wip-javadoc'

12 years agoMerge remote-tracking branch 'gh/wip-librbd-remove-cleanup'
Sage Weil [Mon, 12 Nov 2012 20:30:14 +0000 (12:30 -0800)]
Merge remote-tracking branch 'gh/wip-librbd-remove-cleanup'

12 years agoosd: add 'osd debug drop op probability'
Sage Weil [Mon, 22 Oct 2012 18:29:38 +0000 (11:29 -0700)]
osd: add 'osd debug drop op probability'

This is meant to exercise the kclient's timeout and osd reconnect logic
by dropping some client requests on the floor.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: require pgnum in 'ceph osd pool create <poolname> <pgnum> [<pgp_num>]' command
Sage Weil [Mon, 12 Nov 2012 20:01:07 +0000 (12:01 -0800)]
mon: require pgnum in 'ceph osd pool create <poolname> <pgnum> [<pgp_num>]' command

The default of 8 is virtually never the right answer.  Require the initial
pg count to be explicitly provided.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: return actual error when detecting format fails during creation
Josh Durgin [Thu, 8 Nov 2012 00:48:32 +0000 (16:48 -0800)]
librbd: return actual error when detecting format fails during creation

This bit a couple users today, when bad osd caps resulted in a very
confusing error message.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote branch 'origin/wip-rbd-read'
Josh Durgin [Mon, 12 Nov 2012 18:41:30 +0000 (10:41 -0800)]
Merge remote branch 'origin/wip-rbd-read'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-client-symlinks'
Sage Weil [Mon, 12 Nov 2012 19:08:46 +0000 (11:08 -0800)]
Merge remote-tracking branch 'gh/wip-client-symlinks'

Reviewed-by: Sam Lang <sam.lang@inktank.com>
12 years agojava: add symlink/readlink tests
Noah Watkins [Wed, 7 Nov 2012 04:17:25 +0000 (20:17 -0800)]
java: add symlink/readlink tests

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agotest_libcephfs: fix, add symlink loop tests
Sage Weil [Mon, 12 Nov 2012 18:07:49 +0000 (10:07 -0800)]
test_libcephfs: fix, add symlink loop tests

The first test did

 /a/b/file
 /a/b/sym -> /a/b

and opened /a/b/sym/file, which is valid.  Change it to

 /a/b/file
 /a/b/sym -> /a/b/sym

which is not.

Add another test that does

 /a -> /b
 /b -> /c
 /c -> /a

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebug: adjust default debug levels
Sage Weil [Mon, 12 Nov 2012 16:56:45 +0000 (08:56 -0800)]
debug: adjust default debug levels

Trim out most noise, keep things that are interesting.

Notably, we are logging each message sent and received, and we are logging
the filestore operations when they get queued.  Those may still benefit
from being turned off in high IOPS environments.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Sat, 10 Nov 2012 10:40:33 +0000 (02:40 -0800)]
Merge branch 'next'

12 years agoMerge branch 'wip-client-leaks' into next
Sage Weil [Sat, 10 Nov 2012 10:38:26 +0000 (02:38 -0800)]
Merge branch 'wip-client-leaks' into next

12 years agoclient: simplify/fix symlink loop check
Sage Weil [Sat, 10 Nov 2012 10:35:04 +0000 (02:35 -0800)]
client: simplify/fix symlink loop check

Checking that we visit a symlink isn't correct; for example, the below is
valid, and we visit /b twice.

 /a/b -> c
 /a/c/d -> /a/b

In order to do this "correctly", I think we would need to track the pairs
of paths and symlinks we are resolving.  But, reading the man pages,
ELOOP is actually just defined as traversing more than MAXSYMLINKS syms.
(It appears to be 20 on my machine.)

Just do that instead.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix path_walk for directory symlinks
Sage Weil [Sat, 10 Nov 2012 10:14:02 +0000 (02:14 -0800)]
client: fix path_walk for directory symlinks

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoOSDMonitor: remove max_devices and max_osd interdependency
Josh Durgin [Thu, 8 Nov 2012 02:19:07 +0000 (18:19 -0800)]
OSDMonitor: remove max_devices and max_osd interdependency

Higher max_osd than max_devices doesn't hurt anything (and is the
normal way to add more osds). Higher max_devices than max_osds are
filtered out of crush results since e541c0f8d871172ec61962372efca943308e5fe,
so they don't matter either.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomds: re-try_set_loner() after doing evals in eval(CInode*, int mask)
Sage Weil [Fri, 9 Nov 2012 13:28:12 +0000 (05:28 -0800)]
mds: re-try_set_loner() after doing evals in eval(CInode*, int mask)

Consider a case where current loner is A and wanted loner is B.
At the top of the function we try to set the loner, but that may fail
because we haven't processed the gathered caps yet for the previous
loner.  In the body we do that and potentially drop the old loner, but we
do not try_set_loner() again on the desired loner.

Try after our drop.  If it succeeds, loop through the eval's one more time
so that we can issue caps approriately.

This fixes a hang induced by a simple loop like:

 while true ; do echo asdf >> mnt.a/foo ; tail mnt.b/foo ; done &
 while true ; do ls mnt.a mnt.b ; done

(The second loop may not be necessary.)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Dan Mick [Sat, 10 Nov 2012 03:35:12 +0000 (19:35 -0800)]
Merge branch 'next'

Pull in types.h fix

12 years agosi_t was not properly converting values < 100KB
Dan Mick [Sat, 10 Nov 2012 03:17:56 +0000 (19:17 -0800)]
si_t was not properly converting values < 100KB

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoosdc/ObjectCacher: only call flush callback if we transitions to clean
Sage Weil [Sat, 10 Nov 2012 02:34:22 +0000 (18:34 -0800)]
osdc/ObjectCacher: only call flush callback if we transitions to clean

If we race with e.g. truncate and are in bh_write_commit but the oset
is already clean, we should not call the flush callback (again).

This is reproduced by:

 - kludging slow osd replies into the code (e.g., 2 second delay)
 - mount ceph-fuse with --client-oc-max-dirty-age 1
 - dd if=/dev/zero of=mnt/foo count=1
   sleep 1
   truncate --size 0 mnt/foo
 -> crash

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocleaned up scripts
tamil [Sat, 10 Nov 2012 01:55:20 +0000 (17:55 -0800)]
cleaned up scripts
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoclient: ensure we don't leak MClientReply
Sage Weil [Fri, 9 Nov 2012 18:25:48 +0000 (10:25 -0800)]
client: ensure we don't leak MClientReply

We are careful to clear this reference when processing it.

Add an assert here.  There's no way we can get 2 quick replies because
of the kick-back below.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-fuse: fix leak of args
Sage Weil [Fri, 9 Nov 2012 19:32:44 +0000 (11:32 -0800)]
ceph-fuse: fix leak of args

Also fix up the helper we use to have fewer sharp edges.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: fix leak on readahead
Sage Weil [Fri, 9 Nov 2012 19:02:51 +0000 (11:02 -0800)]
osdc/ObjectCacher: fix leak on readahead

If we initiate io (success == false) but have no waiter, we need to
delete the OSDRead.

This affects libcephfs/ceph-fuse, but not librbd, which does no readahead.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph.spec.in: Build debuginfo subpackage.
Gary Lowell [Fri, 9 Nov 2012 21:28:13 +0000 (13:28 -0800)]
ceph.spec.in:  Build debuginfo subpackage.

This is a partial fix for bug 3471.  Enable building of debuginfo package.
Some distributions enable this automatically by installing additional rpm
macros, on others it needs to be explicity added to the spec file.

12 years agotest: add cli test for missing args to rbd
Josh Durgin [Fri, 9 Nov 2012 20:17:24 +0000 (12:17 -0800)]
test: add cli test for missing args to rbd

This includes 'rbd mv foo', which used to crash

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: check for second argument to mv/rename
Josh Durgin [Fri, 9 Nov 2012 20:11:18 +0000 (12:11 -0800)]
rbd: check for second argument to mv/rename

Without this check, 'rbd mv foo' crashed trying to use a NULL char* as
a string.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: check for second argument to mv/rename
Josh Durgin [Fri, 9 Nov 2012 20:11:18 +0000 (12:11 -0800)]
rbd: check for second argument to mv/rename

Without this check, 'rbd mv foo' crashed trying to use a NULL char* as
a string.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-java-test'
Sam Lang [Fri, 9 Nov 2012 19:52:07 +0000 (13:52 -0600)]
Merge branch 'wip-java-test'

12 years agotest.sh: Adding LD_LIBRARY_PATH so JUnit can find .so files.
Joe Buck [Thu, 8 Nov 2012 18:09:24 +0000 (10:09 -0800)]
test.sh: Adding LD_LIBRARY_PATH so JUnit can find .so files.
Removing useless java.library.path references.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
12 years agodoc/cluster-ops/pools.rst: Added documentation for min_size
Samuel Just [Fri, 9 Nov 2012 19:24:42 +0000 (11:24 -0800)]
doc/cluster-ops/pools.rst: Added documentation for min_size

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoclient: fix SnapRealm leak
Sage Weil [Fri, 9 Nov 2012 18:12:21 +0000 (10:12 -0800)]
client: fix SnapRealm leak

Start ref count at 0; get_snap_realm() will increment it after alloc.

Fix the ref drop order so that the xlist is empty.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: debug SnapRealm reference counting
Sage Weil [Fri, 9 Nov 2012 18:09:53 +0000 (10:09 -0800)]
client: debug SnapRealm reference counting

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agovstart: allow minimum pool size of one
Noah Watkins [Fri, 9 Nov 2012 04:16:53 +0000 (20:16 -0800)]
vstart: allow minimum pool size of one

A minimum pool size of 2 was introduced by 13486857cf. This sets the
minimum to one so that basic vstart environments work.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoclient: fix leak of Cap
Sage Weil [Fri, 9 Nov 2012 18:02:59 +0000 (10:02 -0800)]
client: fix leak of Cap

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