]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agorbd: tests for copy with explicit/implicit pool names
Dan Mick [Fri, 16 Nov 2012 06:49:16 +0000 (22:49 -0800)]
rbd: tests for copy with explicit/implicit pool names

Validate change to not assume dest pool == src pool

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: fix import pool assumptions
Dan Mick [Fri, 16 Nov 2012 06:41:36 +0000 (22:41 -0800)]
rbd: fix import pool assumptions

import allows specifying one image, implicitly or explicitly the
"source" image, even though it's really the destination.  Fix up
the reassignment of 'source' to 'dest', and check for and complain
about specifying two different pools or images for import.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: change destpool assumptions.
Dan Mick [Thu, 15 Nov 2012 23:55:10 +0000 (15:55 -0800)]
rbd: change destpool assumptions.

Don't default destpool to srcpool; it's surprising, and
not useful/helpful enough to violate the convention that
"default pool is rbd"

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: --size fixes
Dan Mick [Thu, 15 Nov 2012 22:52:39 +0000 (14:52 -0800)]
rbd: --size fixes

* require --size/-s for both create *and* resize
* explicitly permit create with size 0.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: allow parsing image@snap even if --pool given
Dan Mick [Thu, 15 Nov 2012 22:41:46 +0000 (14:41 -0800)]
rbd: allow parsing image@snap even if --pool given

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoRemoving ceph dirs while scrubbing ceph off the system
tamil [Mon, 26 Nov 2012 20:47:57 +0000 (12:47 -0800)]
Removing ceph dirs while scrubbing ceph off the system

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Mon, 26 Nov 2012 18:38:57 +0000 (10:38 -0800)]
Merge branch 'next'

12 years agoqa: add script to run objectcacher tests
Josh Durgin [Mon, 26 Nov 2012 18:37:17 +0000 (10:37 -0800)]
qa: add script to run objectcacher tests

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-upstart' into next
Sage Weil [Mon, 26 Nov 2012 16:38:25 +0000 (08:38 -0800)]
Merge remote-tracking branch 'gh/wip-upstart' into next

12 years agoinit-ceph: do not make noise about missing devs
Sage Weil [Mon, 26 Nov 2012 16:37:45 +0000 (08:37 -0800)]
init-ceph: do not make noise about missing devs

It is pretty normal not to include the devs line in the ceph.conf.  Do not
print/warn about it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agosyncfs: check for __NR_syncfs too
Sage Weil [Sun, 25 Nov 2012 21:29:52 +0000 (13:29 -0800)]
syncfs: check for __NR_syncfs too

Also make the filestore startup tell us *all* variants that are
supported, not just the first one.

Tested-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomonmap: fix crash from dup initial seed mons
Sage Weil [Sun, 25 Nov 2012 17:34:02 +0000 (09:34 -0800)]
monmap: fix crash from dup initial seed mons

Fix bug reproduced by

-m hostname,ip_that_hosthname_resolves_to

Backport: argonaut
Reported-by: Drunkard Zhang <gongfan193@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sun, 25 Nov 2012 17:18:44 +0000 (09:18 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agoosdc/ObjectCacher: fix BufferHead leak on ENOENT
Sage Weil [Sat, 24 Nov 2012 17:37:35 +0000 (09:37 -0800)]
osdc/ObjectCacher: fix BufferHead leak on ENOENT

This was detected by fsstress over ceph-fuse under valgrind.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-mon-misc-fixes' into next
Sage Weil [Sat, 24 Nov 2012 17:16:13 +0000 (09:16 -0800)]
Merge remote-tracking branch 'gh/wip-mon-misc-fixes' into next

12 years agomake mkcephfs and init-ceph osd filesystem handling more flexible
Danny Al-Gaaf [Fri, 23 Nov 2012 17:31:10 +0000 (18:31 +0100)]
make mkcephfs and init-ceph osd filesystem handling more flexible

Remove btrfs specific keys and replace them by more generic
keys to be able to replace btrfs with e.g. xfs or ext4 easily.

Add new key to define the osd fs type: 'osd mkfs type', which can
get defined in the [osd] section for all OSDs.

Replaced config keys:
- 'btrfs devs' -> 'devs'
- 'btrfs path' -> 'fs path'
- 'btrfs options' -> 'osd mount options $fstype'

New config key:
- 'osd mkfs options $fstype': file system specific options for mkfs
- 'osd mkfs type': to define the filesystem for mkfs and also mount

Replaced in mkcephfs: --mkbtrfs with --mkfs

Replaced in init-ceph:
- --btrfs with --fsmount
- --nobtrfs with --nofsmount
- --btrfsumount with --fsumount

NOTE: old options from mkcephfs and init-ceph will still work, but
      get may removed in the future from the scripts.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon: Monitor: wake up contexts based on paxos machine's state
Joao Eduardo Luis [Fri, 23 Nov 2012 19:10:33 +0000 (19:10 +0000)]
mon: Monitor: wake up contexts based on paxos machine's state

When recovering the leader, only wake up a paxos machine's contexts if
the paxos machine is in a state that can handle said contexts.

Fixes: #3495
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: AuthMonitor: increase log levels when logging secrets
Joao Eduardo Luis [Fri, 23 Nov 2012 14:22:52 +0000 (14:22 +0000)]
mon: AuthMonitor: increase log levels when logging secrets

Fixes: #3361
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoauth: Keyring: increase log levels when logging secrets
Joao Eduardo Luis [Fri, 23 Nov 2012 14:23:05 +0000 (14:23 +0000)]
auth: Keyring: increase log levels when logging secrets

Fixes: #3361
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoauth: cephx: increase log levels when logging secrets
Joao Eduardo Luis [Fri, 23 Nov 2012 14:06:38 +0000 (14:06 +0000)]
auth: cephx: increase log levels when logging secrets

We understand that logging secrets may be useful when debugging the root
causes for auth issues. However, logging secrets is far from a good idea.
Therefore, just increase the log levels to a high enough value so that
most other debug infos can be obtained without even logging the secrets.
If one really wants to log the secrets, then setting --debug-auth 30 should
do the trick.

Fixes: #3361
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agocrush: CrushWrapper: don't add item to a bucket with != type than wanted
Joao Eduardo Luis [Fri, 23 Nov 2012 00:32:38 +0000 (00:32 +0000)]
crush: CrushWrapper: don't add item to a bucket with != type than wanted

We take little consideration about the type of the bucket we are adding
an item to. Although this works for the vast majority of cases, it was
also leaving room for silly little mistakes to become problematic and
leading a monitor to crash.

For instance, say that we ran:
  'ceph osd crush set 0 osd.0 1 root=foo row=foo'

If root 'foo' exists, then this will work and 'row=foo' will be ignored.
However, if there is no bucket named 'foo', then we would (in order)
create a bucket for row 'foo', adding osd.0 to it, and would then add
osd.0 to bucket 'foo' again -- remember, little consideration regarding
the bucket type was given.

This would trigger a monitor crash due to the recursion done in
'adjust_item_weight'. A solution to this problem is to make sure that we
do not allow specifying multiple buckets with the same name when adding
an item to crush. Not only solves our crash problem, but will also render
invalid any mistake when specifying the wrong bucket type (say, using
'row=bar' when in fact 'bar' is a rack).

Fixes: #3515
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: PGMonitor: check if pg exists when handling 'pg map <PG>'
Joao Eduardo Luis [Wed, 21 Nov 2012 17:48:25 +0000 (17:48 +0000)]
mon: PGMonitor: check if pg exists when handling 'pg map <PG>'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge remote-tracking branch 'origin/next' into next
Yehuda Sadeh [Thu, 22 Nov 2012 22:59:25 +0000 (14:59 -0800)]
Merge remote-tracking branch 'origin/next' into next

12 years agomds: child directory inherits SGID bit
Sage Weil [Thu, 22 Nov 2012 21:53:29 +0000 (13:53 -0800)]
mds: child directory inherits SGID bit

Update the inode, not the local variable.

Reported-by: Giorgos Kappes <geokapp@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'origin/next' into next
Yehuda Sadeh [Thu, 22 Nov 2012 20:57:33 +0000 (12:57 -0800)]
Merge remote-tracking branch 'origin/next' into next

12 years agoMerge branch 'wip-opslog-socket2' into next
Yehuda Sadeh [Thu, 22 Nov 2012 20:55:35 +0000 (12:55 -0800)]
Merge branch 'wip-opslog-socket2' into next

Conflicts:
src/rgw/rgw_main.cc

12 years agocrush: prevent loops from insert_item
Sage Weil [Thu, 22 Nov 2012 17:17:34 +0000 (09:17 -0800)]
crush: prevent loops from insert_item

If the insertion would create a loop, return -EINVAL.

Fixes: #3515
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoTry using syscall() for syncfs if not supported directly by glibc
Dan Mick [Tue, 20 Nov 2012 01:31:55 +0000 (17:31 -0800)]
Try using syscall() for syncfs if not supported directly by glibc

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agorgw: fix usage accounting
Yehuda Sadeh [Wed, 21 Nov 2012 22:15:41 +0000 (14:15 -0800)]
rgw: fix usage accounting

bytes_sent and bytes_received are no longer accounted
in the req_state, needed to get them out of the ClientIO
object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorbd: make snap purge fail if removing a snap fails
Josh Durgin [Wed, 21 Nov 2012 21:24:24 +0000 (13:24 -0800)]
rbd: make snap purge fail if removing a snap fails

Otherwise we report 100% removed when some may have failed.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-java-enotdir'
Noah Watkins [Wed, 21 Nov 2012 20:33:43 +0000 (12:33 -0800)]
Merge branch 'wip-java-enotdir'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
12 years agomsgr: use get_myaddr and set_myaddr to set the nonce
Greg Farnum [Wed, 21 Nov 2012 19:47:55 +0000 (11:47 -0800)]
msgr: use get_myaddr and set_myaddr to set the nonce

We can't set it directly via get_myaddr as its a const ref. Dur.

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agorgw: fix cleanup
Yehuda Sadeh [Wed, 21 Nov 2012 20:04:39 +0000 (12:04 -0800)]
rgw: fix cleanup

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: signal shuts down fcgi socket
Yehuda Sadeh [Wed, 21 Nov 2012 00:30:08 +0000 (16:30 -0800)]
rgw: signal shuts down fcgi socket

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agocrypto: fix nss related leak
Yehuda Sadeh [Tue, 20 Nov 2012 23:30:37 +0000 (15:30 -0800)]
crypto: fix nss related leak

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix xml parser leak
Yehuda Sadeh [Tue, 20 Nov 2012 01:10:11 +0000 (17:10 -0800)]
rgw: fix xml parser leak

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix memory leaks
Yehuda Sadeh [Tue, 20 Nov 2012 00:52:38 +0000 (16:52 -0800)]
rgw: fix memory leaks

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoset the nonce unconditionally on bind
Greg Farnum [Mon, 19 Nov 2012 22:15:30 +0000 (14:15 -0800)]
set the nonce unconditionally on bind

12 years agodoc: Added FAQ back into toc tree.
John Wilkins [Wed, 21 Nov 2012 17:48:18 +0000 (09:48 -0800)]
doc: Added FAQ back into toc tree.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agotest_librbd_fsx: Add OP_FLATTEN
Dan Mick [Wed, 21 Nov 2012 02:54:38 +0000 (18:54 -0800)]
test_librbd_fsx: Add OP_FLATTEN

12 years agotest_librbd_fsx: consume saved-image files as test runs
Dan Mick [Wed, 21 Nov 2012 02:00:29 +0000 (18:00 -0800)]
test_librbd_fsx: consume saved-image files as test runs

Avoid consuming lots of disk space by holding only as many file
copies as needed (compare the n-2 file as we make clone n).

12 years agoosdc/Striper: fix handling for sparse reads in add_partial_sparse_result()
Sage Weil [Wed, 21 Nov 2012 00:11:00 +0000 (16:11 -0800)]
osdc/Striper: fix handling for sparse reads in add_partial_sparse_result()

If bl_map begins *after* the first item in buffer_extents, we want to
skip only the first buffer extent before doing 'continue' to loop to the
next one.

This fixes a crash caused by underflow with a pattern like:

2012-11-20 13:54:30.347861 7f9404ed6700 10 striper add_partial_sparse_result(0x1efa088) 192 covering {12288=192} (offset 2906) to [0,5286,38054,4288]
2012-11-20 13:54:30.347863 7f9404ed6700 20 striper   t 0~5286 bl has 192 off 2906
2012-11-20 13:54:30.347866 7f9404ed6700 20 striper   s gap 9382, skipping
2012-11-20 13:54:30.347867 7f9404ed6700 20 striper   s has 192, copying
2012-11-20 13:54:30.347872 7f9404ed6700 20 striper   t 9574~18446744073709547328 bl has 0 off 12480
2012-11-20 13:54:30.347874 7f9404ed6700 20 striper   s at end
2012-11-20 13:54:30.347876 7f9404ed6700 20 striper   t 38054~4288 bl has 0 off 12480
2012-11-20 13:54:30.347877 7f9404ed6700 20 striper   s at end

Dan reproduced this with

 ./test_librbd_fsx -d -W -R -p 10 -t 1 -S 4 -N 300 rbd fsx

(although I was unable to do so).

Re-fixes #3428.

Reported-and-tested-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agojava: add Java exception for ENOTDIR
Noah Watkins [Tue, 20 Nov 2012 21:44:47 +0000 (13:44 -0800)]
java: add Java exception for ENOTDIR

This specialization is useful in the Hadoop CephFS shim. An lstat may
return ENOTENT or ENOTDIR or some other IOException without a
specialization. In Hadoop we convert ENOTDIR into ENOENT.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoqa/run_xfstests.sh: drop tests 174 and 181
Alex Elder [Tue, 20 Nov 2012 21:53:55 +0000 (15:53 -0600)]
qa/run_xfstests.sh: drop tests 174 and 181

These tests are showing intermittent failures so we'll drop them
from the default list for the time being.

Signed-off-by: Alex Elder <elder@inktank.com>
12 years agodoc: filename change to fix a link.
John Wilkins [Tue, 20 Nov 2012 21:12:35 +0000 (13:12 -0800)]
doc: filename change to fix a link.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: fixed links that broke due to new IA.
John Wilkins [Tue, 20 Nov 2012 19:21:58 +0000 (11:21 -0800)]
doc: fixed links that broke due to new IA.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
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 agoupstart: fix limit lines
Sage Weil [Sat, 17 Nov 2012 01:59:08 +0000 (17:59 -0800)]
upstart: fix limit lines

Two arguments.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: add ceph-osd-all-starter.conf
Sage Weil [Sat, 17 Nov 2012 00:37:14 +0000 (16:37 -0800)]
upstart: add ceph-osd-all-starter.conf

Starter helper will start all osds that appear in /var/lib/ceph/osd/*,
as we do with the mons and mdss.

This will only proceed if the 'ready' file is there, which is currently
only touched by ceph-disk-activate.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: make ceph-osd-all, ceph jobs
Sage Weil [Sat, 17 Nov 2012 00:32:23 +0000 (16:32 -0800)]
upstart: make ceph-osd-all, ceph jobs

This will let you start/stop all daemons.

Signed-off-by: Sage Weil <sage@inktank.com>
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 agorgw: ops log can also go to socket
Yehuda Sadeh [Wed, 14 Nov 2012 01:02:02 +0000 (17:02 -0800)]
rgw: ops log can also go to socket

Adding a new ops log output (into a unix domain socket).
Configuration:
  rgw_enable_usage_log : master switch for ops log
  rgw ops log socket path : set socket path
  rgw ops log rados : whether ops should be logged in the rados
                      cluster
  rgw ops log data backlog : max size in MB to be accumulated
                             without flushing

Signed-off-by: Yehuda Sadeh <yehuda@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>