Commit Graph

60132 Commits

Author SHA1 Message Date
Samuel Just
327dd257d3 osd/ECBackend: use an explicit backfill field on ECSubWrite
Previously, we used an empty transaction to indicate when we
were sending the op to a backfill peer which needs the logs,
but can't run the transaction.  I'd like to be able to send
and empty transaction for the rollforward side effect without
it causing the peer to think it missed a backfill op, so
instead, use an explicit flag.  Compatability is handled by
interpretting an old version encoding with an empty transaction
as having the backfill field filled.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:41:33 -08:00
Samuel Just
126ada4749 ReplicatedPG: update zero and truncate to only disallow aligned append pools
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:41:33 -08:00
Samuel Just
b237321bda ReplicatedPG::OpContext::start_async_reads: tolerate case sync callback call
If the read can be completed immediately, objects_read_async will call
the callback syncronously, which will result in ctx being cleaned up.
Clear pending_async_reads before the call.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:41:33 -08:00
Samuel Just
967764707a osd/: use PGBackend::call_write_ordered to submit log entries in commit order
Without this change, we might submit new log entries for marking objects
unfound in a way that causes replicas to process them out-of-order with
pending writes with lower version numbers.  That would be bad.  Instead,
add an interface to allow an arbitrary callback to be called after any
previously submitted transaction commit, but before any subsequently
submitted operations commit.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:41:33 -08:00
Samuel Just
f7b55ec144 osd/: Update PGBackend users to project last_update and submit stat deltas
The RMW pipeline means that we don't start committing an update
immediately, so we can't update the log syncronously with
submit_transaction.  Thus, in order to pipeline writes, PG/ReplicatedPG
will need to project last_update and abstain from updating info
directly (updating info.stats was the only offender).

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:41:33 -08:00
Samuel Just
1e95f2ce64 ECBackend: integrate cache and rmw pipeline
Implements the rmw pipeline and integrates the cache.

HashInfo now maintains a projected size for use during the planning
phase of the pipeline.

(Doesn't build without subsequent patches, not worth stubbing out
the interfaces)

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:41:33 -08:00
Samuel Just
5e0ec06376 osd/: refactor PGLog a bit and add support for rolling back extents
It was hard to reason about the validity of the IndexedLog internal
pointers and iterators during updates, so this patch cleans that up
a bunch.  It also moves responsibility for doing rollbacks into
PGBackend.  Finally, it adds support for the new log entry format.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:19 -08:00
Samuel Just
ac89594d50 TestPGLog: fix bug with merge_log_split_missing_entries_at_head
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:19 -08:00
Samuel Just
5360986f6d osd/: add support for rolling back overwritten extents to pg_log_entry_t
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:19 -08:00
Samuel Just
74ddea4b2b ECBackend: remove unused hobject argument to read_request_t
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:19 -08:00
Samuel Just
eb07d692b0 ECBackend: deduplicate start_remaining_read_ops and start_read_ops
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Samuel Just
89fb686038 ReplicatedBackend: always set rollforward to head in submit
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Samuel Just
4a193e828d osd/: split rollback info trims into trims and rollforwards
Also, rollforward on activate() and adjust read_log debugging to
account for non-rollforward entries.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Samuel Just
735af7c6fa osd/: 's/trim_rollback_to/roll_forward_to/g'
trim_rollback_to was a not terrible name before in that all
it ever did is (possibly) trim the stashed version of the
object.  However, now, it's going to encompass, in general,
the roll_forward part of a tpc (which will still be to
delete the stashed object in cases where that is
appropriate).

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Samuel Just
90f5d3dfcc osd_types: allow non-aligned non-overwrites with ECOVERWRITES flag
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Samuel Just
5e49a69cec osd/: add ExtentCache
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:18 -08:00
Samuel Just
050c9010e2 src/test: update ceph_test_rados to support overwrites
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:17 -08:00
Samuel Just
5fee194f13 osd,mon: add pool FLAG_EC_OVERWRITES flag
For now, this is a white box testing flag to allow
us to start testing the supporting features before
ec overwrites can actually be implemented.

Signed-off-by: Samuel Just <sjust@redhat.com>
Signed-off-by: Tomy Cheru <tomy.cheru@sandisk.com>
2016-11-17 10:40:17 -08:00
Samuel Just
9f17e2b535 osd,mon: remove FLAG_DEBUG_FAKE_EC_POOL
This was used in the past as scaffolding while the ec pools were being
developed.  There should be no legitimate users.

Signed-off-by: Samuel Just <sjust@redhat.com>
Signed-off-by: Tomy Cheru <tomy.cheru@sandisk.com>
2016-11-17 10:40:17 -08:00
Samuel Just
1dc6b4b694 osd_types: remove unused fill_in_setattrs
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:17 -08:00
Samuel Just
c723f5417a osd_types::ObjectModDesc: remove claim_append
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:17 -08:00
Samuel Just
2c99f864df osd/: switch all users of PGTransaction to use the new structure
This patch removes ReplicatedBackend::PGTransaction and implemenations
and switches over all users.  Happily, do_osd_ops loses the mod_desc
cruft and OpContext::pending_attrs.  PGTransaction doesn't really
have a natural way to implement append, however.  In reality, I think
this is probably an improvement, but it does mean that copy_from's
final transaction is now filled in by a lambda rather than by
appending a transaction fragment.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:17 -08:00
Samuel Just
20204b642a osd/: introduce PGTransaction
ECBackend is going to need a transaction representation which reduces
the operational representation from the OSDOp to a descriptive one
which makes questions like "what is the largest offest written" and
"does this transaction delete the object?" simple to answer.  At the
same time, we're going to eliminate the PGBackend::PGTransaction
interface since I don't think writing directly to an
ObjectStore::Transaction is buying us enough to offset the irritation
of having to update both implemenations.

A happy consequence of this design will be that we can fill in the
pg_log_entry_t::mod_desc member after submission in the backend
rather than inline in do_osd_ops.  We can also dispense with having
to maintain OpContext::pending_attrs separately from the ongoing
PGTransaction.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:17 -08:00
Samuel Just
6ae520da55 common/: add interval_map
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:17 -08:00
Samuel Just
49275c2d27 inline_variant: simplify it a lot, enable perfect forwarding
The previous implementation was a bit more baroque than it
needed to be.  Also, it made copies of the lambdas in a
few places.  Finally, it caused segfaults.  Not actually
sure why.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
05ddacb192 common/: add match() utilities for boost::variant
C++ doesn't have a sum type with nice pattern matching syntax.
Fortunately, someone on stack overflow fixed that.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
9c65dee274 osd_types: update_snaps should take a const argument
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
de3c22b0ee Context: add [Gen]LambdaContext and some related helpers
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
1934874e44 hobject: add helper typedefs
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
eb3b2024f2 PGBackend: add DoutPrefixProvider to parent interface
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
9499cdcd87 FileStore::_do_copy_range: tolerate short reads on replay
Consider a sequence like:

0. foo object size is 15
1. clone_range foo -> foo.0 5~5
2. write foo 5~5
3. clone_range foo -> foo.1 10~5
4. write 10~5 foo
5. rename foo -> foo.1
6. remove foo.0
7. remove foo.1
8. remove foo.2

If this sequence is interupted after 8 and replayed from 1, by the time
it gets to 3 the object will only have size 10 and no replay guard
(since 1 was skipped and 2 recreated the object with size 10 resulting
in a short read.  This should only happen if the replay guard is
missing, which should only happen if the object gets deleted later
in the sequence.

Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
bcb5a0da21 store_test::col_split_test: send bounded size transactions
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:16 -08:00
Samuel Just
313e55d948 vstart: ratchet down the osd_copyfrom_max_chunk to make multiple chunks likely
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-11-17 10:40:15 -08:00
Loic Dachary
654ad753c9 Merge pull request #12046 from dachary/wip-16014-cot
tests: use shorter directories for tests

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-17 17:37:27 +01:00
Loic Dachary
77fe9af960 Merge pull request #12036 from tchaikov/wip-osd-scrub-repair-cleanup
test/osd-scrub-repair.sh: use repair() instead of "ceph pg repair"

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-11-17 16:54:53 +01:00
Sage Weil
6662c80b46 Merge pull request #12039 from xiexingguo/xxg-wip-bluestreo-1117
os/bluestore: fix bufferspace stats leak due to blob splitting

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2016-11-17 09:25:03 -06:00
Sage Weil
12b12e6023 Merge pull request #12042 from ifed01/wip-bluestore-drop-blob_depth
os/bluestore: remove garbage collector staff

Reviewed-by: Sage Weil <sage@redhat.com>
2016-11-17 09:19:57 -06:00
Loic Dachary
a9c07e7e1b tests: use shorter directories for tests
So that jenkins can use longer directories. We can't have both otherwise
the limit UNIX domain socket path length limit triggers errors such as:

... client.admin.12750.asok is too long! The maximum length on this system is 107

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

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-11-17 16:08:52 +01:00
Casey Bodley
1cf0f1e3a7 Merge pull request #11961 from tianshan/fix-RGWSimpleRadosLockCR
rgw: fix RGWSimpleRadosLockCR set_description()

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-11-17 09:57:12 -05:00
Casey Bodley
7bab807821 Merge pull request #11965 from ceph/wip-rgw-fix-period-commit
rgw: fix missing master zone for a single zone zonegroup

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-11-17 09:56:18 -05:00
Jason Dillaman
eb0248c6e3 Merge pull request #12020 from leseb/glance-mitaka
doc: openstack glance mitaka uses show_multiple_locations

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-11-17 09:31:22 -05:00
Orit Wasserman
0870b00c77 rgw: fix missing master zone for a single zone zonegroup
Fixes: http://tracker.ceph.com/issues/17364
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2016-11-17 14:51:35 +01:00
Igor Fedotov
adddaf49a7 os/bluestore: remove garbage collector staff
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2016-11-17 13:34:17 +00:00
Kefu Chai
e445953379 Merge pull request #11424 from renhwztetecs/renhw-wip-mgr
mgr: init() return when connection daemons failed && add some err info

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-17 19:40:53 +08:00
Igor Fedotov
7814549c74 Merge pull request #12015 from xiexingguo/xxg-wip-bluestore-init-csum
os/bluestore: avoid unnecessary call to init_csum()

Reviewed-by: Sage Weil <sage@redhat.com>
2016-11-17 14:07:40 +03:00
Kefu Chai
1be2eb114b test/osd-scrub-repair.sh: use repair() instead of "ceph pg repair"
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-11-17 18:51:52 +08:00
Kefu Chai
15649431a0 Merge pull request #12038 from tchaikov/wip-ceph-objectstore-tool
test: ceph-objectstore-tool: should import platform before using it

Reviewed-by: Owen Synge <osynge@suse.com>
2016-11-17 18:13:47 +08:00
Sébastien Han
def903a7ef doc: openstack glance mitaka uses show_multiple_locations
As of the Mitaka release show_image_direct_url is not needed, but
instead show_multiple_locations should be used.
Adding the necessary guidance for Mitaka release.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-17 10:57:36 +01:00
Kefu Chai
e3de5f4a08 test: ceph-objectstore-tool: should import platform before using it
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-11-17 17:20:57 +08:00
Kefu Chai
2c7f08b849 Merge pull request #9613 from dzafman/wip-16064
common osd: Improve scrub analysis, list-inconsistent-obj output and osd-scrub-repair test

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-17 15:48:32 +08:00