Commit Graph

33062 Commits

Author SHA1 Message Date
Greg Farnum
ca91743003 Locker: mark_event in acquire_locks() when blocking or succeeding
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:44:14 -07:00
Greg Farnum
2df68b6b73 Server: mark events when journaling and replying
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:44:14 -07:00
Greg Farnum
a6aa8121f2 MDCache: mark ops at various finish points
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:44:14 -07:00
Greg Farnum
87f6cd4929 MDS: add an OpTracker and use it
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:44:04 -07:00
Greg Farnum
b27780291c Mutation: add an MDRequestParams struct and use that when building MDRequests
We now have a single constructor and one path to build MDRequests with.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:41:20 -07:00
Greg Farnum
ae80a1f308 MDS: add stubs for an AdminSocketHook
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:39:57 -07:00
Greg Farnum
0d89e5ca45 MDCache: pass the causative message to request_start_slave()
We were passing the causative MDS (as an int), but pushing down the
actual Message will help us as we set up an OpTracker.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:39:57 -07:00
Greg Farnum
06d6d32ba3 mds: remove a couple leftover declarations of MDRequest
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:39:57 -07:00
Greg Farnum
3b867d319b TrackedOp: create an "initiated" event on construction
This ensures we always have an event for state_string().

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-09 14:09:30 -07:00
Greg Farnum
e2b62bc353 TrackedOp: do not require a Message when creating new Ops
Further parameterize the template to allow passing in an arbitrary parameter,
and move all the Message-based event marking from there into OpRequest.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 14:57:52 -07:00
Greg Farnum
95fc551a4b TrackedOp: do not track a Message
Give it to the OpRequest (currently, the only TrackedOp implementation).

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 14:57:52 -07:00
Greg Farnum
5a3efda704 TrackedOp: introduce an _unregistered() function to let implementations clean up
Right now, the OpRequest uses it to clean up Message payload data.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 14:57:52 -07:00
Greg Farnum
2e674dea63 TrackedOp: rename arrived_at to initiated_at, specify when constructed
Instead of relying on the message's get_recv_stamp, take a timestamp
when the TrackedOp is constructed. Rename get_received_at() -> get_initiated().

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 14:57:52 -07:00
Greg Farnum
6a559a5dcf TrackedOp: introduce a _dump_op_descriptor function
Use this instead of direct access to the Message underneath when dumping
the TrackedOp.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 14:57:52 -07:00
Greg Farnum
d7e04cc875 TrackedOp: remove the init_from_message function
I'm not sure why we ever had this instead of just doing things in the
subclass constructor, and the semantics around it don't make much sense
for anything else (we called mark_event first anyway).

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 14:57:52 -07:00
Jenkins
6769f4dc88 0.80-rc1 2014-04-22 21:21:45 +00:00
Sage Weil
009e874686 qa/workunits/rbd/copy.sh: skip some tests when tiering is enabled
The rados ls bit doesn't work.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-22 11:59:26 -07:00
Sage Weil
c0bff439f5 qa/workunits/rbd/copy.sh: fix test
I broke this in commit 9d64ac6608.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-22 11:59:23 -07:00
Sage Weil
47866fd2d1 Merge pull request #1691 from ceph/wip-8139
osd_types: pg_t: allow is_split to handle checks for splits prior to the most recent

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-22 12:40:02 -07:00
Samuel Just
5daf53859c ECBackend: use std::swap for boost::optional
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-22 11:25:53 -07:00
Yehuda Sadeh
6cb5ce86cf Merge pull request #1710 from ceph/wip-coverity
a couple coverity fixes

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2014-04-22 09:02:33 -07:00
Sage Weil
f244109cb7 Merge pull request #1711 from ceph/wip-coverity-respawn
mds: make strncpy in ::respawn safer

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-22 08:37:21 -07:00
John Spray
cac15c7d8b mds: make strncpy in ::respawn safer
Previous code assumed null terminated argv[0]
was not longer than PATH_MAX and the resulting
strncpy was not strictly safe.

Modify the bounds to ensure that copy will not
result in an unterminated string if argv[0]
is oversized.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-04-22 16:31:27 +01:00
Sage Weil
b4eb502508 osd/osd_types: RWState: initialize snaptrimmer_write_marker
** CID 1204295:  Uninitialized scalar field  (UNINIT_CTOR)
/osd/osd_types.h: 2716 in ObjectContext::RWState::RWState()()

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-22 08:29:58 -07:00
Sage Weil
4e5f442028 osdc/Objecter: drop unused field
This as missed by 860d72770c.

** CID 1204296:  Uninitialized scalar field  (UNINIT_CTOR)
/osdc/Objecter.h: 1165 in Objecter::Op::Op(const object_t &, const
object_locator_t &, std::vector<OSDOp, std::allocator<OSDOp>> &, int, Context *,
Context *, unsigned long *)()
/osdc/Objecter.h: 1165 in Objecter::Op::Op(const object_t &, const
object_locator_t &, std::vector<OSDOp, std::allocator<OSDOp>> &, int, Context *,
Context *, unsigned long *)()

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-22 08:28:52 -07:00
Sage Weil
124a663a0b doc/release-notes: a bit of prose about firefly
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-22 08:27:35 -07:00
Sage Weil
18aded2ed4 osd/osd_types: pg_interval_t: include primaries in operator<<
Also make up vs acting explicit.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 21:26:26 -07:00
Sage Weil
931ae6b8a0 osd/osd_types: pg_interval_t: include up_primary in pg_interval_t
Nothing uses this, but it triggers a new interval, which makes it confusing
when it is not recording in the interval itself.  Let's add it now.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 21:26:26 -07:00
Sage Weil
66170f394d osd/osd_types: pg_interval_t: dump primary
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 21:26:26 -07:00
Sage Weil
000233f732 osd: change in up set primary constitutes a peering interval change
In several places, a change in the up_primary triggers a new peering
interval, but the palces that actually generate the new past intervals,
including check_new_interval(), did not enforce that.  This becomes
somewhat obvious when you see that those callers are ignoring the
up_primary output argument for pg_to_up_acting_osds().

Fix this by adding arguments to check_new_interval and fixing the callers
to pass them in properly.  Add a unit test case to verify this.

Note that the past interval struct itself does not record who the
up_primary was; possibly it should.

Fixes: #8139
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 21:26:25 -07:00
Sage Weil
5562e26e65 osd: use parent pgid (as appropriate) in generate_past_intervals()
Feed in the ancestor pg_t (if any) when we are looking at intervals for
previous maps that may have preceded a recent split.

Fixes: #8139
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 21:26:07 -07:00
Sage Weil
6230146238 Merge pull request #1651 from enovance/wip-brag
Few bug fixes in ceph-brag

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-21 20:49:43 -07:00
Sage Weil
025ab9f47b doc/release-notes: v0.80
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 18:20:56 -07:00
Josh Durgin
c80f128c12 Merge pull request #1707 from ceph/wip-rbd-test
rbd: fix tests for cache pools

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-21 16:53:35 -07:00
Sage Weil
a80e66f932 qa/workunit/rbd/import_export.sh: skip list-objects tests with tiering
Listing objects isn't reliable with cache pools; skip that part of the
test if we see that rbd has tiering enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 16:47:10 -07:00
Sage Weil
9d64ac6608 qa/workunit/rbd/copy.sh: do not delete/recreate rbd pool
Among other things, it breaks when tiering is enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 16:26:23 -07:00
John Wilkins
c3833d7c41 doc: Fixed syntax to include 'pool'.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-04-21 15:43:23 -07:00
Samuel Just
f44e2c82e1 Merge pull request #1703 from ceph/wip-7942
Wip 7942

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-21 15:13:22 -07:00
Samuel Just
95394b60b8 ReplicatedPG::do_op: check for blocked snapset obj
Otherwise, we might use an invalid snapset in find_object_context.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 15:11:15 -07:00
Samuel Just
8259d87493 ReplicatedPG: in trim, grab w locks on obc and snapset_obc
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 15:11:12 -07:00
Samuel Just
0d5a539358 ReplicatedPG: if we get ENOENT on clone, remove clone from snapset
Fixes: #7916
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 15:11:04 -07:00
Samuel Just
f3df50188b ReplicatedPG: do not create whiteout clones
First, make_writeable treats whiteout heads like snapdir for
cloning purposes.  Second, to ensure that we send the correct
deletes on flush to the backing pool, we instead use oi.snaps
on any clone we are flushing to infer the snaps during which
head did not exist and send a delete as appropriate prior to
the copy_from.

Normally, we'd have a problem if the delete and the copy_from
completed, but an interval change intervened before the dirty
flag was cleared since we'd end up re-deleting the object.
To avoid that, we use the CEPH_OSD_FLAG_ORDERSNAP flag.

Additionally, we will use the correct snap_seq on the delete
or flush as appropriate to ensure that the previous clone
gets created with the same clone id as in the cache pool.

Fixes: #7942
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 15:11:04 -07:00
Samuel Just
caa63565dd ReplicatedPG,rados: add CEPH_OSD_[COPY_FROM]_MAP_SNAP_TO_CLONE
When promoting a clone, we want to use the provided snapid to specify
specify the clone id directly.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 15:11:01 -07:00
Sage Weil
bd39ecd610 Merge pull request #1705 from ceph/wip-8124
Wip 8124

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-21 14:28:43 -07:00
Sage Weil
2cb0bac697 qa/workunits/cephtool/test.sh: make set pg_num test non-racy
Loop while the pool is creating.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-04-21 14:18:21 -07:00
Samuel Just
506dce845b ReplicatedPG: do not use shard for hit_set object names
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 10:53:04 -07:00
Samuel Just
f7e7588025 ReplicatedPG::agent_load_hit_sets: take ondisk_read_lock
Otherwise, the hit_set might be not yet written due to a recently
completed recovery.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 10:53:04 -07:00
Samuel Just
16eccdd313 PG,PGLog: update hit_set during peering
Fixes: #8124
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 10:53:04 -07:00
Samuel Just
5821cc7e55 osd/: propogate hit_set history with repop
We don't actually send the whole info on each repop, just the log
entries, updated stats, and a few other bits.  For hit_set ops, we need
to also communicate the new hit_set history status atomically with the
log entries and the transaction.  Thus, we add a channel for an optional
pg_hit_set_history_t field in PGBackend::submit_transaction interface
and associated messages and implementations to update the hit_set info
field along with the log entries.

This also means that hit_set_(persist|trim) update an
updated_hit_set_history field on the OpContext instead of directly
modifying the info field.

Fixes: #8124
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 10:53:04 -07:00
Samuel Just
7bb2011542 encoding: use unqualified name for encode/decode in boost::optional encoding
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-21 10:53:04 -07:00