Commit Graph

44 Commits

Author SHA1 Message Date
David Zafman
1a7fa9a62a test: Add test cases for multiple copy pool and snapshot errors
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-28 16:42:19 -07:00
David Zafman
2fa596dc0c test: Prepare for second test and minor improvements
Check list-inconsistent-obj output
Check how many _scan_snap groupings
Use more general check for crashed osd(s)

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-28 16:42:19 -07:00
David Zafman
bae4940574 test: Fix comment at end of scrub test scripts
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-28 16:42:19 -07:00
David Zafman
458babe7ee test: Use jq in a compatible way and for easier diff analysis
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-16 08:11:24 -07:00
David Zafman
22ddc6da5f osd: Change shard digests to hex like object info digests
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-12 07:59:21 -07:00
David Zafman
9c5ef19f93 test: Be smarter about when jsonschema can be used
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:52:10 -07:00
David Zafman
60ae2b8eb3 osd rados command: Show snapset in list-inconsistent-snapset
Add SnapSet bufferlist to inconsistent_snapset_t

Partial fix for http://tracker.ceph.com/issues/23428

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:51:48 -07:00
David Zafman
1b1d45bf51 test: Add getjson variable to save output
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
007cb45fe5 osd rados command: Change error name snapset_mismatch to snapset_error
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
0c7ac9db3b test: Clean-up test and use local values for number of objects and osds
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
982509514c osd rados command: list-inconsistent-obj attribute improvements
System attributes shown as "object_info", "snapset" and "hashinfo"
Only output user attributes as "attrs"
	Drop leading undescore "_" for user attribute keys
Improve logic as to when to show user attributes or specific system attributes

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
01687b052f osd rados command: Change "oi" to "info" in scrub handling errors
data_digest_mismatch_oi -> data_digest_mismatch_info
omap_digest_mismatch_oi -> omap_digest_mismatch_info
size_mismatch_oi -> size_mismatch_info
obj_size_oi_mismatch -> obj_size_info_mismatch

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
273f6213ea osd rados command: Change "oi_attr" to "info" in scrub handling errors
oi_attr_missing -> info_missing
oi_attr_corrupted -> info_corrupted

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
bec67e3d40 osd rados command: Rename ss_attr_missing/ss_attr_corrupted to snapset_missing/snapset_corrupted
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
d713c7dad0 osd rados command: Improve scrub handling of HashInfo (hinfo_key xattr)
Fixes: http://tracker.ceph.com/issues/23364

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
be815f9b2b test: Remove check that masks differences (let diff fail)
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-10 13:26:08 -07:00
David Zafman
5cfb8241f4 osd: Fix stale scrub stats when a primary takes over
Fixes: http://tracker.ceph.com/issues/23267

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-04-03 12:51:06 -07:00
David Zafman
293ac9895f test: Replace bc command with printf command
Signed-off-by: David Zafman <dzafman@redhat.com>
2018-03-22 17:19:56 -07:00
David Zafman
fa5e75d046 test: Make code clearer by moving code out of loop
Caused by 33e747724a

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-03-06 11:30:08 -08:00
David Zafman
33e747724a osd: Add new snapset_inconsistency error check
Includes new test case

Caused by: 5f58301a13
This changed attr consistency checking to exclude system keys,
which required snapset to be handled just like object info.

Fixes: http://tracker.ceph.com/issues/22996

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-02-15 09:03:49 -08:00
David Zafman
aeba36a660 ceph-helpers.sh: Add flush_pg_stats() to wait_for_clean() to make it reliable
osd-scrub-repair.sh: Fixes for omap keys landing on different OSDs due to flush

Signed-off-by: David Zafman <dzafman@redhat.com>
2018-01-14 18:17:23 -08:00
Igor Fedotov
1653bcca3e qa/standalone/scrub/osd-scrub-repair.sh: remove extents flag from object_info_t
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2018-01-08 20:10:16 +03:00
xie xingguo
f82228c4af osd/osd_type.cc: dump extents map object_info_t
which is good for bug hunting and diagnosing.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-10-24 11:46:23 +08:00
Sage Weil
886606bfd7 qa/standalone/scrub/osd-scrub-repair.sh: drop omap_digest flag
This is no longer set if we are backed by bluestore, which we are by
default.  See be078c8b7b

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-10-06 19:25:40 +08:00
xie xingguo
2470ab4aba qa/standalone/scrub/osd-scrub-repair.sh: add extents flag into object_info_t
Introduced-by: https://github.com/ceph/ceph/pull/15199
Fixes: http://tracker.ceph.com/issues/21618
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-10-03 21:14:53 +08:00
Alan Somers
d1cbb90daa scripts: fix bash path in shebangs (part 2)
/bin/bash is a Linuxism.  Other operating systems install bash to
different paths.  Use /usr/bin/env in shebangs to find bash.

Signed-off-by: Alan Somers <asomers@gmail.com>
2017-09-25 17:20:40 -06:00
Sage Weil
ec2bdbc44c qa/standalone/scrub/osd-scrub-snaps: adjust test for lack of snapdir objects
The head_exists stuff is totally gone; those test failures go away.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-22 17:49:19 -04:00
xie xingguo
afcb617dc9 osd/PrimaryLogPG: do not generate data digest for BlueStore by default
BlueStore enables CRC by default, so this is a dup and gains
no more benefits.

Turn this off by default, which is good for performance.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-09-13 12:17:16 +08:00
Kefu Chai
30b5b4627c Merge pull request #16494 from asomers/bin_bash
misc: Fix bash path in shebangs

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-27 10:14:14 +08:00
Sage Weil
84465bf5a5 qa/standalone/scrub/osd-scrub-repair: fix grep pattern
PGMap shows

    ss << pg_sum.stats.sum.num_objects_unfound
       << "/" << pg_sum.stats.sum.num_objects << " objects unfound (" << b << "%)";

but we were grepping for "1/1 unfound" instead of "1/1 objects
unfound".

Introduced by fe81b7e3a5.

Fixes: http://tracker.ceph.com/issues/21127
Signed-off-by: Sage Weil <sage@redhat.com>
2017-08-25 11:03:44 -04:00
Kefu Chai
85b63670d9 Merge pull request #17039 from dzafman/wip-18206
osd: Fixes for osd_scrub_during_recovery handling

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-22 22:50:24 +08:00
David Zafman
367c32c69a osd: Fixes for osd_scrub_during_recovery handling
Fixes: http://tracker.ceph.com/issues/18206

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-21 17:08:14 -07:00
David Zafman
9f3d970a0d tests: osd-scrub-snaps.sh minor cleanup
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-21 17:08:14 -07:00
David Zafman
4c949b6258 osd, rados: Adding ss_attr_missing and ss_attr_corrupt errors to list-inconsistent-obj
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-11 11:37:32 -07:00
David Zafman
5f58301a13 osd, rados: Improve size scrub error handling
Fixes: http://tracker.ceph.com/issues/20243

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-11 11:37:32 -07:00
David Zafman
8ad4b29113 osd: Add whether shard is primary in list-inconsistent-obj
Add new field in the client interface
Update test case

Fixes: http://tracker.ceph.com/issues/18836

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-11 11:37:03 -07:00
David Zafman
ae2c5331fb qa: Fix races with waiting for scrubs
The trigger_scrub sets the last_scrub_stamp backwards to
force a scheduled scrub.  In a small window this stamp could get propagated
to the mgr.  A test failure occurred because wait_for_scrub() was confused
by seeing a backward moving date.

The most critical change is having wait_for_scrub() make sure that the
date advances past the previous in value.

A test failed because the random backoff kept delayed triggered scrub, so
set osd_scrub_backoff throughout.

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-10 12:37:05 -07:00
David Zafman
1fe6cb0f02 osd: Avoid confusion over legacy snaps when head_exists corrupt
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-10 12:37:05 -07:00
David Zafman
574b3cd3d4 qa: Add common generalized inject_eio() to ceph-helpers.sh
Retry for a while to allow pool to appear

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-10 08:30:47 -07:00
David Zafman
3988ebab43 qa: osd-scrub-repair.sh handle older versions of jq
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-10 08:30:47 -07:00
David Zafman
99ad4bbd91 qa: Add create_pool() which sleeps 1 second like python variant
wait_for_clean() can miss the new pool if it races with pool create.

Fixes: http://tracker.ceph.com/issues/20465

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-08-04 06:38:09 -07:00
Alan Somers
3aae5ca6fd scripts: fix bash path in shebangs
/bin/bash is a Linuxism.  Other operating systems install bash to
different paths.  Use /usr/bin/env in shebangs to find bash.

Signed-off-by: Alan Somers <asomers@gmail.com>
2017-07-27 13:24:26 -06:00
Brad Hubbard
f8acc53d82 osd: Log audit
Review current log messages for consistency, accuracy and necessesity as
part of usability initiative. First in a series.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2017-07-26 17:34:28 +10:00
Sage Weil
766229b034 qa/standalone/scrub: separate scrub/repair tests from rest of osd/
They are slow.  Run them separately.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-24 22:11:50 -04:00