Commit Graph

21044 Commits

Author SHA1 Message Date
Samuel Just
0aad5462eb ReplicatedPG: fill in user log entry last after snapdir tran
The user log entry contains the request id, which will be used
by replay ops to put themselves in the correct place in the
waiting_for_commit/ack maps.  Thus, the repop needs to be tagged
with the same version as the log entry with the request id.
Thus, the request id bearing log entry should be the last in
the log entry vector.

This should fix #3072, wherein a replay which should wait on
the repop tagged as version '36 will instead wait on '35.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-09-04 13:47:03 -07:00
Samuel Just
1db67c443d PG: In Active, don't transition to WantActingChange
want_acting is filled in during recovery completion in
order to move the newly backfilled osd into its correct
place.  In this case, however, want_acting must contain
only members of acting and up.  Thus, we can be sure that
if any of them go down, we would restart peering anyway.
Thus, we need not transition to WaitActingChange, which
does not reflect that we continue to serve client operations
in the interim.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-09-04 12:17:42 -07:00
Sage Weil
46b86426e8 Merge branch 'wip-msgr'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-09-04 12:17:13 -07:00
Sage Weil
035cf96501 msg/Pipe: kill useless onconnect arg
This reduces debug output but nothing else, for know discernable reason.
Drop it.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-04 11:54:44 -07:00
John Wilkins
b6ef17a1f3 Merge branch 'master' of github.com:ceph/ceph 2012-09-04 11:40:51 -07:00
John Wilkins
31b1c2f84a doc: Added PG states.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:40:25 -07:00
John Wilkins
ef6814d96e doc: Promoting PG concepts into mainline docs. Redundant version still in Internals.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:39:16 -07:00
John Wilkins
25b759390a doc: New section on placement groups.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:38:27 -07:00
John Wilkins
3fcdbe42c7 doc: Moved from configuration to operations. Updated with new info.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:37:52 -07:00
John Wilkins
9da49667b8 doc: Created a more robust doc for monitoring a cluster.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:37:13 -07:00
John Wilkins
743e0b8d2b doc: Consolidated start and stop.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:36:33 -07:00
John Wilkins
3e562001fd doc: Added a new "Data Placement" overview section for added continuity.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:35:33 -07:00
John Wilkins
2a1ac68089 doc: Added a new CRUSH map section. Will need to incorporate new tunables info.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:34:58 -07:00
John Wilkins
fc093f8b09 doc: Moving new auth section from configuration to operations.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-04 11:33:37 -07:00
Sage Weil
e09b26555c objecter: fix osdmap wait
When we get a pool_op_reply, we find out which osdmap we need to wait for.
The wait_for_new_map() code was feeding that epoch into
maybe_request_map(), which was feeding it to the monitor with the subscribe
request.  However, that epoch is the *start* epoch, not what we want.  Fix
this code to always subscribe to what we have (+1), and ensure we keep
asking for more until we catch up to what we know we should eventually
get.

Bug: #3075
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-04 11:29:21 -07:00
Tommi Virtanen
c1e000b999 doc: Fix leftover "localhost" mention.
Commit dd011aba90 changed
the conf file sample to say {hostname}, but changed the
prose only from ``localhost`` to ``{localhost}``.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-09-04 08:20:57 -07:00
John Wilkins
3302a2d498 doc: Added debug ref to toctree. Trimmed title names a bit.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-03 14:06:44 -07:00
John Wilkins
4609639ba1 doc: Added "how to" for debug/logging config. Trimmed titles too.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-03 14:05:51 -07:00
John Wilkins
7465dbeb82 doc: Added logging reference under configuration section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-03 14:04:11 -07:00
Sage Weil
4ab9f02f2a msg/Pipe: do not special-case failure during connect
Do not special case failure during connect.  In particular, we may be
reconnecting and experience a second fault, and wipe out our session
(e.g., between the fs client and the mds) and destroy important session
state.

This logic dates back to the original patch in '08 when the standby
state was introduced.

Bug: #3070
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-03 14:00:27 -07:00
John Wilkins
7b6c77388e doc: Added runtime configuration example.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-03 13:35:49 -07:00
Eleanor Cawthon
73d016fdb3 test, key_value_store: added distributed flat btree key-value store
Uses one index object and many sub objects to store key-value pairs. The pairs
are stored in the omaps of librados objects. The index contains keys
corresponding to the highest key in an object, and values that contain the
name of the object where the key range is stored. The tree guarantees that
the number of pairs in an object will be > k and < 2k for a user-specified k.
KvStoreBench contains benchmarking tests.

Signed-off-by: Eleanor Cawthon <eleanor.cawthon@inktank.com>
2012-09-02 14:46:12 -06:00
Sage Weil
bfa9a59f0e 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>
2012-09-01 14:51:04 -07:00
Sage Weil
cbb8b96aee Merge remote-tracking branch 'gh/wip-coverity' 2012-09-01 14:50:34 -07:00
Sage Weil
a386d8a9da Merge branch 'wip-osd-flags'
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-31 17:06:16 -07:00
Sage Weil
8ac81779ed 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>
2012-08-31 16:31:01 -07:00
Dan Mick
e920a61521 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>
2012-08-31 15:47:12 -07:00
Dan Mick
fb379174bf 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
2012-08-31 15:45:24 -07:00
Sage Weil
49375a0e7c osd: pause/unpause recovery based on NORECOVER osdmap flag
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 15:12:38 -07:00
Sage Weil
07ad925130 osdmap: add NORECOVER flag
This will stop recovery via log catch-up and via backfill both.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 15:12:38 -07:00
Sage Weil
0a28d795bc osdmap: add NOBACKFILL flag
This will tell the OSDs to please not initiate any backfill operations.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-31 15:12:38 -07:00
Samuel Just
b273c376ca 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>
2012-08-31 14:43:48 -07:00
caleb miles
5ac52de003 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>
2012-08-31 13:20:30 -07:00
Samuel Just
fd4d567bf9 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>
2012-08-31 13:11:36 -07:00
Samuel Just
84216d595e 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>
2012-08-31 13:11:36 -07:00
Samuel Just
75acb7bd6c 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>
2012-08-31 13:11:36 -07:00
Samuel Just
0e2efbc8d9 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>
2012-08-31 13:11:36 -07:00
Samuel Just
f30facab99 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>
2012-08-31 13:11:36 -07:00
Samuel Just
6fbf9e6fd2 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>
2012-08-31 13:11:36 -07:00
Samuel Just
471787f1ea 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>
2012-08-31 13:11:36 -07:00
Samuel Just
f84e776442 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>
2012-08-31 13:11:36 -07:00
Samuel Just
106367356e 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>
2012-08-31 13:11:36 -07:00
Samuel Just
9a93eb3295 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>
2012-08-31 13:11:36 -07:00
Samuel Just
d41c253bea 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>
2012-08-31 13:11:36 -07:00
Samuel Just
d2356261a2 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>
2012-08-31 13:11:36 -07:00
Samuel Just
db9e1209c9 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>
2012-08-31 13:11:36 -07:00
Samuel Just
b041260799 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>
2012-08-31 13:11:35 -07:00
Samuel Just
e0b8cb7c15 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>
2012-08-31 13:11:35 -07:00
Sage Weil
50ed1fcad5 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>
2012-08-31 13:11:35 -07:00
Sage Weil
0b4ddc2727 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>
2012-08-31 13:11:35 -07:00