]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agoosd/OSD.cc: OSD::shutdown() leaks lock
Samuel Just [Wed, 29 Aug 2012 22:58:19 +0000 (15:58 -0700)]
osd/OSD.cc: OSD::shutdown() leaks lock

CID 716952: Missing unlock (LOCK)At (48): Returning without unlocking
"this->osd_lock._m".

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoosd/ClassHandler.cc: uninit var in ctor
Samuel Just [Wed, 29 Aug 2012 22:55:23 +0000 (15:55 -0700)]
osd/ClassHandler.cc: uninit var in ctor

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

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoosd/ClassHandler: uninit var in ctor
Samuel Just [Wed, 29 Aug 2012 22:53:32 +0000 (15:53 -0700)]
osd/ClassHandler: uninit var in ctor

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

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agomonclient: uninit var in ctor
Sage Weil [Sat, 25 Aug 2012 23:01:10 +0000 (16:01 -0700)]
monclient: uninit var in ctor

CID 717328: Uninitialized scalar field (UNINIT_CTOR) [select defect]
At (2): Non-static class member "newest" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon/MonitorStore: uninit var in ctor
Sage Weil [Sat, 25 Aug 2012 22:59:43 +0000 (15:59 -0700)]
mon/MonitorStore: uninit var in ctor

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

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agopaxos: init vars in ctr
Sage Weil [Sat, 25 Aug 2012 22:58:57 +0000 (15:58 -0700)]
paxos: init vars in ctr

At (2): Non-static class member "latest_stashed" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "num_last" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "uncommitted_v" is not initialized in this constructor nor in any functions that it calls.
CID 717330: Uninitialized scalar field (UNINIT_CTOR)
At (8): Non-static class member "uncommitted_pn" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/DispatchQueue: simplify shutdown()
Sage Weil [Sat, 25 Aug 2012 22:56:31 +0000 (15:56 -0700)]
msg/DispatchQueue: simplify shutdown()

lcok isn't held during dispatch, so we can take it unconditionally.  THis
also makes coverity happier:

CID 716966: Data race condition (MISSING_LOCK)
At (4): Accessing "this->stop" ("DispatchQueue.stop") requires the "Mutex._m" lock.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Message: fix possible null deref
Sage Weil [Sat, 25 Aug 2012 03:12:26 +0000 (20:12 -0700)]
msg/Message: fix possible null deref

cct may be null

CID 716930: Dereference after null check (FORWARD_NULL)
At (11): Dereferencing null pointer "cct".

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg: pass by reference
Sage Weil [Sat, 25 Aug 2012 03:10:52 +0000 (20:10 -0700)]
msg: pass by reference

CID 717048: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter a of type entity_addr_t (size 136 bytes) by value.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agofix accepter bind fix
Sage Weil [Sat, 25 Aug 2012 03:07:53 +0000 (20:07 -0700)]
fix accepter bind fix

13 years agomsg/Accepter: move nonce init to ctor
Sage Weil [Sat, 25 Aug 2012 03:07:20 +0000 (20:07 -0700)]
msg/Accepter: move nonce init to ctor

This was suggested by Greg too but I was too lazy.

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

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agolog: protect m_stop with lock
Sage Weil [Sat, 25 Aug 2012 03:02:14 +0000 (20:02 -0700)]
log: protect m_stop with lock

CID 716965: Data race condition (MISSING_LOCK)
At (2): Accessing "this->m_stop" ("_ZN4ceph3log3LogE.m_stop") requires the "_ZN4ceph3log3LogE.m_queue_mutex" lock.

This isn't strictly needed since we assume only one thread will call this
method and start a thead, but it makes coverity happy.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocommon/LogEntry: pass by value for contains()
Sage Weil [Sat, 25 Aug 2012 02:52:20 +0000 (19:52 -0700)]
common/LogEntry: pass by value for contains()

CID 717031: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter k of type LogEntryKey (size 168 bytes) by value.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoLogEntry: pass by reference
Sage Weil [Sat, 25 Aug 2012 02:51:30 +0000 (19:51 -0700)]
LogEntry: pass by reference

CID 717030: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter w of type entity_inst_t (size 152 bytes) by value.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Pipe: make banner buffer slightly bigger
Sage Weil [Sat, 25 Aug 2012 02:47:44 +0000 (19:47 -0700)]
msg/Pipe: make banner buffer slightly bigger

CID 717023: Out-of-bounds access (OVERRUN_DYNAMIC)
At (4): Allocating insufficient memory for the terminating null of the string.

This appears to be a false positive (we don't interpret the buffer as a
string, ever), but it will make coverity happier.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agolibrbd: fix delete[]
Sage Weil [Sat, 25 Aug 2012 02:36:44 +0000 (19:36 -0700)]
librbd: fix delete[]

CID 716902: Non-array delete for scalars (DELETE_ARRAY)
At (15): Deleting array variable "buf" with non-array delete in "delete buf".

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoceph-dencoder: don't leak object
Sage Weil [Sat, 25 Aug 2012 02:35:04 +0000 (19:35 -0700)]
ceph-dencoder: don't leak object

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoauth: fix uninit vars
Sage Weil [Sat, 25 Aug 2012 02:31:10 +0000 (19:31 -0700)]
auth: fix uninit vars

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrypto: fix fd leak from get_random_bytes()
Sage Weil [Sat, 25 Aug 2012 02:27:55 +0000 (19:27 -0700)]
crypto: fix fd leak from get_random_bytes()

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Accepter: check setsockopt return value
Sage Weil [Fri, 24 Aug 2012 23:45:29 +0000 (16:45 -0700)]
msg/Accepter: check setsockopt return value

CCID 716856: Other violation (CHECKED_RETURN)
At (7): Calling function "setsockopt(this->listen_sd, 1, 2, &on, 4U)" without checking return value. This library function may fail and return an error code.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: fix broken EMetablob inode_t* return value
Sage Weil [Fri, 24 Aug 2012 23:38:20 +0000 (16:38 -0700)]
mds: fix broken EMetablob inode_t* return value

We pass this back to the caller, but it points to a member that is never
looked at, because the inode has already been encoded.  In effect this
wasn't journaling anything useful, and the only user questioned whether it
was needed, so let's rip it out.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoclient: unconditional teardown
Sage Weil [Fri, 24 Aug 2012 23:31:25 +0000 (16:31 -0700)]
client: unconditional teardown

CID 717125: Dereference before null check (REVERSE_INULL)
At (2): Null-checking "this->objectcacher" 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>
13 years agorgw: init RGWRados::cct in ctor
Sage Weil [Fri, 24 Aug 2012 23:27:57 +0000 (16:27 -0700)]
rgw: init RGWRados::cct in ctor

Coverity cid 717382
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorgw: init RGWGetObj::sent_header in ctor
Sage Weil [Fri, 24 Aug 2012 23:27:01 +0000 (16:27 -0700)]
rgw: init RGWGetObj::sent_header in ctor

Coverity cid 717383
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorgw: init ptr
Sage Weil [Fri, 24 Aug 2012 23:26:20 +0000 (16:26 -0700)]
rgw: init ptr

Coverity cid 717384
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorgw: add missing ctor, init parent
Sage Weil [Fri, 24 Aug 2012 23:25:01 +0000 (16:25 -0700)]
rgw: add missing ctor, init parent

Coverity cid 717385
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoomap_bench: fix uninit var
Sage Weil [Fri, 24 Aug 2012 23:24:12 +0000 (16:24 -0700)]
omap_bench: fix uninit var

Coverity cid 717386
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/osd/RadosModel: uninit value
Sage Weil [Fri, 24 Aug 2012 23:23:05 +0000 (16:23 -0700)]
test/osd/RadosModel: uninit value

Coverity cid 717388 717387
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/osd/RadosModel: fix uninit value
Sage Weil [Fri, 24 Aug 2012 23:21:53 +0000 (16:21 -0700)]
test/osd/RadosModel: fix uninit value

Coverity cid 717389
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/osd/RadosModel: fix uninit values
Sage Weil [Fri, 24 Aug 2012 23:21:09 +0000 (16:21 -0700)]
test/osd/RadosModel: fix uninit values

Coverity cid 717390
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/osd/RadosModel: fix uninit ptr
Sage Weil [Fri, 24 Aug 2012 23:20:10 +0000 (16:20 -0700)]
test/osd/RadosModel: fix uninit ptr

Coverity cid 717391
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/rados-api/aio: fix uninit ptr
Sage Weil [Fri, 24 Aug 2012 23:19:26 +0000 (16:19 -0700)]
test/rados-api/aio: fix uninit ptr

Coverity cid #717392
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: fix uninitialized scalar in constructor
Sage Weil [Fri, 24 Aug 2012 23:18:04 +0000 (16:18 -0700)]
cephtool: fix uninitialized scalar in constructor

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/Object: comment out dead code
Sage Weil [Fri, 24 Aug 2012 23:16:24 +0000 (16:16 -0700)]
test/Object: comment out dead code

Coverity cid #717397
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: fix unused value
Sage Weil [Fri, 24 Aug 2012 23:15:23 +0000 (16:15 -0700)]
mds: fix unused value

This value was never used before it was clobbered.

Coverity cid #717398
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: drop unused value
Sage Weil [Fri, 24 Aug 2012 23:13:37 +0000 (16:13 -0700)]
mds: drop unused value

Coverity cid #717400
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agofiler: add missing return
Sage Weil [Fri, 24 Aug 2012 23:12:06 +0000 (16:12 -0700)]
filer: add missing return

Coverity cid 717404
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorgw: fix use-after-free
Sage Weil [Fri, 24 Aug 2012 23:11:16 +0000 (16:11 -0700)]
rgw: fix use-after-free

Coverity cid 717405
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest_librbd: add missing va_end()
Sage Weil [Fri, 24 Aug 2012 23:09:32 +0000 (16:09 -0700)]
test_librbd: add missing va_end()

Coverity cid 717407
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-rbd-children'
Josh Durgin [Thu, 30 Aug 2012 23:06:37 +0000 (16:06 -0700)]
Merge branch 'wip-rbd-children'

13 years agodoc: clarify rbd man page (esp. layering)
Josh Durgin [Thu, 30 Aug 2012 00:30:17 +0000 (17:30 -0700)]
doc: clarify rbd man page (esp. layering)

* a clone's size can't be overridden
* note which commands require format 2
* clarify details of copy
* add examples for cloning
* add pool to map example for consistency
* fix a couple warnings and re-sync man page with rst

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: add --format option
Josh Durgin [Wed, 29 Aug 2012 17:58:30 +0000 (10:58 -0700)]
rbd: add --format option

This chooses whether to use the original (supported by krbd)
or the new (supports layering) format.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoclient: renew/submit subs on startup
Sage Weil [Thu, 30 Aug 2012 21:03:11 +0000 (14:03 -0700)]
client: renew/submit subs on startup

This fixes a delay in getting the initial MDSMap during startup (we wait
for the MonClient tick()).

Reported-by: Noah Watkins <jayhawk@cs.ucsc.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
13 years ago:doc: Added constraints and revised a description per joshd.
John Wilkins [Thu, 30 Aug 2012 18:48:47 +0000 (11:48 -0700)]
:doc: Added constraints and revised a description per joshd.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agoupstart, ceph-create-keys: Make client.admin key generation automatic.
Tommi Virtanen [Thu, 30 Aug 2012 14:16:52 +0000 (10:16 -0400)]
upstart, ceph-create-keys: Make client.admin key generation automatic.

This should help simplify Chef etc deployments. Now (when using the
Upstart jobs), when a ceph-mon is started, ceph-create-admin-key is
triggered. If /etc/ceph/$cluster.client.admin.keyring already exists,
it does nothing; otherwise, it waits for ceph-mon to reach quorum, and
then does a "ceph auth get-or-create" to create the key, and writes it
atomically to disk.

The equivalent code can be removed from the Chef cookbook once this is
in.

13 years agoupstart: Make instance jobs export their cluster and id variables.
Tommi Virtanen [Thu, 30 Aug 2012 14:11:09 +0000 (10:11 -0400)]
upstart: Make instance jobs export their cluster and id variables.

This allows other jobs listening to Upstart "started ceph-mon" events
to see what instance started.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
13 years agoconfig: Add a per-name default keyring to front of keyring search path.
Tommi Virtanen [Thu, 30 Aug 2012 14:21:29 +0000 (10:21 -0400)]
config: Add a per-name default keyring to front of keyring search path.

This lets us have e.g. /etc/ceph/ceph.client.admin.keyring that is
owned by root:admin and mode u=rw,g=r,o= without making every non-root
run of the command line tools complain and fail.

This is what the Chef cookbook has been doing for a while already.

13 years agodoc: Modified index page with table. Pools and Auth will go to Ops.
John Wilkins [Thu, 30 Aug 2012 07:38:01 +0000 (00:38 -0700)]
doc: Modified index page with table. Pools and Auth will go to Ops.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Some improvements. This still needs review.
John Wilkins [Thu, 30 Aug 2012 07:37:02 +0000 (00:37 -0700)]
doc: Some improvements. This still needs review.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added additional note to mount data disk to data path.
John Wilkins [Thu, 30 Aug 2012 07:35:31 +0000 (00:35 -0700)]
doc: Added additional note to mount data disk to data path.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a document for general config settings.
John Wilkins [Thu, 30 Aug 2012 07:33:58 +0000 (00:33 -0700)]
doc: Added a document for general config settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a doc for filestore settings.
John Wilkins [Thu, 30 Aug 2012 07:29:14 +0000 (00:29 -0700)]
doc: Added a doc for filestore settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a document for RBD cache settings.
John Wilkins [Thu, 30 Aug 2012 07:28:29 +0000 (00:28 -0700)]
doc: Added a document for RBD cache settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added substantial detail to OSD setting descriptions.
John Wilkins [Thu, 30 Aug 2012 07:26:38 +0000 (00:26 -0700)]
doc: Added substantial detail to OSD setting descriptions.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: minor edit to use # for comments.
John Wilkins [Thu, 30 Aug 2012 07:25:17 +0000 (00:25 -0700)]
doc: minor edit to use # for comments.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Restructured ceph config. Added network and OSD config details.
John Wilkins [Thu, 30 Aug 2012 07:24:26 +0000 (00:24 -0700)]
doc: Restructured ceph config. Added network and OSD config details.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agolibrbd: prevent racing clone and snap unprotect
Josh Durgin [Wed, 29 Aug 2012 00:24:47 +0000 (17:24 -0700)]
librbd: prevent racing clone and snap unprotect

If the following sequence of events occured,
a clone could be created of an unprotected snapshot:

1. A: begin clone - check that snap foo is protected
2. B: rbd unprotect snap foo
3. B: check that all pools have no clones of foo
4. B: unprotect snap foo
5. A: finish creating clone of foo, add it as a child

To stop this from happening, check at the beginning and end of
cloning that the parent snapshot is protected. If it is not,
or checking protection status fails (possibly because the parent
snapshot was removed), remove the clone and return an error.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: add "children" command, update cli test files
Dan Mick [Tue, 21 Aug 2012 23:07:25 +0000 (16:07 -0700)]
rbd: add "children" command, update cli test files

Fixes: #2720
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: add {rbd_}list_children() methods
Dan Mick [Tue, 21 Aug 2012 22:58:21 +0000 (15:58 -0700)]
librbd: add {rbd_}list_children() methods

These iterate over all pools and check for children of a
particular snapshot.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
13 years agorgw: remove unused block of code
Yehuda Sadeh [Wed, 29 Aug 2012 21:20:38 +0000 (14:20 -0700)]
rgw: remove unused block of code

We were reading bucket info, but that wasn't necessary.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorgw_admin.cc: Prevent clobbering the index when linking a bucket.
caleb miles [Tue, 28 Aug 2012 17:41:42 +0000 (10:41 -0700)]
rgw_admin.cc: Prevent clobbering the index when linking a bucket.

Prevent the 'bucket link' command from overwriting the index of an
existing bucket. Corrects bug 2935:

http://tracker.newdream.net/issues/2935

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agorgw: clear usage map before reading usage
Yehuda Sadeh [Tue, 28 Aug 2012 23:17:21 +0000 (16:17 -0700)]
rgw: clear usage map before reading usage

Fixes: #3057
Since we read usage in chunks we need to clear the
usage map before reading the next chunk, otherwise
we're going to aggregate the old data as well.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Tue, 28 Aug 2012 22:15:08 +0000 (15:15 -0700)]
Merge branch 'next'

13 years agoosd: fix waiting_for_disk assertion
Sage Weil [Tue, 28 Aug 2012 22:14:41 +0000 (15:14 -0700)]
osd: fix waiting_for_disk assertion

If requeue is false, we won't have cleared out waiting_for_ondisk; adjust
assert placement as appropriate.  Also, make sur we handle the requeue
and !op case properly (although I'm not sure offhand if/when it would
come up).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agorados_bench: wait for completion callbacks before returning
Mike Ryan [Tue, 28 Aug 2012 18:57:03 +0000 (11:57 -0700)]
rados_bench: wait for completion callbacks before returning

If we don't wait for the callback, the finisher may cleanup the callback
context before the callback is actually invoked, causing a
use-after-free error.

This fixes #3048.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoMakefile.am: add missing .h
Yehuda Sadeh [Tue, 28 Aug 2012 21:13:53 +0000 (14:13 -0700)]
Makefile.am: add missing .h

Was missing rgw_html_errors.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoMerge remote-tracking branch 'origin/wip-multi-delete'
Yehuda Sadeh [Tue, 28 Aug 2012 20:36:35 +0000 (13:36 -0700)]
Merge remote-tracking branch 'origin/wip-multi-delete'

Conflicts:
src/Makefile.am

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorados_bench: wait for completion callbacks before returning
Mike Ryan [Tue, 28 Aug 2012 18:57:03 +0000 (11:57 -0700)]
rados_bench: wait for completion callbacks before returning

If we don't wait for the callback, the finisher may cleanup the callback
context before the callback is actually invoked, causing a
use-after-free error.

This fixes #3048.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agodoc: Completed and reviewed RGW config reference.
John Wilkins [Tue, 28 Aug 2012 20:25:44 +0000 (13:25 -0700)]
doc: Completed and reviewed RGW config reference.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: added admonishment. Updated header syntax, copy semantics and x-ref.
John Wilkins [Tue, 28 Aug 2012 20:24:29 +0000 (13:24 -0700)]
doc: added admonishment. Updated header syntax, copy semantics and x-ref.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agorgw: fix usage log read
Yehuda Sadeh [Tue, 28 Aug 2012 19:51:55 +0000 (12:51 -0700)]
rgw: fix usage log read

The usage log read got broken in a recent cleanup work.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agodoc: Added internal references. Clarified language in disk prepare.
John Wilkins [Tue, 28 Aug 2012 18:41:59 +0000 (11:41 -0700)]
doc: Added internal references. Clarified language in disk prepare.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: added sudo for hdparm command.
John Wilkins [Tue, 28 Aug 2012 18:02:13 +0000 (11:02 -0700)]
doc: added sudo for hdparm command.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: added internal hyperlink targets.
John Wilkins [Tue, 28 Aug 2012 17:55:04 +0000 (10:55 -0700)]
doc: added internal hyperlink targets.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Clean up quick start to ensure nobody uses "localhost".
John Wilkins [Tue, 28 Aug 2012 17:01:20 +0000 (10:01 -0700)]
doc: Clean up quick start to ensure nobody uses "localhost".

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Cleaned up syntax errors, and converted table to list.
John Wilkins [Tue, 28 Aug 2012 16:24:22 +0000 (09:24 -0700)]
doc: Cleaned up syntax errors, and converted table to list.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Tue, 28 Aug 2012 00:44:53 +0000 (17:44 -0700)]
Merge branch 'next'

13 years agoMerge branch 'wip-objecter' into next
Sage Weil [Tue, 28 Aug 2012 00:26:13 +0000 (17:26 -0700)]
Merge branch 'wip-objecter' into next

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjecter: fix skipped map handling
Sage Weil [Mon, 27 Aug 2012 15:24:08 +0000 (08:24 -0700)]
objecter: fix skipped map handling

If we skip a map, we want to translate NO_ACTION to NEED_RESEND, but leave
POOL_DNE alone.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoobjecter: send queued requests when we get first osdmap
Sage Weil [Mon, 27 Aug 2012 14:38:34 +0000 (07:38 -0700)]
objecter: send queued requests when we get first osdmap

If we get our first osdmap and already have requests queued, send them.

Fixes: #3050
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoobjecter: fix is_latest_map() retry on mon session restart
Sage Weil [Mon, 27 Aug 2012 04:21:44 +0000 (21:21 -0700)]
objecter: fix is_latest_map() retry on mon session restart

If the mon session drops, we get an EAGAIN callback, which we already
correctly ignored.  (Clean this up and comment so it's clearer what is
going on.)

Fix ms_handle_connect() to resubmit those requests.

Noticed while fixing #3049.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonclient: pass EAGAIN to is_latest_map() callers
Sage Weil [Mon, 27 Aug 2012 04:17:05 +0000 (21:17 -0700)]
monclient: pass EAGAIN to is_latest_map() callers

If our map get_version check needs to be retried, tell the
is_latest_map() callers instead of giving returning 0 ("no").

Fixes: #3049
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonclient: document get_version(), and fix return value
Sage Weil [Tue, 28 Aug 2012 00:25:54 +0000 (17:25 -0700)]
monclient: document get_version(), and fix return value

Return -EAGAIN instead of -1, since that's more meaningful, and
document it.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoImplement multi-object delete.
caleb miles [Tue, 28 Aug 2012 00:08:44 +0000 (17:08 -0700)]
Implement multi-object delete.

An implimentation of multi-object delete described in
the latest Amazon S3 API provied at

http://docs.amazonwebservices.com/AmazonS3/latest/API

This commit is in response to tracker issue 2797

http://tracker.newdream.net/issues/2797

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agoosd: requeue dup ops inline with in-progress ops
Sage Weil [Mon, 27 Aug 2012 21:31:32 +0000 (14:31 -0700)]
osd: requeue dup ops inline with in-progress ops

We should requeue the dups along with the originals.  This avoids
situations where, after requeue, the dups are reordered with respect to
each other.  For example:

 - client sends A, B, C
 - osd receives A
 - connection drops
 - client sends A', B', C'
 - osd puts A' in waiting_for_ondisk, starts B' and C'
 - on_change() requeues everything

Final queue order (before this patch) is
    A, B', C', A'

After this patch, the resulting queue order is
    A, A', B', C'

Or somewhat more generally, it might be:

    A, A', B, B', B'', C', C'', D'', ....

Fixes (another source of): #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-mon-intparsing'
Sage Weil [Mon, 27 Aug 2012 22:10:35 +0000 (15:10 -0700)]
Merge remote-tracking branch 'gh/wip-mon-intparsing'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoosd: include notif pointer in notify debug output
Sage Weil [Fri, 24 Aug 2012 00:08:20 +0000 (17:08 -0700)]
osd: include notif pointer in notify debug output

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoconfig: add 'fatal signal handlers' option
Sage Weil [Thu, 23 Aug 2012 16:37:37 +0000 (09:37 -0700)]
config: add 'fatal signal handlers' option

This will let us disable the sighandlers for SEGV, etc.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocls_rgw_client: fix #include path
Sage Weil [Mon, 27 Aug 2012 21:41:01 +0000 (14:41 -0700)]
cls_rgw_client: fix #include path

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'origin/master' into wip-gc2
Yehuda Sadeh [Mon, 27 Aug 2012 19:43:27 +0000 (12:43 -0700)]
Merge remote-tracking branch 'origin/master' into wip-gc2

13 years agocls_rgw: add cls_rgw unitest, test gc api
Yehuda Sadeh [Mon, 27 Aug 2012 18:19:27 +0000 (11:19 -0700)]
cls_rgw: add cls_rgw unitest, test gc api

Test various cls_rgw gc related functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorgw-admin: get rid of lazy remove option, other fixes
Yehuda Sadeh [Tue, 21 Aug 2012 22:44:30 +0000 (15:44 -0700)]
rgw-admin: get rid of lazy remove option, other fixes

was mishandling parsing of binary flag arguments.
also, fix argument parsing and update radosgw-admin
cli test reference.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorgw: implement garbage collector
Yehuda Sadeh [Tue, 21 Aug 2012 22:05:38 +0000 (15:05 -0700)]
rgw: implement garbage collector

Add a garbage collector thread that is responsible for clean
up of clutter. When removing an object, store info about the
leftovers in a special gc map (via rgw objclass). A new
radosgw-admin commands to list objects in gc, and to run the
gc process manually. Also, gc processors can run in parallel,
however, each will handle a single gc shard (synchronized
using lock objclass).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agomon: make parse_pos_long() error message more helpful
Sage Weil [Mon, 27 Aug 2012 15:36:41 +0000 (08:36 -0700)]
mon: make parse_pos_long() error message more helpful

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: turn off lockdep during shutdown signal handler
Sage Weil [Sun, 26 Aug 2012 15:42:06 +0000 (08:42 -0700)]
osd: turn off lockdep during shutdown signal handler

We don't shut down all threads, and the surviving ones fight with
exit()'s teardown.  Kludge until we have a clean shutdown process.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge tag 'v0.51'
Sage Weil [Sun, 26 Aug 2012 15:18:45 +0000 (08:18 -0700)]
Merge tag 'v0.51'

v0.51

13 years agov0.51 v0.51
Sage Weil [Sat, 25 Aug 2012 22:58:39 +0000 (15:58 -0700)]
v0.51

13 years agomon: require --id
Sage Weil [Mon, 20 Aug 2012 20:12:26 +0000 (13:12 -0700)]
mon: require --id

Fixes: #2997
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: fix int parsing in monmon
Sage Weil [Fri, 24 Aug 2012 23:05:07 +0000 (16:05 -0700)]
mon: fix int parsing in monmon

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: check for int parsing errors in mdsmon
Sage Weil [Fri, 24 Aug 2012 23:03:02 +0000 (16:03 -0700)]
mon: check for int parsing errors in mdsmon

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