Commit Graph

32088 Commits

Author SHA1 Message Date
Sage Weil
240446e778 test: merge unittest_crushwrapper and unittest_crush_wrapper
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 13:17:45 -08:00
Sage Weil
772968e60b mon/OSDMonitor: disallow crush buckets of type 0
Prevent creation of buckets of type 0 ('osd', 'device', etc.), as they
will confusing the mapping algorithm.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 13:15:58 -08:00
Samuel Just
8b3934fc0f PGBackend::rollback_stash: remove the correct shard
Fixes: #7616
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-05 12:53:08 -08:00
Samuel Just
1ddec86e64 FileStore::_collection_move_rename: propogate EEXIST
Previously, an EEXIST would get masked by the subsequent clone
operation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-05 12:52:49 -08:00
Sage Weil
ca12e0d92e qa/workunits/mon/crush_ops: use expect_false
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 12:52:08 -08:00
Sage Weil
561869d9c1 Merge pull request #1376 from ceph/wip-7608
test: Fix tiering test cases to use ---force-nonempty

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 12:35:56 -08:00
David Zafman
e016e83bce test: Fix tiering test cases to use ---force-nonempty
Fixes: #7608

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-03-05 12:31:29 -08:00
Sage Weil
0592368070 mon: warn when pool nears target max objects/bytes
The cache pools will throttle when they reach the target max size, so it
is important to make the administrator aware when they approach that point.
Unfortunately it is not particularly easy to efficiently keep track of
which PGs have hit their limit and use that for reporting.  However, it
is easy to raise a flag when we start to approach the target for the
entire pool, and that sort of early warning is arguably more useful
anyway.

Trigger the warning based on the target full ratio.  Not when we hit the
target, but when we are 2/3 between it and completely full.

Implements: #7442
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 11:59:07 -08:00
Sage Weil
8106adee4b Merge pull request #1375 from ceph/wip-pgmap-stat
mon/PGMap: return empty stats if pool is not in sum

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-05 11:07:03 -08:00
Sage Weil
f6edceefe2 mon/PGMap: return empty stats if pool is not in sum
Greg was right!

When a pool is created, the PGs are not added to the PGMap until the *next*
proposal.  Weaken the assert here and return empty stats for non-existent
(new) pools so that a pool create + tier add sequence does not crash.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 10:44:41 -08:00
John Spray
640ff98d31 test: Use non-default out/ dev/ paths in vstart
Currently, running "make check" nukes any existing vstart
setup in the tree.  This change makes it use test_dev/ and test_out/
so that it can peacefully coexist.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-03-05 17:20:51 +00:00
Sage Weil
4901347e89 Merge pull request #1373 from ceph/wip-crush-json
crush: revise JSON format for 'item' type

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 08:52:45 -08:00
John Spray
1685c6f75c crush: revise JSON format for 'item' type
Commit a7e9a7b648 changed the JSON format of CRUSH rules
such that the 'item' attribute on a step was sometimes
an integer and sometimes a string.

This commit separates the integer and string representations
so that tools which rely on a 'item' consistently being an
integer ID will work.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-03-05 16:28:00 +00:00
Loic Dachary
60a329f8b0 Merge pull request #1338 from dachary/wip-mailmap
mailmap updates

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2014-03-05 08:55:41 +01:00
Loic Dachary
d4950a1d49 mailmap: Danny Al-Gaaf affiliation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-05 08:47:37 +01:00
Loic Dachary
0eac1ba0b9 mailmap: Bjørnar Ness affiliation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-05 08:47:36 +01:00
Loic Dachary
fdb644a2b9 mailmap: Ron Allred affiliation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-05 08:47:36 +01:00
Loic Dachary
a85d0ef698 mailmap: Steve Stock affiliation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-05 08:47:36 +01:00
Loic Dachary
076bec8528 mailmap: Christopher O'Connell affiliation
Reviewed-by: Christopher O'Connell <jwriteclub@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-05 08:47:07 +01:00
Samuel Just
4cb1cbfbf3 ReplicatedPG::fill_in_copy_get: fix omap loop conditions
cursor.omap_offet indicates the most recently recovered key, we continue
filling in at the smallest key k | k > cursor.omap_offset.  If the loop
as written terminates due to !(left > 0), iter points at the next key to
copy, rather than the last key copied, resulting in the next copy
operation skipping that key.

Now, iter, if valid, must point to the last key copied once the loop has
completed since we check left <= 0 prior to advancing iter.  We can
therefore use it to fill in cursor.omap_offset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 19:29:21 -08:00
Samuel Just
11393ab7e5 ReplicatedPG::fill_in_copy_get: remove extraneous if statement
This should leave the behavior unchanged.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 19:29:20 -08:00
Samuel Just
8fdfece9fd ReplicatedPG::fill_in_copy_get: fix early return bug
This is not a leak: we are in an else block where cb must
be NULL.  The fix as introduced did not include braces on
the if causing the method to return unconditionally.

Fixes: #7604
Introduced in: 500206d809
Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 19:23:00 -08:00
Samuel Just
4bf28df229 Merge remote-tracking branch 'upstream/wip-7447' into firefly
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-04 19:22:08 -08:00
huang jun
364fed816a packaging: use wildcard for test files in Debian
we can also use test_* instead of listing all test_xx  files while
building debian package

Reviewed-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-03-04 19:55:42 -07:00
Josh Durgin
225eb4a7be Merge pull request #1370 from ceph/wip-7293
Make symlink  of librbd to qemu's folder so it can detect it.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-03-04 18:02:28 -08:00
Sandon Van Ness
65f3354903 Make symlink of librbd to qemu's folder so it can detect it.
Per issue #7293.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-03-04 16:15:15 -08:00
Samuel Just
d0b1094ff7 ECBackend,ReplicatedPG: delete temp if we didn't get the transaction
We always send the transaction for operations on temp objects,
but if we didn't get the final transacition on the actual object,
we might end up failing to remove the temp object.  Thus, if
we get a sub op and don't have the transaction, just remove the
named temp objects.

Fixes: #7447
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 15:29:20 -08:00
Samuel Just
f2a4eec1d6 PGBackend/ECBackend: handle temp objects correctly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 15:29:20 -08:00
Samuel Just
308ea1bd9e ECMsgTypes: fix constructor temp_added/temp_removed ordering to match users
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 15:29:20 -08:00
Samuel Just
3e219961a0 ReplicatedPG::finish_ctx: use correct snapdir prior version in events
Fixes: #7595
Reviewed-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-04 15:00:20 -08:00
Wido den Hollander
a7057e1069 doc: Improve CloudStack RBD documentation 2014-03-04 22:24:36 +01:00
Loic Dachary
4938212b69 Merge pull request #1360 from enovance/wip-brag
Fixes for ceph-brag

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-03-04 12:41:54 +01:00
Babu Shanmugam
46b9f65506 Merge remote-tracking branch 'brag/master' into firefly
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
2014-03-04 14:16:49 +05:30
Loic Dachary
6d323c0481 mailmap: Mike Lundy affiliation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-04 08:01:56 +01:00
Sage Weil
d223d3a7d2 Merge pull request #1352 from dachary/wip-7578
common: -- support for env_to_vec

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-03 21:43:39 -08:00
Sage Weil
bcea57d61f Merge pull request #1342 from ceph/wip-cache-add
mon: add 'osd tier add-cache ...' command (DNM until after wip-tier-add)

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-03-03 21:37:56 -08:00
Sage Weil
397e844397 Merge pull request #1335 from ceph/wip-tier-add
mon: prevent non-empty pools from being added as tiers

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-03 21:36:22 -08:00
Gregory Farnum
48e55d9881 Merge pull request #1358 from ceph/wip-2288
mds: check projected xattr when handling setxattr

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-03 21:19:40 -08:00
Sage Weil
49e54aba33 mon/OSDMonitor: fix race in 'osd tier remove ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Sage Weil
241b9e81f1 mon/OSDMonitor: fix some whitespace
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Sage Weil
c029c2fbf1 mon/OSDMonitor: add 'osd tier add-cache <pool> <size>' command
This is a friendlier interface for setting up a cache tier with some
reasonable defaults (defined via config options).  This will simplify
the user experience and documentation.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Sage Weil
62e0eb7f2e mon/OSDMonitor: handle 'osd tier add ...' race/corner case
If you have two racing requests to add two different pools as a tier, the
committed checks will pass but they proposals will conflict.  Recheck the
pending pools for the same conditions and wait for a commit if they
occur.

Reported-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Sage Weil
0e5fd0e322 osd: make default bloom hit set fpp configurable
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Sage Weil
eddf7b68ff osd/ReplicatedPG: fix agent division by zero
If the pool is empty we cannot divide by the object count.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Gregory Farnum
1684f1dba4 Merge pull request #1353 from ceph/wip-messenger-shutdown
msg: Make SimpleMessenger shutdown safer

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-03 21:15:02 -08:00
Sage Weil
08efb45889 OSDMonitor: do not add non-empty tier pool unless forced
In general, users should not use non-empty pools as new tiers or else
things can behave strangely:

 - the data sets are unrelated behavior will be... strange.
 - if the cache pool is not "new" and does not do the OMAP flag, the OSD
   will not know not to flush omap objects to an EC base tier
 - probably other random stuff I'm forgetting

Allow a user to shoot themselves in the foot with --force-nonempty.

Implements: #7457
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:11:17 -08:00
Yan, Zheng
12909bb607 mds: check projected xattr when handling setxattr
Fixes: #2288
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-04 10:55:23 +08:00
Samuel Just
198b0aa268 Merge pull request #1354 from ceph/wip-7563
Wip 7563

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-03 17:05:53 -08:00
Samuel Just
192a27cac6 Merge pull request #1355 from ceph/wip-osd-verbosity
osd: be a bit more verbose on startup

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-03 16:38:54 -08:00
Samuel Just
20fe162ece TestPGLog: tests for proc_replica_log/merge_log equivalence
We need the merge_log and proc_replica_log paths to result in the
same missing set.  This patch adds some machinery for specifying
a log merge scenario and comparing both paths to the same correct
result.  This machinery also makes it a bit easier to read and add
new tests.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-03 16:05:17 -08:00