Commit Graph

71928 Commits

Author SHA1 Message Date
Sage Weil
7104a4e8da osd/PG: debug scrub range
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
73f8fb9976 qa/suites/upgarde/jewel-x: add final scrub and legacy snapset check
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
751de6ed2e osd/PrimaryLogPG: allow creation of obc for new head object
We may be creating the head object to migrate the SnapSet to.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
8bd54abc74 qa/suites/rados: at end, scrub pgs, verify no legacy snapsets
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
5f5f370925 qa/suites/rados: switch require-luminous facet to use full_sequential_finally
This lets us run multiple cleanup steps right before ceph
teardown.

Note that we drop the facet from multimon/ because it
doesn't factor out cluster creation before this step
properly.  That's fine because the require_luminous
cleanup shouldn't be related to the multimon tests.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
83dcc988db qa/suites/rados/verify: refactor thrash and cluster create
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
c9b93af06a qa/suites/rados/monthrash: simplify
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
6e20af4fd1 qa/suites/rados/thrash-erasure-code: factor out cluster create
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
112e232054 qa/suites/rados/basic: factor out cluster start
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
dc39cbab18 qa/suites/rados/thrash: extra cluster create
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:14 -04:00
Sage Weil
d5f77d3fe3 mon/PGMonitor: do not warn about pgp_num for fake "deleted" pools
This breaks the upgrade test from jewel.  We can probably revert it later.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
d7e6e8d603 ceph_test_rados_api_list: make LibRadosListNP.ListObjectsError delete pool even if faking
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
c378f14030 mon/OSDMonitor: add mon_fake_pool_delete option
Instead of deleting a pool, add a .NNN.DELETED suffix to the end.  This
keeps the data around long enough for it to be scrubbed later (in the
case of a teuthology job cleanup).

If you really want to delete the pool, then instead of the usual force
flag option you can pass --yes-i-really-really-mean-it-not-faking.  :)

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
434351ba59 ceph_test_rados_api_*: do not clean up objects (usually)
First, this is pointless--each test runs in a namespace so they don't
step on each other.  Second, leaving objects in place is an opportunity
for scrub to notice any issues we created.  Third, the cleanup asserts
that delete succeeds but if clones exist pgls will show whiteouts and then
delete will return ENOENT.  We could disable the assert, but why bother
even attempting a sloppy cleanup?

We need to preserve cleanup behavior for a few tests (notably the object
listing ones).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
fb969df531 ceph_test_rados_api_list: update check_list
We no longer see dup entries on split.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
cc53ece298 ceph_test_cls_refcount: fix cls_rgw.test_put_snap
Do not touch the object before the put if we expect to see ENOENT.
We would get it anyway with older code, but with the snapset
changes we are on a whiteout and get ENODATA instead.

And really we shouldn't have been getting ENOENT after a touch
anyway!

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
aed09380ca ceph-objectstore-tool: handle both new and legacy SnapSet format
If we encounter legacy snaps, add to snapmapper then; otherwise, use the
clone_snaps field in SnapSet to add all clones to snapmapper when we
process the head object.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
c048f6affb test/osd/osd-scrub-snaps.sh: fix test
- objects come in a different order, meh
- ss is on head, always, not snapdir.
- error messages on head, not snapdir

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:13 -04:00
Sage Weil
376015fd9e osd/PrimaryLogPG: only clear SnapSet::head_exists for legacy snapsets
In the new world, head_exists is always true.  Stop clearing it in
_delete_oid (except for legacy compatibility), and fix the various callers
and assertions to compensate.  Note that we now use head_exists as a flag
to guide us into the snapdir branch of finish_ctx() (which will go away
post-luminous).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
f063506b21 osd/osd_types: pass legacy flag to from_snap_set
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
bbc63bf204 osd/osd_types: document snaps vectors are descending
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
138a808afa osd/ReplicatedBackend: set recovry_info.ss on non-head push
Replicas need this in order to store the clones in SnapMapper.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
f0db7db65f osd/ECBackend: populate recovery_info
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
e24d5024c1 osd/ECBackend: whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
f016d4f389 osd/PrimaryLogPG: clear whiteout on exists=false objects in obc cache
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
e3e8caec5f osd/PrimaryLogPG: remove head if snapset is empty and head is whiteout
We include a check to make sure we do not delete a dirty whiteout if this
is a tier pool and the object is dirty.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
48e3f0eeed osd/PrimaryLogPG: maintain pessimistic estimate of num_legacy_snapsets
- Assume that any snapset we update, if not require_luminous, is a net-new
legacy SnapSet.  (It might be an existing one, which would be net-0, but
that is harder to tell.)

Then, during scrub,

- Any unreadable oi is assumed to include a legacy snapset
- Any snapset we encounter if !require_luminous is legacy
- Any object that should have a snapset but doesn't (corrupt or missing)
is assumed to be legacy.
- If were trying to update a legacy Snapset but have to abort, then it is
still legacy.

We could assume that a missing/broken snapset is not legacy since it has
to be repaired anyway (and therefore shouldn't block upgrade), but I'm
not sure.  For now, we'll take the conservative approach of blocking the
upgrade if the snapset metadata is missing/corrupt.

Signed-off-by: Sage Weil <sage@redhat.com>

# Conflicts:
#	src/osd/PrimaryLogPG.cc
2017-05-05 13:38:12 -04:00
Sage Weil
3862309d50 osd/osd_types: add num_legacy_snapsets to stats struct
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
7911950d85 osd/PrimaryLogPG: convert snapdir during scrub
During scrub, we assemble the clone legacy_snaps values and put them
in the SnapSet.

Note that we do not bother clearing legacy_snaps in the clones; this is
more complexity to do correctly and not worth the effort; we will always
have the SnapSet to indicate whether we need to look at the oldf ield
or not.

If the rebuild clone_snaps is not the correct size we bail out; this can
happen if some clones are missing oi or missing entirely, or if there are
extra clones.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
7f90c72394 osd: store clone list in SnapSet
Store the per-clone snaps list in SnapSet if (1) REQUIRE_LUMINOUS is set
in the OSDMap and (2) the SnapSet isn't a 'legacy' SnapSet that hasn't
been converted yet by scrub.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
bdaf7740da osd/osd_types: rename object_info_t::snaps -> legacy_snaps
This will make it easier to identify users of this field that need to
conditionally use either the old legacy_snaps or the new
SnapSet::clone_snaps vector.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
a7b5922169 osd/osd_types: add clone_snaps to SnapSet
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
de6f09f43a osd/PrimaryLogPG: delete + ignore_cache is a soft hint
We may still need to create a whiteout because clones still exist.

Arguably delete+ignore_cache is not the right way to remove whiteouts and
we should have a separate RADOS operation for this.  But we don't.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Sage Weil
2640101e9a osd/PrimaryLogPG: keep snapset on whiteout head if luminous
If REQUIRE_LUMINOUS is set on the OSDMap, put the SnapSet on the head
and make it a whiteout.  This is simpler and will eventually (once all
the old snapdir objects have been fixed up) let us remove a ton of
snapdir-related headaches.

This is surprisingly simple.  Everywhere else we work with snapdir is
already set up to handle the snapset on the head.  The only difference is
that we are preventing outselves from moving from the snapset-on-head
state to the snapset-on-snapdir-with-no-head state.  The only time this
happens is when the object is logically deleted in _delete_oid.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
10f8615e8f osd/PrimaryLogPG: filter snapc.snaps up front
No reason to wait for make_writeable(); ensure we have a valid snapc
from the start.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
1d87287d45 osd/osd_types: remove unused snapcolls from ScrubMap::object
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
27d50fa157 osd/osd_types: drop ScrubMap::object::nlink; drop some decode compat cruft
We moved to v7 encoding in ca81563d8d, which
was pre-jewel, so that's the oldest version we need to decode.

Drop the nlink field, which has not been used in a long time.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
6f2e82b997 osd/osd_types: move SnapSetContext to osd_internal_types
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
5484fe13c0 osd/SnapMapper: add some debug output
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
3f2cc3d248 osd/PrimaryLogPG: debug obs.exists from get_object_context
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Sage Weil
be4d92ca2e osd/PrimaryLogPG: improve make_writeable debug output
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:11 -04:00
Jason Dillaman
965cfb524d Merge pull request #14834 from runsisi/wip-fix-double-free
librbd: minor fixes for image trash move

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-05-05 13:16:48 -04:00
Jason Dillaman
bcae20d662 Merge pull request #14830 from runsisi/wip-open-cleanup
librbd: remove redundant check for image id emptiness

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-05-05 13:16:35 -04:00
Kefu Chai
6e1e5407d8 Merge pull request #14927 from tchaikov/wip-19427
logclient: use the seq id of the 1st log entry when resetting session

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-05-06 00:31:33 +08:00
Kefu Chai
8ecdf9a57d Merge pull request #14920 from tchaikov/wip-14579
mgr: add machinery for python modules to send MCommands to daemons

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-06 00:29:12 +08:00
Kefu Chai
e1d435b196 Merge pull request #13681 from liewegas/wip-epochs
osd: tag fast dispatch messages with min_epoch

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-06 00:27:58 +08:00
Casey Bodley
9667761ecf Merge pull request #14273 from cbodley/wip-rgw-beast-new-parser
rgw: update Beast for streaming reads in asio frontend

Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2017-05-05 11:38:54 -04:00
Casey Bodley
4d076dd565 rgw: rename frontend from asio to beast
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-05 10:12:35 -04:00
Casey Bodley
5b41fb55e4 rgw: update Beast for streaming reads in asio frontend
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-05 10:12:35 -04:00
Casey Bodley
78cd41d599 rgw: update Beast submodule
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-05 10:12:35 -04:00