Commit Graph

31997 Commits

Author SHA1 Message Date
Joao Eduardo Luis
c13e1b7929 mon: OSDMonitor: don't remove unamanaged snaps from not-unmanaged pools
Although we should allow creating unmanaged snaps on not-unamanaged pools,
as long as those pools don't have any managed snapshots in them, we cannot
allow removal -- because the pool will not have any unmanaged snapshots.

Fixes: 7210

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-07 19:49:50 +00:00
Sage Weil
8221a8ecba Merge pull request #1394 from ceph/wip-7610
obj_bencher: allocate contentsChars to object_size, not op_size

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 21:11:25 -08:00
Sage Weil
23db6782bb Merge pull request #1397 from ceph/wip-7638
ReplicatedPG::trim_object: use old_snaps for rollback

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 20:06:59 -08:00
Sage Weil
4a0c3a6673 Merge pull request #1398 from ceph/wip-7634
ReplicatedPG: use hobject_t for snapset_contexts map

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 20:05:19 -08:00
Samuel Just
0037ee4550 Merge pull request #1395 from ceph/wip-7637
osd: fix agent thread shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-06 19:19:12 -08:00
Sage Weil
09668a4958 osd: fix agent thread shutdown
We had an old invariant that agent_queue would have at least 1 entry in
it to simplify some other code paths, but it turns out that it is simpler
not to do that.

In particular, this was triggering a failed assertion on shutdown when we
assert that the queue is empty.

Dump offending items on shutdown if they are there, tho, to catch any
future bugs.

Fixes: #7637
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-06 16:12:30 -08:00
Samuel Just
06b96ffdc8 Merge pull request #1389 from ceph/wip-firefly-misc
fix rest tests; fix COLL_MOVE_RENAME dump

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-06 15:51:40 -08:00
Sage Weil
d4b4468c88 Merge pull request #1393 from dachary/wip-7072
logrotate: copy/paste daemon list from ceph-*-all-starter.conf

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 15:51:15 -08:00
Loic Dachary
7411c3c6a4 logrotate: copy/paste daemon list from *-all-starter.conf
Each upstart/*-all-starter.conf use the same script to find the list of
daemons and their ids. Copy it over to the corresponding logrotate.conf
script instead of using a less reliable script based on initctl list
output.

If logrotate fails to run initctl reload on a daemon, it will keep
writing to the rotated log file, even after it is deleted and until it
fills the disk. By using the exact same shell snippet as the upstart
scripts used to start the daemon, all of them will be sent the HUP
signal and reopen the log file that was just rotated.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-07 00:47:58 +01:00
Sage Weil
6f7c8c79f5 Merge pull request #1392 from ceph/wip-7632
ReplicatedPG: consistently use ctx->at_version.version for stashed objec...

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 15:34:59 -08:00
Sage Weil
57c7e19819 Merge pull request #1391 from ceph/wip-7393
ReplicatedPG: clean up num_dirty adjustments

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 15:30:59 -08:00
Samuel Just
b6872b255c ReplicatedPG::trim_object: use old_snaps for rollback
We need to rollback the old value of snaps, not the
new one.

Fixes: #7638
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-06 15:01:04 -08:00
Samuel Just
b5b67d19aa ReplicatedPG: use hobject_t for snapset_contexts map
Otherwise, two objects with different namespaces but
the same object_t will end up clobbering each other's
contexts.

Fixes: #7634
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-06 14:40:12 -08:00
Sage Weil
b436930779 qa/workunits/rest/test.py: do not test 'osd thrash'
This wreaks havoc on our QA because it marks osds up and down and then
immediately after that we try to scrub and some osds are still down.

Adjust the CLI test to wait for all OSDs to come back up after thrashing.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-06 13:46:10 -08:00
Sage Weil
237f0fb455 os/ObjectStore: dump COLL_MOVE_RENAME
This got missed way back in ef7cffc34f
(pre-0.71).

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-06 13:44:39 -08:00
Samuel Just
f888ab41bd ReplicatedPG: consistently use ctx->at_version.version for stashed object
Otherwise, two ops might end up using the same version number.

Fixes: #7632
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-06 12:11:31 -08:00
Samuel Just
eca7e633c8 ReplicatedPG: clean up num_dirty adjustments
Previously, a _delete_head() followed by a recreation on an object in
the same transaction would result in num_dirty being decremented in
_delete_head() without the flag being cleared.  make_writeable() would
then see exists and was_dirty and therefore not increment num_dirty
resulting in a mismatch.  Rather than trying to maintain the num_dirty
number in _delete_head(), rollback_to(), and make_writeable(), it seems
simpler to do the adjustment once in make_writeable based on undirty,
ctx->obc->obs.oi, and ctx->new_obs->oi.

Fixes: 7393
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-06 12:05:10 -08:00
Samuel Just
d171418058 obj_bencher: allocate contentsChars to object_size, not op_size
Otherwise, our attempt to sanitize object_size bytes of
data.object_contents will be doomed to memory corruption.

Fixes: #7610
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-06 11:12:25 -08:00
Sage Weil
7403b23544 Merge pull request #1386 from ceph/wip-7624
ReplicatedPG: ensure clones are readable after find_object_context

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 11:01:30 -08:00
Sage Weil
cf2f3adfa6 Merge pull request #1387 from ceph/wip-7618
ReplicatedPG::wait_for_degraded_object: only recover if found

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-06 10:59:47 -08:00
Gregory Farnum
aa7945abc8 Merge pull request #1379 from ceph/wip-7562
mon: make quorum list (by name) be in quorum order

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-06 10:44:42 -08:00
Samuel Just
bafd76ada3 ReplicatedPG: ensure clones are readable after find_object_context
We only get EAGAIN if the object is missing.  We also need the
clone to be readable if we are reading it.

The other find_object_context callers already require !degraded.

Fixes: #7624
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-06 08:48:32 -08:00
Gregory Farnum
9d387d38de Merge pull request #1378 from ceph/wip-7487
mon: no crush buckets with type 0 (#7487)

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-05 20:58:40 -08:00
João Eduardo Luís
697bf8fdb3 Merge pull request #1380 from ceph/wip-pool-delete
mon/OSDMonitor: fix pool deletion races

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-06 01:38:33 +00:00
Sage Weil
2adc534a72 mon/OSDMonitor: fix pool deletion checks, races
Unify the pool deletion safety checks into a single set of functions.
Make sure we check the committed state and error out if there is a problem.
Also check the pending state, if any, and delay+retry if there is a
problem there.

This ensures that we correctly verify that a pool is not in use when it
is deleted (by another tier or by cephfs).  These checks are also now
applied to librados calls.

Fixes: #7590
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 15:58:52 -08:00
Samuel Just
d9e8806308 ReplicatedPG::wait_for_degraded_object: only recover if found
Fixes: #7618
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-05 15:51:53 -08:00
Samuel Just
b563a7c7d6 Merge pull request #1381 from ceph/wip-7618
ReplicatedPG::recover_replicas: do not assume that missing objects are u...

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 15:31:57 -08:00
Samuel Just
16e3d4d36f Merge pull request #1382 from ceph/wip-7616
Wip 7616

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 15:18:19 -08:00
Samuel Just
a222e7a12b ReplicatedPG::recover_replicas: do not assume that missing objects are unfound
Fixes: #7618
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-05 15:14:15 -08:00
David Zafman
3f59f02913 Revert "c_read_operations.cc: fix resource leak"
This reverts commit 3cd751b0a2.

A rados_release_read_op() has already been performed, but coverity
didn't recognize that as releasing memory.

Fixes: #7621

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-05 15:13:55 -08:00
Sage Weil
a71ddb0b7d mon: make quorum list (by name) be in quorum order
Fixes: #7562
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 14:29:02 -08:00
Gregory Farnum
b642e3884c Merge pull request #1343 from ceph/wip-cache-warn-full
mon: warn when cache tier is full

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-05 14:22:34 -08:00
Sage Weil
10f660723e Merge pull request #1372 from ceph/wip-7607
wip 7607

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 14:21:45 -08:00
Sage Weil
b093958a11 Merge pull request #1351 from ceph/wip-7248
osd: OSD: limit the value of 'size' and 'count' on 'osd bench'

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 14:18:28 -08:00
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
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
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