]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agodoc: Consolidated start and stop.
John Wilkins [Tue, 4 Sep 2012 18:36:33 +0000 (11:36 -0700)]
doc: Consolidated start and stop.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a new "Data Placement" overview section for added continuity.
John Wilkins [Tue, 4 Sep 2012 18:35:33 +0000 (11:35 -0700)]
doc: Added a new "Data Placement" overview section for added continuity.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a new CRUSH map section. Will need to incorporate new tunables info.
John Wilkins [Tue, 4 Sep 2012 18:34:58 +0000 (11:34 -0700)]
doc: Added a new CRUSH map section. Will need to incorporate new tunables info.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Moving new auth section from configuration to operations.
John Wilkins [Tue, 4 Sep 2012 18:33:37 +0000 (11:33 -0700)]
doc: Moving new auth section from configuration to operations.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added debug ref to toctree. Trimmed title names a bit.
John Wilkins [Mon, 3 Sep 2012 21:06:44 +0000 (14:06 -0700)]
doc: Added debug ref to toctree. Trimmed title names a bit.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added "how to" for debug/logging config. Trimmed titles too.
John Wilkins [Mon, 3 Sep 2012 21:05:51 +0000 (14:05 -0700)]
doc: Added "how to" for debug/logging config. Trimmed titles too.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added logging reference under configuration section.
John Wilkins [Mon, 3 Sep 2012 21:04:11 +0000 (14:04 -0700)]
doc: Added logging reference under configuration section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added runtime configuration example.
John Wilkins [Mon, 3 Sep 2012 20:35:49 +0000 (13:35 -0700)]
doc: Added runtime configuration example.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agovstart.sh: -r to start radosgw
Sage Weil [Sat, 1 Sep 2012 21:39:28 +0000 (14:39 -0700)]
vstart.sh: -r to start radosgw

Uses a fixed access/secret key for easier testing.  Starts a standalone
apache2 process with basic config (based on the teuthology one).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-coverity'
Sage Weil [Sat, 1 Sep 2012 21:50:34 +0000 (14:50 -0700)]
Merge remote-tracking branch 'gh/wip-coverity'

13 years agoMerge branch 'wip-osd-flags'
Sage Weil [Sat, 1 Sep 2012 00:06:16 +0000 (17:06 -0700)]
Merge branch 'wip-osd-flags'

Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agoosd: defer backfill with NOBACKFILL osdmap flag is set
Sage Weil [Fri, 31 Aug 2012 23:31:01 +0000 (16:31 -0700)]
osd: defer backfill with NOBACKFILL osdmap flag is set

If we encounter nobackfill, let ourselves to fall out of the recovery
queue.  If we encounter a map that has does not have the flag set and we
are not clean, requeue ourselves.  This is a big hammer, but simple.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoClarify CodingStyle with respect to tab compression of space runs
Dan Mick [Fri, 31 Aug 2012 22:18:53 +0000 (15:18 -0700)]
Clarify CodingStyle with respect to tab compression of space runs
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Greg Farnum <gregory.farnum@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoFix rados put from '-' (stdin)
Dan Mick [Fri, 31 Aug 2012 21:41:29 +0000 (14:41 -0700)]
Fix rados put from '-' (stdin)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Mike Ryan <mike.ryan@inktank.com>
Reviewed-by: Greg Farnum <gregory.farnum@inktank.com>
Fixes: #3068
13 years agoosd: pause/unpause recovery based on NORECOVER osdmap flag
Sage Weil [Fri, 24 Aug 2012 01:16:58 +0000 (18:16 -0700)]
osd: pause/unpause recovery based on NORECOVER osdmap flag

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosdmap: add NORECOVER flag
Sage Weil [Fri, 24 Aug 2012 01:12:28 +0000 (18:12 -0700)]
osdmap: add NORECOVER flag

This will stop recovery via log catch-up and via backfill both.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosdmap: add NOBACKFILL flag
Sage Weil [Fri, 24 Aug 2012 01:00:57 +0000 (18:00 -0700)]
osdmap: add NOBACKFILL flag

This will tell the OSDs to please not initiate any backfill operations.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoPG: do not update stats in ReplicaActive from info
Samuel Just [Fri, 31 Aug 2012 21:01:47 +0000 (14:01 -0700)]
PG: do not update stats in ReplicaActive from info

Bug #2954

Consider the following case:

1) Primary calls share_pg_info()
2) Primary processes client op and sends off sub_op to replica
3) Replica process sub_op
4) Replica process info reverting stat to before 2)

Similarly:

1) Primary processes client op
2) Primary calls share_pg_info()
3) Replica processes info
[4) Replica processes sub_op]

If 4) is interrupted by a map change, we can end up in a case there
the replica's info has a stat which reflects a log entry which
is not there.  If that logs ends up authoratative, the most recent
op will be replayed and end up double counted in the log.

There should actually be no cases where the stats change after the
replica goes active except for as part of a sub_op_modify.  Thus,
ReplicaActive::MInfoRec should not update the stats.

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agocrushtool: Miscellaneous cleanup.
caleb miles [Tue, 28 Aug 2012 21:42:30 +0000 (14:42 -0700)]
crushtool: Miscellaneous cleanup.

Clean up the output messages; add some function documentation and some
unit tests.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agoosd/osd_types.h: fix pg_history_t::merge copy paste error
Samuel Just [Thu, 30 Aug 2012 00:00:43 +0000 (17:00 -0700)]
osd/osd_types.h: fix pg_history_t::merge copy paste error

CID 716882: Copy-paste error (COPY_PASTE_ERROR)At (2): "last_epoch_started" in
"other.last_epoch_started" looks like a copy-paste error. Should it say
"last_epoch_split" instead?

From what I can tell, this really should be checking other.last_epoch_split
rather than other.last_epoch_started.

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoosd/Watch.h: uninit var in ctor Watch
Samuel Just [Wed, 29 Aug 2012 23:43:02 +0000 (16:43 -0700)]
osd/Watch.h: uninit var in ctor Watch

CID 717345: Uninitialized pointer field (UNINIT_CTOR)At (8): Non-static class
member "obc" is not initialized in this constructor nor in any functions that
it calls.
At (2): Non-static class member "id" is not initialized in this constructor nor
in any functions that it calls.
At (4): Non-static class member "reply" is not
initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "timeout" 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/ReplicatedPG.h: uninit var in ctor RepModify
Samuel Just [Wed, 29 Aug 2012 23:39:25 +0000 (16:39 -0700)]
osd/ReplicatedPG.h: uninit var in ctor RepModify

CID 717344: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "epoch_started" 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/ReplicatedPG.h: uninit var in ctor OpContext
Samuel Just [Wed, 29 Aug 2012 23:37:50 +0000 (16:37 -0700)]
osd/ReplicatedPG.h: uninit var in ctor OpContext

CID 717343: Uninitialized pointer field (UNINIT_CTOR)At (3): Non-static class
member "snapset" 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/ReplicatedPG: pass PGPool to ReplicatedPG ctor by ref
Samuel Just [Wed, 29 Aug 2012 23:35:01 +0000 (16:35 -0700)]
osd/ReplicatedPG: pass PGPool to ReplicatedPG ctor by ref

CID 717057: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter _pool of type PGPool (size 336 bytes) by value.

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoosd/PG.h: uninit var in ctor NamedState
Samuel Just [Wed, 29 Aug 2012 23:32:28 +0000 (16:32 -0700)]
osd/PG.h: uninit var in ctor NamedState

CID 717340: Uninitialized pointer field (UNINIT_CTOR)At (2): Non-static class
member "state_name" 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/PG.h: uninit var in ctor OndiskLog
Samuel Just [Wed, 29 Aug 2012 23:31:20 +0000 (16:31 -0700)]
osd/PG.h: uninit var in ctor OndiskLog

CID 717342: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "has_checksums" 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/PG.h: uninit var in ctor IndexedLog
Samuel Just [Wed, 29 Aug 2012 23:30:07 +0000 (16:30 -0700)]
osd/PG.h: uninit var in ctor IndexedLog

CID 717339: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "last_requested" 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/PG.cc: PG constructor pass PGPool by reference
Samuel Just [Wed, 29 Aug 2012 23:28:20 +0000 (16:28 -0700)]
osd/PG.cc: PG constructor pass PGPool by reference

CID 717053: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter _pool of type PGPool (size 336 bytes) by value.

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoosd/OpRequest.h: uninit vars in ctor OpRequest
Samuel Just [Wed, 29 Aug 2012 23:25:20 +0000 (16:25 -0700)]
osd/OpRequest.h: uninit vars in ctor OpRequest

At (2): Non-static class member "hit_flag_points" is not initialized in this
constructor nor in any functions that it calls.  CID 717338: Uninitialized
scalar field (UNINIT_CTOR)At (4): Non-static class
member "latest_flag_point" 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/OSDMap.cc: uninit vars in ctor struct qi
Samuel Just [Wed, 29 Aug 2012 23:23:53 +0000 (16:23 -0700)]
osd/OSDMap.cc: uninit vars in ctor struct qi

CID 717337: Uninitialized scalar field (UNINIT_CTOR)At (6): Non-static class
member "weight" 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/OSD.h: big parameter passed by value, publish_superblock
Samuel Just [Wed, 29 Aug 2012 23:22:12 +0000 (16:22 -0700)]
osd/OSD.h: big parameter passed by value, publish_superblock

CID 717051: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter block of type OSDSuperblock (size 232 bytes) by value.

Signed-off-by: Samuel Just <sam.just@inktank.com>
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>