Commit Graph

38098 Commits

Author SHA1 Message Date
Sage Weil
e99da68840 mon: make 'ceph -s' show pg state counts in reverse descending order
Because these are in an unordered_map we print this is random order.
Instead sort descending by count.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-21 07:43:57 -08:00
Sage Weil
9c8827a5bd osd/ReplicatedPG: initialize new_backfill in ctor
*** CID 1260213:  Uninitialized scalar field  (UNINIT_CTOR)
/osd/ReplicatedPG.cc: 1242 in ReplicatedPG::ReplicatedPG(OSDService *,
std::tr1::shared_ptr<const OSDMap>, const PGPool &, spg_t)()
1236       snap_trimmer_machine(this)
1237     {
1238       missing_loc.set_backend_predicates(
1239         pgbackend->get_is_readable_predicate(),
1240         pgbackend->get_is_recoverable_predicate());
1241       snap_trimmer_machine.initiate();
>>>     CID 1260213:  Uninitialized scalar field  (UNINIT_CTOR)
>>>     Non-static class member "new_backfill" is not initialized in this
constructor nor in any functions that it calls.
1242     }
1243
1244     void ReplicatedPG::get_src_oloc(const object_t& oid, const
object_locator_t& oloc, object_locator_t& src_oloc)
1245     {
1246       src_oloc = oloc;
1247       if (oloc.key.empty())

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-21 07:27:22 -08:00
Sage Weil
30678f6daf librados: watch_flush() on shutdown
Users can easily forget this. It makes shutdown potentially block, but if
they have racing callbacks they get what they ask for.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 12:12:33 -08:00
Sage Weil
4ebd4b4280 librados: add rados_watch_flush() call
Add a call so that callers can make sure all queued callbacks have
completed before shutting down the ioctx.  This avoids a segv triggered
by the LibRadosWatchNotifyPPTests/LibRadosWatchNotifyPP.WatchNotify2Timeout/1
test due to the ioctx being destroyed when the in-progress callback
does a notify_ack.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 12:12:33 -08:00
Sage Weil
218de829b1 osd: scrub: wait for digest updates to apply before next scrub chunk
Wait for any digest updates to apply before we scrub the next chunk.  This
bounds the number of repops we initiate by the size of the scrub chunk, and
it generally nicer to the cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:06 -08:00
Sage Weil
1646d17026 osd: change omap data encoding in object_copy_data_t
Pass the omap data in the struct as an opaque (encoded) bufferlist.  This
avoids a decode into an STL map, simplifying the crc calculation.  The
win isn't huge (yet) because we still turn it into a map to pass it down
to the ObjectStore method, but that too will change in time.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:06 -08:00
Sage Weil
925f572793 test/osd/osd-copy-from: simple test of copy-from and error injection
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:05 -08:00
Sage Weil
6d80078a38 rados: use copy_from for rados cp (and cppool) command
A hammer CLI won't be able to run against a pre-firefly OSD, but I don't
think we care.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:05 -08:00
Sage Weil
5d2d839dd9 osd: add copyfrom error injection
Unfortunately it's nontrivial to inject this from the usual
ceph_test_rados_api_* tests which need to run despite thrashing.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:04 -08:00
Sage Weil
f8c1d40169 osd: pass and verify data+omap digest on copyfrom
Two things here:

 1- Pass the original digest from the source across the wire, if it is
    present.
 2- Calculate a new digest as we receive it, and record that.

If there is a mismatch, we currently crash; need to turn this into an
EIO, most likely.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:04 -08:00
Sage Weil
75b2bc2823 osd: EIO if a full-object read produces a bad digest
Add a tunable to control this.  Returning an EIO instead of garbled data
may not be the best approach in all environments.

Eventually we want to do something better here, like read from a replica
instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:04 -08:00
Sage Weil
55bf020b57 osd: scrub: set a min age before we update whole-object digest
If an object is being actively updated, the whole-object digest will
quickly be invalidated.  On deep scrub, only record that digest if the
object is a few hours old.  Otherwise, we are wasting an IO.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:03 -08:00
Sage Weil
28d4dd89c4 osd: scrub: record whole-object digest on scrub
If we do not have a whole-object digest, record one after a deep scrub.

Note that we make no particular attempt to avoid this on frequently
changing objects where the digest will quickly be invalidated.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:03 -08:00
Sage Weil
6feb4a1710 osd: scrub: complain about bad digest in final pass auth check
This will only trigger if we choose an auth that is known bad, but that
currently can happen, so compalin here too.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:02 -08:00
Sage Weil
85f677a4aa osd: scrub: be explicit about whether bad digest is known bad
The digest may just disagree with our best guess 'auth' shard, or it may
also disagree with the recorded oi digest.  Clarify which.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:02 -08:00
Sage Weil
14f3c26a1f osd: scrub: disqualify shards with digests that disagree with oi digest
The auth may or may not know that the digest is truly bad.  Note that we
can only relate scrub digests to those in oi if the scrub used a seed of
-1; older OSDs use 0.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:01 -08:00
Sage Weil
cf3b04764d osd: scrub: share auth oi with caller and be_compare_scrub_objects
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:01 -08:00
Sage Weil
74bd8708df osd: move scrub no good auth check out of helper
This helps call out that this is an exceptional case and simplifies the
helper a bit.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:00 -08:00
Sage Weil
9c3afccbf1 osd: remove more (most? all?) of classic scrub
Hopefully this is everything

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:00 -08:00
Sage Weil
7d73f41f0d osd: use -1 for deep scrub digest seed on new OSDs
0 is a weak initial value for a CRC since it doesn't change with a sequence
of 0 bytes (which are relatively common).  -1 is better.  Use -1 when
everyone in the acting set supports it.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:28:52 -08:00
Sage Weil
e68d77166c osd: drop vestigal invalid_snapcolls fields from scrub
This isn't used.  Snapcolls are ancient.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:17:39 -08:00
Sage Weil
591e7e1675 osd: clean up scrub method debug output
Use __func__ instead of (usually inaccurate) names.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:17:39 -08:00
Sage Weil
3f7b2cf52f osd/osd_types: add {data,omap}_digest to object_info_t
Also add flags to indicate whether the fields are valid.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:16:21 -08:00
Sage Weil
8a75800328 osd/ReplicatedPG: kill some dead scrub code
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:16:21 -08:00
Sage Weil
056de0924b osd/ReplicatedPG: set and invalidate data/omap digests on osd ops
When we create an empty object, we have a known digest of -1.  In a few
cases, we also know the digest from the op (e.g., writefull).  The rest
of the time we invalidate any existing digest.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:16:21 -08:00
Loic Dachary
154497c695 Merge pull request #3227 from nilamdyuti/wip-doc-ceph-deploy
Fixes a typo in ceph-deploy man page

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-20 09:40:08 +01:00
Nilamdyuti Goswami
9d5d491f31 doc: Adds updated ceph-deploy man page under man/
Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-20 13:50:06 +05:30
Nilamdyuti Goswami
8c38cc6bc5 doc: Fixes a typo in ceph-deploy man page.
Lack of a single space was restricting the proper rendering of an option in
html. Fixes the error.

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-20 13:47:55 +05:30
Warren Usui
46a1a4cb67 If trusty, use older version of qemu
Fixes #10319
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-12-19 18:57:06 -08:00
Dan Mick
0e6ec8ba32 Merge pull request #3225 from dachary/wip-10400-quota-info-t
mds: add default ctor for quota_info_t
2014-12-19 16:36:54 -08:00
Loic Dachary
7f1e510165 mds: add default ctor for quota_info_t
http://tracker.ceph.com/issues/10400 Fixes: #10400

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-20 01:08:33 +01:00
Gregory Farnum
243b9e4350 Merge pull request #3121 from ceph/wip-10277
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-12-19 14:45:44 -08:00
Sage Weil
18d6b20039 doc/release-notes: v0.90
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-19 14:21:09 -08:00
Sage Weil
6067462102 Merge remote-tracking branch 'gh/next' 2014-12-19 11:55:58 -08:00
Sage Weil
9b78dafd4a osdc/Objecter: do notify completion callback in fast-dispatch context
The notify completion has exactly one user, the librados caller which
does nothing but take a local (inner) lock and signal a Cond.  Do this
in the fast-dispatch context for simplicity.

Notably, this makes the notify completion (and timeout) trigger a
notify2() return (with ETIMEDOUT) even when the finisher queue that
normally delivers notify is busy.. for example with a notify that is
being very slow.  In our case, the unit test is doing a sleep(3) to
test timeouts but also prevented the ETIMEDOUT notification from
being delivered to the caller.  This patch resolves that.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-19 11:41:23 -08:00
John Spray
61126a2d71 Merge pull request #3199 from ceph/wip-qa-empty-xattr
qa: test zero size xattr

Reviewed-by: John Spray <john.spray@redhat.com>
2014-12-19 17:03:25 +00:00
Sage Weil
0a25bee539 Merge remote-tracking branch 'gh/wip-fs-quota'
Conflicts:
	src/client/Client.cc
2014-12-19 07:45:02 -08:00
Sage Weil
676ce2a58e Merge pull request #3218 from dachary/wip-10383-disable-unittest-msgr
tests: temporarily disable unittest_msgr
2014-12-19 07:42:48 -08:00
Loic Dachary
ecbdbb1629 tests: temporarily disable unittest_msgr
http://tracker.ceph.com/issues/10383 Refs: #10383

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 16:21:50 +01:00
Sage Weil
84ae9fd127 Merge pull request #2976 from ceph/wip-pgmeta
osd: move PG metadata to a per-PG object

Passed rados and upgrade tests.

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-19 07:19:05 -08:00
Sage Weil
531ed8a38c Merge pull request #3212 from ceph/wip-10255-wusui
Remove sepia dependency (use fqdn)

Backport: giant
Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-19 07:09:33 -08:00
Sage Weil
c2951131bd Merge pull request #3214 from xinxinsh/wip-cleanup
cleanup : remove sync_epoch

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-19 07:02:39 -08:00
Jenkins
08bd1e1eee 0.90 2014-12-19 06:56:22 -08:00
Wido den Hollander
49c2322160 doc: Instead of using admin socket, use 'ceph daemon' command. 2014-12-19 15:51:49 +01:00
Loic Dachary
11fa1dfbcb Merge pull request #3193 from nilamdyuti/wip-doc-ceph-disk
Changes format style in ceph-disk to improve readability as html

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 15:36:39 +01:00
Loic Dachary
71df64519d Merge pull request #3210 from ceph/wip-osdmap
osd: only verify OSDMap crc if it is known

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 15:07:56 +01:00
Loic Dachary
8c2c48d8d4 Merge pull request #3216 from cstavr/master
ceph-disk: Fix wrong string formatting

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 14:57:11 +01:00
Christos Stavrakakis
a302c44e9c ceph-disk: Fix wrong string formatting
Signed-off-by: Christos Stavrakakis <stavr.chris@gmail.com>
2014-12-19 13:46:44 +02:00
xinxin shu
2f63e54f0f cleanup : remove sync_epoch
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2014-12-19 09:19:26 +08:00
Warren Usui
19dafe1648 Remove sepia dependency (use fqdn)
Fixes: #10255
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-12-18 17:16:24 -08:00