]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoTestPGLog: remove test with DELETE op with prior_version = eversion_t()
Samuel Just [Mon, 17 Feb 2014 22:20:44 +0000 (14:20 -0800)]
TestPGLog: remove test with DELETE op with prior_version = eversion_t()

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPGLog::merge_old_entry: simplify the oe.version > ne.version case
Samuel Just [Mon, 10 Feb 2014 22:07:07 +0000 (14:07 -0800)]
PGLog::merge_old_entry: simplify the oe.version > ne.version case

If ne.version < oe.version, the correct answer is to rollback oe.version
if possible regardless of what the entries are.

Also, rearrange to deal with the fact that we cannot roll back a missing
object.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG: just ignore rollbacks on objects we have already failed to rollback
Samuel Just [Fri, 7 Feb 2014 01:26:24 +0000 (17:26 -0800)]
PG: just ignore rollbacks on objects we have already failed to rollback

The relevant changes to missing and/or the filestore will have
already been made.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG::remove_snap_mapped_object: use pg_whoami.shard
Samuel Just [Mon, 10 Feb 2014 22:04:30 +0000 (14:04 -0800)]
PG::remove_snap_mapped_object: use pg_whoami.shard

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: take snapset_obc write lock where appropriate
Samuel Just [Sun, 16 Feb 2014 01:44:57 +0000 (17:44 -0800)]
ReplicatedPG: take snapset_obc write lock where appropriate

Otherwise, we might read it for backfill before it's fully created
on a peer.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: release backfill state on_global_recover not peer recover
Samuel Just [Tue, 11 Feb 2014 02:35:47 +0000 (18:35 -0800)]
ReplicatedPG: release backfill state on_global_recover not peer recover

There may now be multiple backfill peers.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: take clone write lock as well in make_writeable
Samuel Just [Tue, 11 Feb 2014 02:34:52 +0000 (18:34 -0800)]
ReplicatedPG: take clone write lock as well in make_writeable

Otherwise, we might start backfilling the clone before the op is
complete.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG,osd_types: seperate require_rollback from ec_pool
Samuel Just [Thu, 23 Jan 2014 21:32:21 +0000 (13:32 -0800)]
ReplicatedPG,osd_types: seperate require_rollback from ec_pool

It's handy to allow a pool to answer false to ec_pool() and
true to require_rollback() in order to allow a replicated
pool to test the rollback mechanisms without allowing
non-NO_SHARD shards.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG:: remove_snap_mapped_object already removes the object
Samuel Just [Mon, 10 Feb 2014 22:07:46 +0000 (14:07 -0800)]
ReplicatedPG:: remove_snap_mapped_object already removes the object

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: find_object_context debugging: output oi
Samuel Just [Tue, 4 Feb 2014 01:10:56 +0000 (17:10 -0800)]
ReplicatedPG: find_object_context debugging: output oi

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: handle xattr cache on rollback and delete_head
Samuel Just [Sat, 8 Feb 2014 19:24:37 +0000 (11:24 -0800)]
ReplicatedPG: handle xattr cache on rollback and delete_head

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: release_op_ctx_locks in all-applied, not all-committed
Samuel Just [Tue, 4 Feb 2014 01:10:45 +0000 (17:10 -0800)]
ReplicatedPG: release_op_ctx_locks in all-applied, not all-committed

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoFileStore: permit NULL onreadable callback
Samuel Just [Mon, 3 Feb 2014 04:05:20 +0000 (20:05 -0800)]
FileStore: permit NULL onreadable callback

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoErasureCodeJerasure: fill in decoded if all shards are included
Samuel Just [Tue, 4 Feb 2014 01:09:28 +0000 (17:09 -0800)]
ErasureCodeJerasure: fill in decoded if all shards are included

This causes it to match minimum_to_decode.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoErasureCodeJerasure: fix alignement issues in encode/decode
Samuel Just [Sat, 1 Feb 2014 04:07:26 +0000 (20:07 -0800)]
ErasureCodeJerasure: fix alignement issues in encode/decode

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoObjectStore: fix OP_COLL_ADD dump output
Samuel Just [Sun, 9 Feb 2014 01:37:15 +0000 (17:37 -0800)]
ObjectStore: fix OP_COLL_ADD dump output

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoTestRados: send aligned appends on erasure pools
Samuel Just [Sat, 1 Feb 2014 19:31:25 +0000 (11:31 -0800)]
TestRados: send aligned appends on erasure pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: reject unaligned writes on ec pools
Samuel Just [Thu, 6 Feb 2014 04:05:04 +0000 (20:05 -0800)]
ReplicatedPG: reject unaligned writes on ec pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agolibrados: add calls to expose required write alignment
Samuel Just [Thu, 6 Feb 2014 04:04:41 +0000 (20:04 -0800)]
librados: add calls to expose required write alignment

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoSimpleMessenger: init_local_connection whenever my_inst changes
Samuel Just [Sat, 1 Feb 2014 04:07:54 +0000 (20:07 -0800)]
SimpleMessenger: init_local_connection whenever my_inst changes

This is necessary to correctly handle messages to self.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1139 from ceph/wip-agent
Sage Weil [Mon, 17 Feb 2014 22:14:21 +0000 (14:14 -0800)]
Merge pull request #1139 from ceph/wip-agent

osd: basic cache tier agent

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd: improve whiteout debug prints 1139/head
Sage Weil [Mon, 17 Feb 2014 21:07:47 +0000 (13:07 -0800)]
osd: improve whiteout debug prints

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: make agent skip blocked obcs
Sage Weil [Mon, 17 Feb 2014 21:05:58 +0000 (13:05 -0800)]
osd/ReplicatedPG: make agent skip blocked obcs

Among other things, this can interfere with an in-flight copy-from and
corrupt the pg stats.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedBackend: print char ack_type as int
Sage Weil [Mon, 17 Feb 2014 16:45:46 +0000 (08:45 -0800)]
ReplicatedBackend: print char ack_type as int

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1254 from ceph/wip-barrier
Sage Weil [Mon, 17 Feb 2014 19:09:09 +0000 (11:09 -0800)]
Merge pull request #1254 from ceph/wip-barrier

libcephfs: disable barriers for now

11 years agoMerge remote-tracking branch 'gh/wip-7212-sage-b'
Sage Weil [Mon, 17 Feb 2014 19:07:55 +0000 (11:07 -0800)]
Merge remote-tracking branch 'gh/wip-7212-sage-b'

We should carefully backport some or all of this.

Backport: emperor, dumpling
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoclient: disable barrier support 1254/head
Sage Weil [Mon, 17 Feb 2014 18:27:23 +0000 (10:27 -0800)]
client: disable barrier support

The boost interval_set class is not available on centos6/rhel6.  Until that
dependency is sorted out, fix the build.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient: fix barrier interval
Sage Weil [Mon, 17 Feb 2014 18:23:37 +0000 (10:23 -0800)]
client: fix barrier interval

(start, end) not (start, length)

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient/barrier: drop unused active_commit_interval
Sage Weil [Mon, 17 Feb 2014 17:19:17 +0000 (09:19 -0800)]
client/barrier: drop unused active_commit_interval

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient: don't populate Client::barriers from read accesses
Sage Weil [Mon, 17 Feb 2014 17:58:56 +0000 (09:58 -0800)]
client: don't populate Client::barriers from read accesses

If the entry doesn't exist, no need to create it.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoqa/workunits/suites/pjd: use test suite with acl tweak
Sage Weil [Mon, 17 Feb 2014 06:25:49 +0000 (22:25 -0800)]
qa/workunits/suites/pjd: use test suite with acl tweak

Test 45 in xacl/00.t fails on ext4 and cephfs.  Just disable it.
Everything else passes.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: allow is_degraded_object() to be called outside of backfil
Sage Weil [Mon, 17 Feb 2014 04:53:13 +0000 (20:53 -0800)]
osd/ReplicatedPG: allow is_degraded_object() to be called outside of backfil

The agent does this.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1251 from ceph/wip-7371
Sage Weil [Sun, 16 Feb 2014 16:26:33 +0000 (08:26 -0800)]
Merge pull request #1251 from ceph/wip-7371

ReplicatedPG: return no data if read size is trimmed to zero

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: return no data if read size is trimmed to zero 1251/head
Yan, Zheng [Sun, 16 Feb 2014 14:14:50 +0000 (22:14 +0800)]
ReplicatedPG: return no data if read size is trimmed to zero

OSD should return no data if the read size is trimmed to zero by the
truncate_seq/truncate_size check. We can't rely on ObjectStore::read()
to do that because it reads the entire object when the 'len' parameter
is zero.

Fixes: #7371
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1223 from ceph/wip-7395
Sage Weil [Sun, 16 Feb 2014 06:36:23 +0000 (22:36 -0800)]
Merge pull request #1223 from ceph/wip-7395

Improve OSD subscription handling

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1234 from dachary/wip-format
Sage Weil [Sun, 16 Feb 2014 06:21:57 +0000 (22:21 -0800)]
Merge pull request #1234 from dachary/wip-format

mon: remove format argument from osd crush dump

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd: set client incarnation for Objecter instance
Sage Weil [Sun, 16 Feb 2014 01:22:30 +0000 (17:22 -0800)]
osd: set client incarnation for Objecter instance

Each ceph-osd process's Objecter instance has a sequence
of tid's that start at 1.  To ensure these are unique
across all time, set the client incarnation to the
OSDMap epoch in which we booted.

Note that the MDS does something similar (except the
incarnation is actually the restart count for the MDS
rank, since the MDSMap tracks that explicitly).

Backport: emperor
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: schedule agent from a priority queue
Sage Weil [Wed, 12 Feb 2014 20:39:25 +0000 (12:39 -0800)]
osd: schedule agent from a priority queue

We need to focus agent attention on those PGs that most need it.  For
starters, full PGs need immediate attention so that we can unblock IO.
More generally, fuller ones will give us the best payoff in terms of
evicted data vs effort expended finding candidate objects.

Restructure the agent queue with priorities.  Quantize evict_effort so that
PGs do not jump between priorities too frequently.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: simplify agent_choose_mode
Sage Weil [Wed, 12 Feb 2014 00:26:18 +0000 (16:26 -0800)]
osd/ReplicatedPG: simplify agent_choose_mode

Use a temp variable.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: block requests to cache PGs when they are full
Sage Weil [Wed, 12 Feb 2014 00:25:51 +0000 (16:25 -0800)]
osd/ReplicatedPG: block requests to cache PGs when they are full

If we are full and get a write request to a new object, put the op on a
wait list.  Wake up when the agent frees up some space.

Note that we do not block writes to existing objects.  That would be a
more aggressive strategy, but it is difficult to know up front whether we
will increase the size of the object or not, so we just leave it be.  I
suspect this strategy is "good enough".

Also note that we do not yet prioritize agent attention to PGs that most
need eviction (e.g., those that are full).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: redirect reads instead of promoting when full
Sage Weil [Tue, 11 Feb 2014 22:01:10 +0000 (14:01 -0800)]
osd/ReplicatedPG: redirect reads instead of promoting when full

If the cache pool is full, we are processing a read op, and we would
otherwise promote, redirect instead.  This lets us continue to process the
op without blocking or making the cache pool any more full than it is.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: use reply_ctx in a few cases
Sage Weil [Tue, 11 Feb 2014 21:43:11 +0000 (13:43 -0800)]
osd/ReplicatedPG: use reply_ctx in a few cases

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not flush omap objects to an EC base pool
Sage Weil [Sat, 8 Feb 2014 02:05:04 +0000 (18:05 -0800)]
osd/ReplicatedPG: do not flush omap objects to an EC base pool

The EC pool does not support omap content.  If the caching/tiering agent
encounters such an object, just skip it.  Use the OMAP object_info_t flag
for this.

Although legacy pools will have objects with omap that do not have this
flag set, no *cache* pools yet exist, so we do not need to worry about the
agent running across legacy content.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not activate agent unless base pool exists
Sage Weil [Sat, 8 Feb 2014 02:03:41 +0000 (18:03 -0800)]
osd/ReplicatedPG: do not activate agent unless base pool exists

Paranoia.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add OMAP flag to object_info_t
Sage Weil [Sat, 8 Feb 2014 02:03:19 +0000 (18:03 -0800)]
osd: add OMAP flag to object_info_t

Set a flag if we ever set or update OMAP content on an object.  This gives
us an easy indicator for the cache agent (without actually querying the
ObjectStore) so that we can avoid trying to flush omap to EC pools.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: ignore starvation potential when taking write lock during promote
Sage Weil [Mon, 3 Feb 2014 19:44:18 +0000 (11:44 -0800)]
osd/ReplicatedPG: ignore starvation potential when taking write lock during promote

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not choke on op-less flush OpContexts (from flush)
Sage Weil [Mon, 3 Feb 2014 01:11:23 +0000 (17:11 -0800)]
osd/ReplicatedPG: do not choke on op-less flush OpContexts (from flush)

The agent initiates flush ops that don't have an OpRequest associated
with them.  Make reply_ctx skip the actual reply message instead of
crashing if the flush request gets canceled (e.g., due to a race with
a write).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not flush|evict degraded objects
Sage Weil [Sun, 2 Feb 2014 05:48:07 +0000 (21:48 -0800)]
osd/ReplicatedPG: do not flush|evict degraded objects

The repop won't work right; we still repair the object before making
any update.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: fix osd pool set json syntax
Sage Weil [Sun, 2 Feb 2014 05:26:00 +0000 (21:26 -0800)]
ceph_test_rados_api_tier: fix osd pool set json syntax

String, not int.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: clear agent state when PG becomes a replica
Sage Weil [Sat, 1 Feb 2014 05:16:54 +0000 (21:16 -0800)]
osd: clear agent state when PG becomes a replica

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not flush or evict hitsets
Sage Weil [Thu, 30 Jan 2014 18:40:22 +0000 (10:40 -0800)]
osd/ReplicatedPG: do not flush or evict hitsets

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: fix evict mode selection for large target
Sage Weil [Tue, 28 Jan 2014 02:14:09 +0000 (18:14 -0800)]
osd/ReplicatedPG: fix evict mode selection for large target

If the target is > 1.0 for some reason (bad configuration, or high slop
value), and we are not yet full, we should be in IDLE mode--not SOME.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: add slop to agent mode selection
Sage Weil [Tue, 28 Jan 2014 01:57:53 +0000 (17:57 -0800)]
osd/ReplicatedPG: add slop to agent mode selection

We want to avoid a situation where the agent clicks on and off when the
system hovers around a utilization threshold.  Particularly for trim,
the system can expend a lot of energy doing a minimal amount of work when
the effort level is low.  To avoid this, enable when we are some amount
above the threshold, and do not turn off until we are the same amount below
the target.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: initial agent to random hash position inside pg
Sage Weil [Tue, 28 Jan 2014 00:26:19 +0000 (16:26 -0800)]
osd/ReplicatedPG: initial agent to random hash position inside pg

When the agent starts, start at a random offset to ensure we get a more
uniform distribution of attention to all objects in the PG.  Otherwise, we
will disproportionately examine objects at the "beginning" of the PG if we
are interrupted by peering or restarts or some other activity.

Note that if the agent_state is preserved, we do not forget our position,
which is also nice.

We *could* persist this position in the pg_info_t somewhere, but I am not
sure it is worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add pg_pool_t::get_random_pg_position()
Sage Weil [Tue, 28 Jan 2014 00:20:04 +0000 (16:20 -0800)]
osd: add pg_pool_t::get_random_pg_position()

Return a hash position somewhere inside a given pg.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: only enable tier agent when osd is in active state
Sage Weil [Mon, 27 Jan 2014 23:34:50 +0000 (15:34 -0800)]
osd: only enable tier agent when osd is in active state

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: observe 'notieragent' osdmap flag
Sage Weil [Mon, 27 Jan 2014 23:30:28 +0000 (15:30 -0800)]
osd: observe 'notieragent' osdmap flag

Pause/unpause the agent thread accordingly.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add 'notieragent' flag to OSDMap
Sage Weil [Mon, 27 Jan 2014 23:30:09 +0000 (15:30 -0800)]
osd: add 'notieragent' flag to OSDMap

This will pause tiering agent work.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agohistogram: fix histogram::get_position_micro overflow
Loic Dachary [Mon, 27 Jan 2014 13:20:25 +0000 (14:20 +0100)]
histogram: fix histogram::get_position_micro overflow

Convert the return values to uint64_t

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: test dirty stats in ceph df detail
Loic Dachary [Mon, 27 Jan 2014 15:47:33 +0000 (16:47 +0100)]
mon: test dirty stats in ceph df detail

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd/ReplicatedPG: decay tier agent histograms over time
Sage Weil [Fri, 24 Jan 2014 22:57:02 +0000 (14:57 -0800)]
osd/ReplicatedPG: decay tier agent histograms over time

Make decisions based on recent observations of object age distributions,
not all time history.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: basic flush and evict agent functionality
Sage Weil [Fri, 24 Jan 2014 22:35:41 +0000 (14:35 -0800)]
osd/ReplicatedPG: basic flush and evict agent functionality

This is very basic flush and evict functionality for the tiering agent.

The flush policy is very simple: if we are above the threshold and the
object is dirty, and not super young, flush it.  This is not too braindead
of a policy (although we could clearly do something smarter).

The evict policy is pretty simple: evict the object if it is clean and
we are over our full threshold.  If we are in the middle mode, try to
estimate how cold the object is based on an accumulated histogram of
objects we have examined so far, and decide to evict based on our
position in that histogram relative to our "effort" level.

Caveats:
 * the histograms are not refreshed
 * we aren't taking temperature into consideration yet, although some of
   the infrastructure is there.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: agent worker thread
Sage Weil [Mon, 20 Jan 2014 21:51:45 +0000 (13:51 -0800)]
osd: agent worker thread

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: fix finish_flush
Sage Weil [Sat, 8 Feb 2014 02:10:00 +0000 (18:10 -0800)]
osd/ReplicatedPG: fix finish_flush

Make sure we reallocate a pgbackend transaction at the time when we are
initiating new work.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/HitSet: add HitSetRef
Sage Weil [Fri, 24 Jan 2014 22:18:49 +0000 (14:18 -0800)]
osd/HitSet: add HitSetRef

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: factor clone check out of evict op code
Sage Weil [Mon, 20 Jan 2014 22:30:48 +0000 (14:30 -0800)]
osd/ReplicatedPG: factor clone check out of evict op code

Move the check for clones into a helper so that we will be able to use in
other places where we need to evict.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: add on_finish to OpContext
Sage Weil [Tue, 4 Feb 2014 06:10:07 +0000 (22:10 -0800)]
osd/ReplicatedPG: add on_finish to OpContext

Add a callback hook for whenever an OpContext completes or cancels.  We
are pretty sloppy here about the return values because our initial user
will not care, and it is unclear if future users will.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: include dirty stats in 'ceph df detail'
Sage Weil [Mon, 20 Jan 2014 21:47:08 +0000 (13:47 -0800)]
mon: include dirty stats in 'ceph df detail'

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: rename test/test_osd_types.cc -> test/osd/types.cc
Sage Weil [Mon, 20 Jan 2014 18:29:55 +0000 (10:29 -0800)]
osd: rename test/test_osd_types.cc -> test/osd/types.cc

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add pg_pool_t::get_pg_num_divisor
Sage Weil [Mon, 20 Jan 2014 18:28:43 +0000 (10:28 -0800)]
osd: add pg_pool_t::get_pg_num_divisor

A PG is not always an equally sized fraction of the total pool size due to
the use of ceph_stable_mod.  Add a helper to return the fraction
(denominator) of a given pg based on the current pg_num value.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/OSDMonitor: allow new pool policy fields to be set
Sage Weil [Fri, 10 Jan 2014 04:36:13 +0000 (20:36 -0800)]
mon/OSDMonitor: allow new pool policy fields to be set

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: add cache policy fields to pg_pool_t
Sage Weil [Wed, 18 Dec 2013 21:40:54 +0000 (13:40 -0800)]
osd/osd_types: add cache policy fields to pg_pool_t

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agohistogram: add decay
Sage Weil [Fri, 24 Jan 2014 22:56:22 +0000 (14:56 -0800)]
histogram: add decay

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agohistogram: move to common, add unit tests
Sage Weil [Fri, 24 Jan 2014 02:09:43 +0000 (18:09 -0800)]
histogram: move to common, add unit tests

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agohistogram: rename set -> set_bin
Sage Weil [Fri, 24 Jan 2014 02:05:40 +0000 (18:05 -0800)]
histogram: rename set -> set_bin

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agohistogram: calculate bin position of a value in the histrogram
Sage Weil [Fri, 24 Jan 2014 02:11:29 +0000 (18:11 -0800)]
histogram: calculate bin position of a value in the histrogram

Generate a lower and upper bound.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1176 from ceph/wip-primary-affinity
Sage Weil [Sun, 16 Feb 2014 00:59:35 +0000 (16:59 -0800)]
Merge pull request #1176 from ceph/wip-primary-affinity

osd: primary affinity

Added primary-affinity thrashing to thrashosd.py.

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1249 from dachary/wip-qa-erasure-test
Sage Weil [Sun, 16 Feb 2014 00:48:36 +0000 (16:48 -0800)]
Merge pull request #1249 from dachary/wip-qa-erasure-test

qa: do not create erasure pools yet

11 years agoqa: do not create erasure pools yet 1249/head
Loic Dachary [Sat, 15 Feb 2014 23:53:13 +0000 (00:53 +0100)]
qa: do not create erasure pools yet

comment out erasure pool related tests when an OSD is involved because
it does not work yet. See http://tracker.ceph.com/issues/7360.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd/OSDMap: include primary affinity in OSDMap::print 1176/head
Sage Weil [Fri, 14 Feb 2014 23:18:11 +0000 (15:18 -0800)]
osd/OSDMap: include primary affinity in OSDMap::print

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/OSDMap: remove bad assert
Sage Weil [Tue, 11 Feb 2014 23:40:22 +0000 (15:40 -0800)]
osd/OSDMap: remove bad assert

You can have an erasure poool with all CRUSH_ITEM_NONE and primary == -1.
acting is not empty.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/OSDMonitor: add 'mon osd allow primary affinity' bool option
Sage Weil [Mon, 3 Feb 2014 01:34:25 +0000 (17:34 -0800)]
mon/OSDMonitor: add 'mon osd allow primary affinity' bool option

By default, disallow adjustment of primary affinity unless the user has
opted in by adjusting their monitor config.  This will avoid some user
pain because inadvertantly setting the affinity will prevent older clients
from connecting to and using the cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_psim: some futzing to test primary_affinity
Sage Weil [Thu, 30 Jan 2014 16:22:58 +0000 (08:22 -0800)]
ceph_psim: some futzing to test primary_affinity

- map to acting
- count first position, primary

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/OSDMap: add primary_affinity feature bit
Sage Weil [Thu, 30 Jan 2014 03:47:21 +0000 (19:47 -0800)]
osd/OSDMap: add primary_affinity feature bit

Indicate that we support it.  Indicate when an OSDMap requires it.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/OSDMap: apply primary_affinity to mapping
Sage Weil [Tue, 11 Feb 2014 17:25:04 +0000 (09:25 -0800)]
osd/OSDMap: apply primary_affinity to mapping

The behavior is a bit different for replicated and indep/erasure mode.
In the first case, we are rearranging the result.  In the second case,
we can just set the primary argument to the right value.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1245 from ceph/wip-brag
Sage Weil [Sat, 15 Feb 2014 18:37:26 +0000 (10:37 -0800)]
Merge pull request #1245 from ceph/wip-brag

ceph-brag

Sebastien Han confirms that this is under the default (LGPL2) license, thus:

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph.spec: add ceph-brag 1245/head
Sage Weil [Sat, 15 Feb 2014 17:18:18 +0000 (09:18 -0800)]
ceph.spec: add ceph-brag

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodebian: add ceph-brag
Sage Weil [Sat, 15 Feb 2014 17:18:12 +0000 (09:18 -0800)]
debian: add ceph-brag

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-brag: add Makefile
Sage Weil [Sat, 15 Feb 2014 17:17:33 +0000 (09:17 -0800)]
ceph-brag: add Makefile

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1181 from dachary/wip-7277
Sage Weil [Sat, 15 Feb 2014 18:08:45 +0000 (10:08 -0800)]
Merge pull request #1181 from dachary/wip-7277

DNM: mon: s/ENOSYS/ENOTSUP/

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'master' of https://github.com/enovance/ceph-brag into wip-brag
Sage Weil [Sat, 15 Feb 2014 17:17:22 +0000 (09:17 -0800)]
Merge branch 'master' of https://github.com/enovance/ceph-brag into wip-brag

11 years agomon/Elector: bootstrap on timeout 1250/head
Sage Weil [Sat, 15 Feb 2014 16:59:51 +0000 (08:59 -0800)]
mon/Elector: bootstrap on timeout

Currently if an election times out we call a new
election.  If we have never joined a quorum, bootstrap
instead. This is heavier weight, but captures the case
where, during bootstrap:

 - a and b have learned each others' addresses
 - everybody calls an election
 - a and b form a quorum
 - c loops trying to call an election, but is ignored
   because a and b don't see its address in the monmap

See logs:
  ubuntu@teuthology:/var/lib/teuthworker/archive/sage-2014-02-14_13:50:04-ceph-deploy-wip-7212-sage-b-testing-basic-plana/83194

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: tell MonmapMonitor first about winning an election
Sage Weil [Fri, 14 Feb 2014 19:25:52 +0000 (11:25 -0800)]
mon: tell MonmapMonitor first about winning an election

It is important in the bootstrap case that the very first paxos round
also codify the contents of the monmap itself in order to avoid any manner
of confusing scenarios where subsequent elections are called and people
try to recover and modify paxos without agreeing on who the quorum
participants are.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: only learn peer addresses when monmap == 0
Sage Weil [Fri, 14 Feb 2014 19:13:26 +0000 (11:13 -0800)]
mon: only learn peer addresses when monmap == 0

It is only safe to dynamically update the address for a peer mon in our
monmap if we are in the midst of the initial quorum formation (i.e.,
monmap.epoch == 0).  If it is a later epoch, we have formed our initial
quorum and any and all monmap changes need to be agreed upon by the quorum
and committed via paxos.

Fixes: #7212
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoOSD: use the osdmap_subscribe helper 1223/head
Greg Farnum [Tue, 11 Feb 2014 20:51:19 +0000 (12:51 -0800)]
OSD: use the osdmap_subscribe helper

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: create a helper for handling OSDMap subscriptions, and clean them up
Greg Farnum [Tue, 11 Feb 2014 21:34:39 +0000 (13:34 -0800)]
OSD: create a helper for handling OSDMap subscriptions, and clean them up

We've had some trouble with not clearing out subscription requests and
overloading the monitors (though only because of other bugs). Write a
helper for handling subscription requests that we can use to centralize
safety logic. Clear out the subscription whenever we get a map that covers
it; if there are more maps available than we received, we will issue another
subscription request based on "m->newest_map" at the end of handle_osd_map().

Notice that the helper will no longer request old maps which we already have,
and that unless forced it will not dispatch multiple subscribe requests
to a single monitor.
Skipping old maps is safe:
1) we only trim old maps when the monitor tells us to,
2) we do not send messages to our peers until we have updated our maps
from the monitor.
That means only old and broken OSDs will send us messages based on maps
in our past, and we can (and should) ignore any directives from them anyway.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agomonc: new fsub_want_increment( function to make handling subscriptions easier
Greg Farnum [Tue, 11 Feb 2014 21:31:26 +0000 (13:31 -0800)]
monc: new fsub_want_increment( function to make handling subscriptions easier

Provide a subscription-modifying function which will not decrement
the start version.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agodoc/release-notes: v0.67.6
Sage Weil [Fri, 14 Feb 2014 22:20:43 +0000 (14:20 -0800)]
doc/release-notes: v0.67.6

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1237 from dachary/wip-hashpspool
Sage Weil [Fri, 14 Feb 2014 17:27:33 +0000 (09:27 -0800)]
Merge pull request #1237 from dachary/wip-hashpspool

mon: ceph hashpspool false clears the flag

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1235 from ceph/wip-osdmaptool-pool-fix
Loic Dachary [Fri, 14 Feb 2014 12:33:26 +0000 (13:33 +0100)]
Merge pull request #1235 from ceph/wip-osdmaptool-pool-fix

wip-osdmaptool-pool-fix

Reviewed-by: Loic Dachary <loic@dachary.org>