Commit Graph

32317 Commits

Author SHA1 Message Date
Loic Dachary
de62572c61 erasure-code: remove dependency to the global context
Instead of relying on derr to display error messages, add them to an
ostream parameter given in argument to load() and factory(). The erasure
code convenience library no longer depends on the global context that is
indirectly referenced by debug.h

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:03 +01:00
Loic Dachary
bcc74879a1 common,erasure-code,mon: s/erasure-code-//
The parameters to erasure code do not need to be prefixed with the
erasure-code- string. There only are erasure-code parameters and the
prefix was originaly intended to desambiguate the erasure-code
properties, assuming that the properties map could be used for other
purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:03 +01:00
Loic Dachary
d4d6ff0706 mon,osd,erasure-code: update copyright notices
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:03 +01:00
Loic Dachary
29862f6f16 mon: tests for pool create erasure implicit ruleset creation
* Remove the tests checking that a missing or wrong crush_ruleset
  parameters triggered an error.
* Add a test checking that a ruleset with the same name as the pool is
  created implicitly when no crush_ruleset is specified.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
b7db487a64 mon: pool create erasure implicit ruleset creation
If the crush_ruleset parameter is missing, set it to the pool name.

If the crush_ruleset parameter is set to a name that does not match any
of the existing rulesets, create one using the pool creation parameters.

If the ruleset exists and is in the pending map or if the ruleset was
just created (meaning it exists in the pending map), the
prepare_pool_crush_ruleset method returns EAGAIN so that the pool
creation message is retried after the pending map is proposed.

If the ruleset exists, it is used to initialize the newly created pool,
as before.

http://tracker.ceph.com/issues/7571 fixes #7571

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
32e122bdf5 mon: add pool name to prepare_pool_crush_ruleset
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
cf25946181 mon: create-erasure uses crush_ruleset_create_erasure
Create the ruleset and branch depending on the result:

* If it succeeds, wait
* If it already exists and is pending (-EALREADY), wait
* If it already exists (-EEXIST), return immediately
* If it fails for other reasons, return immediately

Add an informative message when it succeeds.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
9850ab2797 mon: crush_ruleset_create_erasure s/_map//
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
3bc607ae5f mon: crush_ruleset_create_erasure indent
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
962248834b mon: crush_ruleset_create_erasure s/rule/err/
Avoid using rule instead of ruleset to help clarify the
terminology. Using err instead is also clearer in the context.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
370e000e6d mon: crush_ruleset_create_erasure set ruleset
Use get_rule_id() instead of rule_exists() to test the existence of a
ruleset and preserve the ruleset.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
8e07dbc083 mon: crush_ruleset_create_erasure error codes
Replace goto reply with error return and meaningfull error codes.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
402e646a09 mon: crush_ruleset_create_erasure reduce verbosity
Only add error message to the stream, not informative messages because
they depend on the caller context.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Loic Dachary
6a16eac7fe mon: create crush_ruleset_create_erasure helper
Move the code bloc verbatim, from "osd crush rule create-erasure" to the
new crush_ruleset_create_erasure() method helper. This step helps
separate the code changes from the code moving around unmodified.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-17 09:48:02 +01:00
Sage Weil
bf7f773b46 Merge pull request #1462 from ceph/wip-cache-last-epoch-clean
mon: fix caching for min_last_epoch_clean

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-16 12:57:58 -07:00
John Wilkins
5322ecb20b Merge branch 'master' of https://github.com/ceph/ceph 2014-03-14 15:53:10 -07:00
John Wilkins
ef1d7c9105 rados.py: Fixed docstring syntax warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-03-14 15:52:28 -07:00
John Wilkins
02b746d4b8 doc: Fixed release notes syntax warnings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-03-14 15:46:16 -07:00
John Wilkins
9cd67bb2af doc: Fixed hyperlink.
Fixes: #7558

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-03-14 15:45:51 -07:00
David Zafman
c6214f8655 Merge pull request #1463 from ceph/wip-7698
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-14 15:26:43 -07:00
David Zafman
599a8d7f7c test: Add ceph_filestore_dump.sh to test ceph_filestore_dump
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-03-14 15:19:45 -07:00
David Zafman
31a6679180 tools: Fix ceph_filestore_dump to fully operate on EC pools
Add spg_t and ghobject_t handling

Fixes: #7698

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-03-14 15:19:45 -07:00
David Zafman
f633a03e44 tools: Cleanups in ceph_filestore_dump
Fix usage output of ceph_filestore_dump
Add missing error checking
Output full object name
Improve message consistency
Fix program exit value

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-03-14 15:18:36 -07:00
Sage Weil
ab91b8089d mon/OSDMonitor: fix fall-thru case
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:23:01 -07:00
Sage Weil
0e0a9dbfde Merge remote-tracking branch 'gh/firefly' 2014-03-14 13:21:51 -07:00
Sage Weil
fc85075167 mon/PGMap: only recalculate min_last_epoch_clean if incremental touches old min
If the Incremental updates a value that used to equal the old min, we may
have raised it and need to recalculate it at the end.  Otherwise, we can
avoid recalculating at all!

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:20:53 -07:00
Sage Weil
208959a0dc mon/PGMap: cache min_last_epoch_clean
We call this a lot.  Only recalculate when we decode or when we apply
an incremental.

Adjust unit test accordingly.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:20:53 -07:00
Sage Weil
6f9db6c702 unittest_mon_pgmap: fix warnings
In file included from test/mon/PGMap.cc:15:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/mon/PGMap.cc:33:257: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:19:18 -07:00
Sage Weil
e941fefff8 unittest_ceph_argparse: fix warnings
In file included from test/ceph_argparse.cc:17:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’:
../src/gtest/include/gtest/gtest.h:1333:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’
test/ceph_argparse.cc:344:207: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:19:18 -07:00
Sage Weil
f2c6ff33b7 tools/: make filenames consistent
_ for source files, - for (shippable) build targets.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:15:22 -07:00
Sage Weil
f2ac06bfb9 Merge remote-tracking branch 'gh/wip-coverity-20140312'
Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 13:11:23 -07:00
Sage Weil
74ad3e30d5 Merge remote-tracking branch 'gh/wip-coverity-20140409'
Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 13:04:21 -07:00
Sage Weil
5873b0f03c Merge remote-tracking branch 'gh/wip-da-SCA-firefly-20140304'
Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 11:42:30 -07:00
Sage Weil
984f1c3df3 Merge pull request #1454 from ceph/wip-7709
osd/ReplicatedPG: release op locks on on commit+applied

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-14 11:36:02 -07:00
Sage Weil
bb75516773 Merge pull request #1459 from ceph/wip-7696
Wip 7696

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 11:28:50 -07:00
Sage Weil
da159f8ced doc/release-notes: note that radosgw's should be upgraded together
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 11:16:58 -07:00
Sage Weil
a2f3b309f4 Merge pull request #1461 from ceph/wip-7692
mon: on timecheck on monmap 0

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 11:05:49 -07:00
Sage Weil
a3719e0a05 Merge pull request #1460 from ceph/wip-warning
PGLog: remove unused variable

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 11:03:49 -07:00
Sage Weil
f1bd59f84b mon: only do timecheck with known monmap
If we are still on monmap epoch 0, our mon ranks cannot yet be trusted
since there is not yet a shared source of truth from paxos.  If we do
timechecks, the code gets confused about the ranks in e.g. the
timecheck_waiting map.

Fixes: #7692
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 11:02:30 -07:00
Sage Weil
fba88de130 ceph-mon: be a bit more verbose on error
Motivated by #7489

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 11:00:36 -07:00
Samuel Just
62af51cb78 PG::activate: handle peer contigious with primary, but not auth_log
The added case covers a situation where a replica is not contiguous with
the auth_log, but is contiguous with the primary.  Reshuffling the
active set to handle this would be tricky, so instead we just go ahead
and backfill it anyway.  This is probably preferrable in any case since
the replica in question would have to be significantly behind.

Fixes: #7696
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-14 10:57:47 -07:00
Sage Weil
6aa5d4f173 Merge pull request #1458 from ceph/wip-7489
ceph_mon: split postfork() in two and finish postfork just before daemonize

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 10:51:32 -07:00
Joao Eduardo Luis
70d87df706 ceph_mon: output error message if unable to bind.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 17:45:57 +00:00
Joao Eduardo Luis
5ad9c16642 ceph_mon: all output after initial fork go to dout/derr
We were doing it in some cases, and not doing in some other cases.  Just
do it throughout.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 17:44:06 +00:00
Joao Eduardo Luis
c95234ac6b ceph_mon: split postfork() in two and finish postfork just before daemonize
We split global_init_postfork() in two: start and finish, with the first
keeping much of postfork()'s tasks except closing stderr, which we leave
open until just before we daemonize.  This allows the user to see any
error messages that the monitor may spit out before it daemonizes, making
sense of the error code (which we were already returning).

Fixes: 7489

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 17:39:00 +00:00
Sage Weil
5676d6e5be Merge remote-tracking branch 'gh/firefly' 2014-03-14 08:30:04 -07:00
Sage Weil
ceac36b2ec doc/release-notes: 0.78 draft nodes; firefly draft notes
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 08:29:55 -07:00
Sage Weil
87c911cede osd/ReplicatedPG: release op locks on on commit+applied
We were releasing the op locks when we applied the update but (potentially)
before we committed it.  This means that another client can read object
state that is not yet durable.

Fixes: #7709
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 22:02:01 -07:00
Loic Dachary
4f43e53ced Merge pull request #1450 from ceph/wip-7641
debian: make ceph depend on ceph-common >= 0.67

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-03-14 02:14:27 +01:00
Sage Weil
c5b557ee88 qa/workunits: misc -> fs/misc
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 17:38:08 -07:00