Commit Graph

30857 Commits

Author SHA1 Message Date
John Wilkins
3194d66d23 doc: Fixed keyring command and updated for current conventions.
fixes: #6692

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-01-16 11:36:39 -08:00
Sage Weil
d4160fdec3 Merge pull request #1094 from ceph/wip-7117-redhat
packaging: ship libdir/ceph

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-16 08:23:23 -08:00
Loic Dachary
d27731fece Merge pull request #1095 from ceph/wip-7166
osd: OSDMap: build reverse name->pool map upon decoding

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-01-16 05:21:34 -08:00
Joao Eduardo Luis
1aa2601818 osd: OSDMap: build reverse name->pool map upon decoding
Commit 3d7c69fb09 introduced a new OSDMap encoding/decoding scheme.
However, while the classic decoding function still kept building the
reverse name->pool map, the new decoding function did not, causing the
monitor to be unable to map pool names to pool ids.

This patch fixes this, by factoring out the loop responsible for
populating the 'name_pool' map, as well as calling 'calc_num_osds()', to
OSDMap::post_decode() and having this function called from both the
classic and the new decode functions.

Fixes: 7166

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2014-01-16 12:51:32 +00:00
Sage Weil
3b696f28d6 Merge pull request #1086 from ceph/wip-temp-primary
Add a "primary temp" to go with "pg temp"

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-15 19:04:48 -08:00
Ken Dreyer
2d0d48b829 packaging: ship libdir/ceph
Automake puts ceph_common.sh into libdir/ceph, but the Red Hat packaging
was not capturing this file.

Add the libdir/ceph location to the RPM packaging.

Fixes #7117
2014-01-15 20:02:48 -07:00
Sage Weil
8b09a43657 doc/release-notes: v0.76 draft notes
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-15 19:02:23 -08:00
Sage Weil
2b36761b81 mon: favor 'mds set max_mds' over 'mds set_max_mds'
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-15 19:02:23 -08:00
Sage Weil
f3021efe43 Merge pull request #1093 from kdreyer-inktank/redhat-missing-tests
packaging: add missing test files

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-15 19:01:08 -08:00
Ken Dreyer
e60dcfa80d packaging: add missing test files
Two tests were inadvertantly missing from the RPM packaging:

ceph_test_c_headers was added to ceph in
ffdd30efc8

ceph_test_get_blkdev_size was added to ceph in
324dd54534

Add both of these to the packaging.

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-01-15 19:40:40 -07:00
Greg Farnum
e7b323675b OSDMonitor: make sure we don't send out maps with a primary_temp mapping
Making sure a cluster supports primary_temp is complicated and we don't
have any of the machinery in place right now (nor a need to actually support
it). We don't have any mechanisms for setting it to begin with, so assert
that we never create anything with any such mapping in update_from_paxos()
to catch any errors.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:07 -08:00
Greg Farnum
28e0b76191 test: add an OSDMap unittest
This is not super-sophisticated, but it does basic mapping function
consistency checks and looks at the [pg|primary]_temp manipulations. If
we want to in the future, we can do these programmatically across a range
of pgids instead of just checking hash 0.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:07 -08:00
Greg Farnum
b18311577a OSDMap: move temp manipulation functions out of OSDMonitor
In doing so, consolidate remove_down_pg_temp() and remove_down_primary_temp().

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:07 -08:00
Greg Farnum
fafc8e93dd OSDMap: pay attention to the temp_primary in _get_temp_osds
Switch _get_temp_osds to use pointers instead of references, and force callers
to check the out params instead of relying on a return code for if anything
was set (trying to use the return code when there are two possible outputs
does not provide useable semantics). For the new temp_primary out param, fill it
in from temp_primary if set, or from the pg_temp list if it's set, or leave
it blank if neither are.

Also, don't use pointers to heap elements. Just put the ints and vectors on
the stack, and assign/swap the out parameters with them. This is less
confusing and should be a bit faster in general.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:07 -08:00
Greg Farnum
12122b11c7 OSDMap: add primary out params to _pg_to_osds and _raw_to_up_osds
Switch to use pointers for the out parameters instead of references.

These functions are still just pointing at the front of the generated
lists for the "primary" params, but now that all their callers respect
these outputs we can add programmatic leader assignment with just these
two functions.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:07 -08:00
Greg Farnum
0c3050932b OSDMap: add primary out params to internal _pg_to_up_acting_osds function
And use pointers instead of references for out params.

Now pg_to_up_acting_osds and pg_to_acting_osds can plug in to this slightly
more real implementation, instead of making up their own. (We are still
just using the first member anyway, but we're about to plug it into
the bottom layer of functions.)

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:07 -08:00
Greg Farnum
1c750c65f5 OSDMonitor: implement remove_down_primary_temp()
Same as remove_down_pg_temp()

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
412afea976 OSDMonitor: make remove_redundant_pg_temp clear primary, too
So that this works with future CRUSH changes, we copy the map and clear
out the primary_temp, then compare its output with the real map's output. If
they match, remove the primary_temp from the real map.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
e2db4aea87 OSDMonitor: remove primary_temp entries when you remove their pool
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
a246039553 OSDMap: expose the primary_temp in print()
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
1f81fda58c OSDMap: dedup the primary_temp
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
e9e615cb12 OSDMap: add primary_temp to apply_incremental()
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
74bdcb69e3 OSDMap: add [new_]primary_temp to the map and Incremental
It's not used actively yet, but there it is.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
b55c45e85d OSDMap: update Incremental encode/decode to match the full map's
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
3d7c69fb09 OSDMap: add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding
Bring our OSDMap encoding into the modern Ceph world! :) This is
fairly straightforward, but has a few rough edges:
Previously we had a "struct_v" which went at the beginning of the
OSDMap encoding, and then later on an ev "extended version" which
was used to store the more-frequently-changed OSDMap pieces. There
was no size information stored explicitly to let clients skip this,
but osd maps were always encoded into their own bufferlist before
being sent to clients, which had the same effect.
We now use the modern ENCODE_START three times:
1) for the overall OSDMap encoding,
2) for the client-usable portion of the map,
3) for the "extended" portion of the map

This will let us independently rev everything, which may come in
useful if we want to (for instance) add a "monitor" portion to the
map that the OSDs don't care about. It also makes adding new
client information a lot easier since older clients will still
be able to decode the map as a whole.

We may want to merge this OSDMAP_ENC feature with one of the others
we are creating during this cycle, since they're all very closely
related. That will also let us protect more naturally against old
clients getting a map they need to understand but can't (because
we only need the new map features-to-come when used with erasure-encoded
PGs, etc).

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
2646d5edb1 OSDMap: add primary out param to pg_to_raw_up, and use pointers instead of refs
The only user is in the OSDMonitor, and it's going to want that
information anyway.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:06 -08:00
Greg Farnum
045e1d75a7 OSDMap: add primary-specifying pg_to_acting_osds
This works the same as pg_to_up_acting_osds

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
93d481a5d2 mon, osdmaptool: switch to primary-specifying pg_to_up_acting_osds
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
9749f30cdf OSDMap: implement pg_to_up_acting_osds with primary interface
Use our pointer calling conventions instead of a reference for the
new version of the function.

Right now we're just setting the primaries equal to the first member
of up and acting (or -1 if none), but very shortly we'll modify our
private OSDMap functions to export them based on the contents of temp_primary.
While in general anybody querying for the mapping information will
need to pay attention to whom the primary is as well, we have lots
of callers who will need real code changes to do so. To serve them,
we keep a version that does not export the primary, but asserts
that the primary matches the first entry in its list.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
5b699782d1 OSDMap: switch pg_to_osds to have an explicit primary param
Use pointers instead of references for the out params, too!

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
5367d92e0b OSDMap: rename _raw_to_temp_osds() -> _get_temp_osds()
This function does not (and never has!) used the raw vector, so remove it
and don't use a name which implies it is doing any sort of conversion.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
69a2ec27f0 OSDMap: unify the pg_to_acting_osds and pg_to_up_acting_osds implementations
These were the same except for a call to _raw_to_up_osds(). Move the
existing pg_to_up_acting_osds into a private function taking a pointer,
only fill in the up vector if it's a non-NULL pointer, and call it via
the obvious header implementations.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
c1a95f83ac OSDMap: remove get_pg_primary() function
This was used only by SyntheticClient, and that wants get_pg_acting_primary()
anyway. Delete the easily-misused get_pg_primary() and switch.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
7a9c1712f4 OSDMap: doc the different pg->OSD mapping functions
Some of these look like what you should use for mapping and they absolutely
are not suitable for that. Make it clearer.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
268ae82ac3 osd: do not misuse calc_pg_role
We've been using the role returned from this to determine if we're
the primary or not. Don't.
This is mostly about removing a few asserts; while in there I also
redirected some calls to use static dereference instead of going through
the osdmap lookup path.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:05 -08:00
Greg Farnum
a09d4f171e PG: do not use role == 0 as a determinant of primacy
We already have an is_primary() function to use instead.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-15 16:33:04 -08:00
Josh Durgin
c60ae09b38 Merge pull request #978 from ceph/wip-3454
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-01-15 15:28:31 -08:00
Yehuda Sadeh
644afd67b9 radosgw-admin: add temp url params to usage
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-01-15 15:12:40 -08:00
athanatos
980ef0e8b3 Merge pull request #1089 from dachary/wip-mailmap
mailmap: add athanatos <sam.just@inktank.com>

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-01-15 10:25:28 -08:00
athanatos
73e469c966 Merge pull request #963 from dachary/wip-erasure-code-api
erasure code interface helpers

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-01-15 10:22:47 -08:00
John Wilkins
970f9387bd doc: Updated paths for OSDs using the OS disk.
fixes: #6682

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-01-15 10:08:28 -08:00
Loic Dachary
1ffe4226c2 mailmap: add athanatos <sam.just@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-15 09:23:09 +01:00
Sage Weil
4050eae32c Merge pull request #1084 from dachary/wip-cephtool-test
qa: cleanup cephtool/test.sh tmp files

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-14 21:57:48 -08:00
Gregory Farnum
f19adc919d Merge pull request #1085 from dachary/ceph-master
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-01-14 15:12:34 -08:00
Loic Dachary
4b5f2570e9 common: fix bufferlist::append(istream) test
bufferlist::append(istream) now filters out empty lines; reflect this in
the test

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-15 00:08:41 +01:00
Sage Weil
e55a08964f doc/release-notes: v0.75
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-14 09:37:52 -08:00
Loic Dachary
08c17b7c5c qa: cleanup cephtool/test.sh tmp files
When run in a shared environment ( as opposed as a machine created for
the purpose of running this test only ), it is important to cleanup
leftovers to avoid poluting the /tmp space. Create a common temporary
directory for all tmp files.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-14 17:31:04 +01:00
Ken Dreyer
03d7d97d5d Merge branch 'next' 2014-01-14 16:16:41 +00:00
Loic Dachary
a520026eb4 Merge pull request #1076 from dachary/wip-vector-op
erasure-code: use uintptr_t instead of long long

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
2014-01-14 08:10:59 -08:00
Loic Dachary
dc4e212d6a Merge pull request #1078 from ceph/wip-mon-pgmap
mon: make 'pg getmap' not include a trailing newline

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-01-13 22:38:09 -08:00