]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agotest: update cache test since OSDs support redirects 580/head
Greg Farnum [Wed, 4 Sep 2013 20:44:47 +0000 (13:44 -0700)]
test: update cache test since OSDs support redirects

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: implement basic caching policies in ReplicatedPG
Greg Farnum [Mon, 9 Sep 2013 18:19:37 +0000 (11:19 -0700)]
osd: implement basic caching policies in ReplicatedPG

Right now these are very basic and aren't as sophisticated as we
want them to end up, but we have a skeleton for where to put the
decision-making logic.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: follow redirect replies from the OSD
Greg Farnum [Tue, 3 Sep 2013 23:42:33 +0000 (16:42 -0700)]
Objecter: follow redirect replies from the OSD

If we get back a redirect reply, we clean up the Op's external references
and re-send using the target_oloc and target_oid. To facilitate this,
recalc_op_target() now only fills them in and overrides them with pool
cache semantics if they're empty.

Keep in mind that this is a pretty simple redirect formula -- the
Objecter will keep following redirects forever if that's what the OSDs
send back. The client is not providing any synchronization right now.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: write a helper function to clean up ops that need to be retried
Greg Farnum [Tue, 3 Sep 2013 23:31:50 +0000 (16:31 -0700)]
Objecter: write a helper function to clean up ops that need to be retried

We have a little block to clean them up if we get back EAGAIN, but it's
actually leaking map references; we will also use this for redirects
from the OSDs.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMOSDOpReply: add a redirect member
Greg Farnum [Tue, 3 Sep 2013 21:59:59 +0000 (14:59 -0700)]
MOSDOpReply: add a redirect member

When present, clients must send the request to the location specified
by the redirect (by using the combine_with_locator() function on
request_redirect_t).
A separate mechanism must be used to ensure that clients see and respect
the redirect, as we do not bump up the minimum required version to
decode.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: add an Op::target_oid, and use it when submitting Ops
Greg Farnum [Tue, 3 Sep 2013 21:42:14 +0000 (14:42 -0700)]
Objecter: add an Op::target_oid, and use it when submitting Ops

For now it's just a copy of base_oid, but soon we will allow it
to be overwritten for OSD-driven redirects.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: rename Op::oid -> Op::base_oid
Greg Farnum [Tue, 3 Sep 2013 21:41:18 +0000 (14:41 -0700)]
Objecter: rename Op::oid -> Op::base_oid

Analagous to the oloc->base_oloc rename we did in
e2fcad09d94d965867147627b73e99da9454436f, we may specify a different
target name for a redirect. Rename the existing oid to base_oid to
avoid any confusion.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: create a new request_redirect_t
Greg Farnum [Tue, 3 Sep 2013 21:34:46 +0000 (14:34 -0700)]
osd: create a new request_redirect_t

We'll use this so that the OSD can tell the Objecter to redirect a
request to a different object somewhere else.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: add empty() function to object_locator_t
Greg Farnum [Fri, 30 Aug 2013 01:33:07 +0000 (18:33 -0700)]
osd: add empty() function to object_locator_t

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMOSDOpReply: more const-correctness
Greg Farnum [Tue, 3 Sep 2013 21:52:05 +0000 (14:52 -0700)]
MOSDOpReply: more const-correctness

get_map_epoch() is a non-reference getter -- mark it as const!

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: do not meaninglessly fill in the reqid on make_writeable() cloning
Greg Farnum [Fri, 30 Aug 2013 23:33:31 +0000 (16:33 -0700)]
ReplicatedPG: do not meaninglessly fill in the reqid on make_writeable() cloning

This reqid is used to fill in a map that is used for giving clients
the correct version on replayed ops, unless the reqid is blank (in
which case it doesn't go into the map). Indirect clones are not ops
that the client wants to observe and the version is incorrect right now,
so don't fill it in.
Note that this should not have actually caused any buggy behavior, because
the map would have simply been overwritten by the real requested event
a short time later (while still protected by locks and things). But it's
very confusing.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoCorrect syntax for generate swift key 564/head
Lukasz Jagiello [Wed, 4 Sep 2013 14:33:57 +0000 (16:33 +0200)]
Correct syntax for generate swift key

11 years agoMerge branch 'next'
Gary Lowell [Wed, 4 Sep 2013 08:37:41 +0000 (01:37 -0700)]
Merge branch 'next'

11 years agov0.68 v0.68
Gary Lowell [Tue, 3 Sep 2013 23:10:31 +0000 (16:10 -0700)]
v0.68

11 years agoMerge branch 'wip-copyfrom'
Sage Weil [Tue, 3 Sep 2013 23:00:28 +0000 (16:00 -0700)]
Merge branch 'wip-copyfrom'

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agodoc: Fix repo URL for Ceph cloning (dev/generatedocs)
Dan Mick [Tue, 3 Sep 2013 22:56:53 +0000 (15:56 -0700)]
doc: Fix repo URL for Ceph cloning (dev/generatedocs)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoceph_test_rados: test COPY_FROM 563/head
Sage Weil [Tue, 3 Sep 2013 20:51:31 +0000 (13:51 -0700)]
ceph_test_rados: test COPY_FROM

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: initial COPY_FROM (not viable for large objects)
Sage Weil [Wed, 28 Aug 2013 22:04:16 +0000 (15:04 -0700)]
osd: initial COPY_FROM (not viable for large objects)

Initial pass at COPY_FROM implementation.  This uses COPY_GET to read an
object from another OSD and write it locally.  It chunks the read but
accumulates it all in-memory and commits it at once, so it is only suitable
for smaller objects.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoobjecter, librados: add COPY_FROM operation
Sage Weil [Mon, 26 Aug 2013 23:24:16 +0000 (16:24 -0700)]
objecter, librados: add COPY_FROM operation

This operation will copy an entire object (data, attrs, omap)
atomically.  If the src_version does not match the source object, or
the source object is updated while the copy is in progress, we will
fail with a suitable error code.  By atomic we mean that it will either
successfully copy the entire object in its entirety or it will fail (and
require no cleanup).

Add to C++ librados API only for now.

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

src/include/ceph_strings.cc
src/include/rados.h
src/osd/osd_types.cc

11 years agodoc: Updated manual install to include sync agent, ARM packages, and DNS configuration.
John Wilkins [Tue, 3 Sep 2013 21:20:59 +0000 (14:20 -0700)]
doc: Updated manual install to include sync agent, ARM packages, and DNS configuration.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoceph_test_rados: add missing kick for rollback
Sage Weil [Tue, 3 Sep 2013 20:58:03 +0000 (13:58 -0700)]
ceph_test_rados: add missing kick for rollback

This was broken by the refactor in 96aaa5e3a371ade8b91ad9ab991d996eaef2cea5
and can make us hang.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agorgw: change watch init ordering, don't distribute if can't
Yehuda Sadeh [Thu, 29 Aug 2013 20:06:33 +0000 (13:06 -0700)]
rgw: change watch init ordering, don't distribute if can't

Backport: dumpling

Moving back the watch initialization after the zone init,
as the zone info holds the control pool name. Since zone
init might need to create a new system object (that needs
to distribute cache), don't try to distribute cache if
watch is not yet initialized.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoosd: provide better version bounds for cls_current_version and ENOENT replies
Greg Farnum [Tue, 3 Sep 2013 17:54:23 +0000 (10:54 -0700)]
osd: provide better version bounds for cls_current_version and ENOENT replies

Following the changes to when we set or increase the user_version, we
want to continue to return the best lower bound we can on the version
of any newly-created object. For ENOENT replies that means returning
info.last_user_version instead of the (potentially-zero) ctx->user_at_version.

Similarly, for cls_current_version we want to return the last version on
the PG rather than the last update to the object in order to provide
sensible version ordering across object deletes and creates.

Update the versions doc so it continues to be precise.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/wip-6179'
Sage Weil [Tue, 3 Sep 2013 17:07:26 +0000 (10:07 -0700)]
Merge remote-tracking branch 'gh/wip-6179'

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #562 from kri5/wip-4365
Yehuda Sadeh [Tue, 3 Sep 2013 15:49:32 +0000 (08:49 -0700)]
Merge pull request #562 from kri5/wip-4365

rgw: Allow wildcard in supported keystone roles.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: Allow wildcard in supported keystone roles. 455/head 562/head
Christophe Courtaut [Mon, 22 Jul 2013 13:15:38 +0000 (15:15 +0200)]
rgw: Allow wildcard in supported keystone roles.

http://tracker.ceph.com/issues/4365 fixes #4365

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoosd/ReplicatedPG: set user_version in waiting_for_commit replies
Sage Weil [Tue, 3 Sep 2013 00:08:04 +0000 (17:08 -0700)]
osd/ReplicatedPG: set user_version in waiting_for_commit replies

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not set ctx->user_at_version unless ctx->user_modify
Sage Weil [Sat, 31 Aug 2013 00:20:54 +0000 (17:20 -0700)]
osd/ReplicatedPG: do not set ctx->user_at_version unless ctx->user_modify

Leave ctx->user_at_version set to the previous oi.user_version unless/until
we find that ctx->user_modify is true.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not log a user_version on the snapdir object
Sage Weil [Sat, 31 Aug 2013 00:19:07 +0000 (17:19 -0700)]
osd/ReplicatedPG: do not log a user_version on the snapdir object

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: log previous user_version on clone
Sage Weil [Sat, 31 Aug 2013 00:18:21 +0000 (17:18 -0700)]
osd/ReplicatedPG: log previous user_version on clone

Nothing relies on this, but it makes sense to me.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not log user_version on deletion events
Sage Weil [Sat, 31 Aug 2013 00:22:26 +0000 (17:22 -0700)]
osd/ReplicatedPG: do not log user_version on deletion events

Or snap trim events where we are adjusting the head's snapdir attr.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/PG: only raise PG's last_user_version if entry is >
Sage Weil [Sat, 31 Aug 2013 00:15:56 +0000 (17:15 -0700)]
osd/PG: only raise PG's last_user_version if entry is >

We may have pg entries that do not increase the user_version at all (i.e.,
they may be 0).  Do not update the last_user_version in that case as we
need it to remain an upper bound.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: debug user_versions a bit
Sage Weil [Sat, 31 Aug 2013 00:06:30 +0000 (17:06 -0700)]
osd: debug user_versions a bit

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: fix dereference of NULL pg_pool_t
Sage Weil [Sun, 1 Sep 2013 15:42:23 +0000 (08:42 -0700)]
osdc/Objecter: fix dereference of NULL pg_pool_t

Make sure we don't dereference a NULL pointer.  Note that we check a
bit further down if the target pool does not exist and return the proper
error.

Bug was reliably reproduced by

 ./ceph_test_rados_api_watch_notify --gtest_filter=LibRadosWatchNotify.WatchNotifyTimeoutTestPP

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoValidate S3 tokens against Keystone
Roald J. van Loon [Fri, 9 Aug 2013 11:31:10 +0000 (13:31 +0200)]
Validate S3 tokens against Keystone

- Added config option to allow S3 to use Keystone auth
- Implemented JSONDecoder for KeystoneToken
- RGW_Auth_S3::authorize now uses rgw_store_user_info on keystone auth
- Minor fix in get_canon_resource; dout is now after the assignment

Reviewed-by: Yehuda Sadeh<yehuda@inktank.com>
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMerge pull request #561 from ceph/wip-6178
Sage Weil [Sat, 31 Aug 2013 23:46:52 +0000 (16:46 -0700)]
Merge pull request #561 from ceph/wip-6178

os: LevelDBStore: ignore ENOENT files when estimating store size

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'next'
Sage Weil [Sat, 31 Aug 2013 17:31:31 +0000 (10:31 -0700)]
Merge branch 'next'

11 years agomon: fix uninitialized Op field
Roald J. van Loon [Sat, 31 Aug 2013 17:30:14 +0000 (10:30 -0700)]
mon: fix uninitialized Op field

- Uninitialized field in MonitorLevelDB::Op causes random build errors.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoautomake cleanup: uninitialized version_t
Roald J. van Loon [Fri, 30 Aug 2013 21:05:52 +0000 (23:05 +0200)]
automake cleanup: uninitialized version_t

This sometimes gives a completely random uint64_t value, because it is
potentially used uninitialized.

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
11 years agoMerge pull request #541 from ceph/wip-6036
Sage Weil [Sat, 31 Aug 2013 00:02:49 +0000 (17:02 -0700)]
Merge pull request #541 from ceph/wip-6036

osd objecter; copy-get

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/ReplicatedPG: do not requeue if not primary 541/head
Sage Weil [Tue, 27 Aug 2013 22:01:02 +0000 (15:01 -0700)]
osd/ReplicatedPG: do not requeue if not primary

This saves us a bit of work, since we will discard the op anyway if
we aren't primary (or even if we become primary again before we get to
it).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: COPY_GET operation
Sage Weil [Tue, 27 Aug 2013 22:25:50 +0000 (15:25 -0700)]
osd: COPY_GET operation

Add new rados operation to copy all user-visible content for an object
in a simple, safe way.  Use a new object_copy_cursor_t to keep track of
our position.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: factor {execute,reply}_ctx() out of do_op()
Sage Weil [Sun, 25 Aug 2013 04:58:11 +0000 (21:58 -0700)]
osd/ReplicatedPG: factor {execute,reply}_ctx() out of do_op()

Separate the processing of an OpContext from the preamble and
allocation, so that we can delay the execution for some ops (like the
COPYFROM operation we're about to add).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: feed OSDMaps to the Objecter
Sage Weil [Sat, 17 Aug 2013 06:33:06 +0000 (23:33 -0700)]
osd: feed OSDMaps to the Objecter

Feed every map message we see (that isn't discarded for some other
reason) to the Objecter.  It has the same continuity requirements that
the OSD has, so it should be satisfied with what we get.  It can also
request maps via our MonClient.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add an Objecter instance
Sage Weil [Sat, 17 Aug 2013 06:17:03 +0000 (23:17 -0700)]
osd: add an Objecter instance

It gets its own lock, timer, and osdmap.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: discriminate based on connection messenger, not peer type
Sage Weil [Mon, 26 Aug 2013 20:58:47 +0000 (13:58 -0700)]
osd: discriminate based on connection messenger, not peer type

Replace ->get_source().is_osd() checks and instead see if it is the
cluster_messenger so that we do not confuse ourselves when we get
legit requests from other OSDs on our public interface.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-osd: rename msgr vars
Sage Weil [Sat, 17 Aug 2013 23:23:24 +0000 (16:23 -0700)]
ceph-osd: rename msgr vars

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: add a separate messenger for the Objecter
Sage Weil [Sat, 17 Aug 2013 06:03:26 +0000 (23:03 -0700)]
osd: add a separate messenger for the Objecter

We will give the OSD's Objecter its own messenger so that it does not
interfere with the OSD when it marks things up or down.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: add whitespace
Sage Weil [Mon, 19 Aug 2013 04:26:44 +0000 (21:26 -0700)]
osd/ReplicatedPG: add whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: less whitespace
Sage Weil [Sat, 17 Aug 2013 06:45:14 +0000 (23:45 -0700)]
osd: less whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: allow ops to be canceled
Sage Weil [Sun, 18 Aug 2013 00:01:53 +0000 (17:01 -0700)]
osdc/Objecter: allow ops to be canceled

This is useful in general, and specifically will be useful for the
rados COPY operation.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: only request map on startup if epoch == 0
Sage Weil [Sat, 17 Aug 2013 06:27:39 +0000 (23:27 -0700)]
osdc/Objecter: only request map on startup if epoch == 0

Normal clients have no map and need one to get started.  If we are the
OSD, we will already have one and will get fed maps as they come in.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd, objecter: clean up assert_ver()
Sage Weil [Sun, 25 Aug 2013 18:12:44 +0000 (11:12 -0700)]
osd, objecter: clean up assert_ver()

Create a separate union in the args and clean up the code a bit so that
this doesn't reuse the (unrelated) watch helpers.  No change in
protocol.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: drop src_obc.clear() calls
Sage Weil [Sat, 24 Aug 2013 04:34:28 +0000 (21:34 -0700)]
osd/ReplicatedPG: drop src_obc.clear() calls

These are all about to go out of scope; no need to clear them
explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/ObjectStore: add bufferlist variant of setattrs
Sage Weil [Wed, 21 Aug 2013 05:23:54 +0000 (22:23 -0700)]
os/ObjectStore: add bufferlist variant of setattrs

And hopefully we can kill the bufferptr ones someday!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agounittest_lfnindex testing older HASH_INDEX_TAG
David Zafman [Fri, 30 Aug 2013 23:17:16 +0000 (16:17 -0700)]
unittest_lfnindex testing older HASH_INDEX_TAG

Switch to work with new HOBJECT_WITH_POOL

fixes: #6196

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agodoc/rados/operations/pools: remove experimental note about pg splitting
Sage Weil [Fri, 30 Aug 2013 22:41:02 +0000 (15:41 -0700)]
doc/rados/operations/pools: remove experimental note about pg splitting

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #560 from ceph/wip-6032-cache-objecter
Sage Weil [Fri, 30 Aug 2013 22:24:41 +0000 (15:24 -0700)]
Merge pull request #560 from ceph/wip-6032-cache-objecter

Wip 6032 cache objecter

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #554 from ceph/wip-tier-interface
Gregory Farnum [Fri, 30 Aug 2013 21:13:25 +0000 (14:13 -0700)]
Merge pull request #554 from ceph/wip-tier-interface

Specify a user and pg_pool_t interface for tiering/caching specifications

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoworkunits: add a test for caching redirects 560/head
Greg Farnum [Thu, 29 Aug 2013 22:26:08 +0000 (15:26 -0700)]
workunits: add a test for caching redirects

This may need to change since it exploits some of the loose
consistency we currently have with caching pools, but for now
it checks that the Objecter does what we want.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agomon/OSDMonitor: 'osd tier {set,remove}-overlay <pool> [tierpool]' 554/head
Greg Farnum [Thu, 29 Aug 2013 00:49:48 +0000 (17:49 -0700)]
mon/OSDMonitor: 'osd tier {set,remove}-overlay <pool> [tierpool]'

Also prevent 'osd tier remove ...' if the tierpool is the current overlay.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd_types: note that write_tier wins if read_tier is different
Greg Farnum [Thu, 29 Aug 2013 20:58:04 +0000 (13:58 -0700)]
osd_types: note that write_tier wins if read_tier is different

For pg_pool_t.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoqa/workunits/cephtool/test.sh: test osd tier CLI
Greg Farnum [Thu, 29 Aug 2013 00:47:42 +0000 (17:47 -0700)]
qa/workunits/cephtool/test.sh: test osd tier CLI

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoObjecter: respect read_tier & write_tier for initial op submission
Greg Farnum [Thu, 29 Aug 2013 20:57:10 +0000 (13:57 -0700)]
Objecter: respect read_tier & write_tier for initial op submission

We overwrite target_oloc.pool with the appropriate [read|write]_tier.
write_tier wins if it matches both.
We don't handle any sort of redirect yet.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agomon/OSDMonitor: 'osd tier cache-mode <pool> <mode>'
Sage Weil [Tue, 27 Aug 2013 20:44:52 +0000 (13:44 -0700)]
mon/OSDMonitor: 'osd tier cache-mode <pool> <mode>'

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: be careful about precalculated pgids
Greg Farnum [Thu, 29 Aug 2013 20:52:35 +0000 (13:52 -0700)]
Objecter: be careful about precalculated pgids

The only current user of the precalc_pgid field is list_objects. That's
fine, but we don't want new users to inadvertently appear and somehow
break the caching/tiering stuff by forcing us to go to the base pool
when we should be talking to somebody else. Add an assert to catch
these cases.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: add an Op::target_oloc and use it instead of base_oloc in send_op()
Greg Farnum [Thu, 29 Aug 2013 20:12:41 +0000 (13:12 -0700)]
Objecter: add an Op::target_oloc and use it instead of base_oloc in send_op()

For now we simply set target_oloc = base_oloc in recalc_op_target(), but
we will shortly be doing more interesting things with it there.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: rename Op::oloc -> Op::base_oloc
Greg Farnum [Thu, 29 Aug 2013 20:08:03 +0000 (13:08 -0700)]
Objecter: rename Op::oloc -> Op::base_oloc

We want to be able to target other pools for caching and tiering, so
we need to take an oloc from the client and translate it into an
actual target. Rename oloc to base_oloc to make clear which one it is.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #530 from ceph/wip-monc-leak
João Eduardo Luís [Fri, 30 Aug 2013 17:36:07 +0000 (10:36 -0700)]
Merge pull request #530 from ceph/wip-monc-leak

mon/MonClient: release pending outgoing messages on shutdown

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoos: LevelDBStore: ignore ENOENT files when estimating store size 561/head
Joao Eduardo Luis [Fri, 30 Aug 2013 17:05:33 +0000 (18:05 +0100)]
os: LevelDBStore: ignore ENOENT files when estimating store size

While iterating over the store files we race against leveldb, which may
be shuffling data around thus removing some files.

By ignoring missing files on stat, we'll get to not account those files
but that's okay -- this is just an estimate.

Fixes: #6178
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
11 years agoceph-post-file: use mktemp instead of tempfile
Sage Weil [Fri, 30 Aug 2013 16:41:29 +0000 (09:41 -0700)]
ceph-post-file: use mktemp instead of tempfile

tempfile is a debian thing, apparently; mktemp is present everywhere.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #559 from ceph/wip-osd-rollback
Sage Weil [Thu, 29 Aug 2013 23:34:42 +0000 (16:34 -0700)]
Merge pull request #559 from ceph/wip-osd-rollback

fixes a few osd dout bugs; make rados model behave with rollback

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoceph_test_rados: rollback bumps user_version 559/head
Sage Weil [Thu, 29 Aug 2013 23:08:44 +0000 (16:08 -0700)]
ceph_test_rados: rollback bumps user_version

Sigh.  This doesn't make much intuitive sense to me, but this is how it
currently works.

Switch to using the async api while we are at it.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoPGLog: initialize writeout_from in PGLog constructor
Samuel Just [Thu, 29 Aug 2013 22:08:58 +0000 (15:08 -0700)]
PGLog: initialize writeout_from in PGLog constructor

Fixes: 6151
Backport: dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
Introduced: f808c205c503f7d32518c91619f249466f84c4cf
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon/OSDMonitor: 'osd pool tier <add|remove> <pool> <tierpool>'
Sage Weil [Tue, 27 Aug 2013 20:43:09 +0000 (13:43 -0700)]
mon/OSDMonitor: 'osd pool tier <add|remove> <pool> <tierpool>'

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/OSDMonitor: avoid polluting pending_inc on error for 'osd pool set ...'
Sage Weil [Tue, 27 Aug 2013 19:47:53 +0000 (12:47 -0700)]
osd/OSDMonitor: avoid polluting pending_inc on error for 'osd pool set ...'

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd_types: add pg_pool_t cache-related fields
Sage Weil [Mon, 26 Aug 2013 22:59:54 +0000 (15:59 -0700)]
osd_types: add pg_pool_t cache-related fields

We add fields sufficient to specify
* many pools have a tiering relationship with pool foo
* pool foo is a tier pool for pool bar
* the tiering relationship between foo and bar is specified
  by cache_mode
* client reads and writes for pool foo should be directed to
  pools bar and baz, respectively (where probably, but not
  necessarily, baz == bar or baz == foo).

This lets us specify very sophisticated caching policies on
the server side that all clients going forward can handle
simply by directing the messages as the read_tier and write_tier
flags, and the (not-yet-implemented) redirect replies
from OSDs, specify.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/ReplicatedPG: drop dout from object_context_destructor_callback
Sage Weil [Thu, 29 Aug 2013 21:28:11 +0000 (14:28 -0700)]
osd/ReplicatedPG: drop dout from object_context_destructor_callback

We don't hold the pg lock; cannot call dout here.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: remove debug lines from snapset_context get/put
Sage Weil [Thu, 29 Aug 2013 21:27:46 +0000 (14:27 -0700)]
osd/ReplicatedPG: remove debug lines from snapset_context get/put

The dout() prefix does get_osdmap(), which requires (and asserts) that we
hold the pg lock, but in some cases we do not, notably
ReplicatedPG::object_context_destructor_callback.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #556 from ceph/wip-user-version
Sage Weil [Thu, 29 Aug 2013 18:39:33 +0000 (11:39 -0700)]
Merge pull request #556 from ceph/wip-user-version

make ceph_test_rados / RadosModel validate the versions exposed by librados

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agorgw: Fix S3 auth when using response-* query string params
Sylvain Munaut [Thu, 29 Aug 2013 14:17:30 +0000 (16:17 +0200)]
rgw: Fix S3 auth when using response-* query string params

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
11 years agoceph.spec.in: remove trailing paren in previous commit
Gary Lowell [Thu, 22 Aug 2013 20:29:32 +0000 (13:29 -0700)]
ceph.spec.in:  remove trailing paren in previous commit

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
11 years agoceph.spec.in: Don't invoke debug_package macro on centos.
Gary Lowell [Thu, 22 Aug 2013 18:07:16 +0000 (11:07 -0700)]
ceph.spec.in:  Don't invoke debug_package macro on centos.

If the redhat-rpm-config package is installed, the debuginfo rpms will
be built by default.   The build will fail when the package installed
and the specfile also invokes the macro.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
11 years agoMerge pull request #361 from atwardowski/patch-1
Yehuda Sadeh [Thu, 29 Aug 2013 00:54:26 +0000 (17:54 -0700)]
Merge pull request #361 from atwardowski/patch-1

Update adminops.rst add capabilities

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoceph_test_rados: validate user_version 556/head
Sage Weil [Wed, 28 Aug 2013 23:34:36 +0000 (16:34 -0700)]
ceph_test_rados: validate user_version

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: set version, user_version correctly on reads
Sage Weil [Wed, 28 Aug 2013 23:29:16 +0000 (16:29 -0700)]
osd/ReplicatedPG: set version, user_version correctly on reads

Set the user version to the *current* object version, not the version
we would use if we were to modify it.  We move the assignments inside
the reply (read or error) block to make it more obvious which paths
are possible.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomessages/MOSDOpReply: fix user_version in reply (add missing braces)
Sage Weil [Wed, 28 Aug 2013 23:22:34 +0000 (16:22 -0700)]
messages/MOSDOpReply: fix user_version in reply (add missing braces)

Presumbly a mismerge somewhere back around
de20997445803dca4225ed0dac1bad6a8a1e6512.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolibrados: add get_version64()
Sage Weil [Wed, 28 Aug 2013 22:41:31 +0000 (15:41 -0700)]
librados: add get_version64()

The C++ AioCompletion::get_version() method only returns 32-bits.  Sigh.

Add a get_version64() method that returns all 64-bits. Do not touch the
32-bit version to avoid breaking the ABI.

Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #550 from ceph/wip-6040
athanatos [Wed, 28 Aug 2013 21:10:37 +0000 (14:10 -0700)]
Merge pull request #550 from ceph/wip-6040

Wip 6040

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>
11 years agoPGLog: maintain writeout_from and trimmed 550/head
Samuel Just [Tue, 27 Aug 2013 15:49:14 +0000 (08:49 -0700)]
PGLog: maintain writeout_from and trimmed

This way, we can avoid omap_rmkeyrange in the common append
and trim cases.

Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agodoc/release-notes: v0.56.6 and .7 bobtail
Sage Weil [Wed, 28 Aug 2013 17:23:58 +0000 (10:23 -0700)]
doc/release-notes: v0.56.6 and .7 bobtail

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #539 from dachary/master
Sage Weil [Wed, 28 Aug 2013 17:29:17 +0000 (10:29 -0700)]
Merge pull request #539 from dachary/master

doc : erasure code developer notes updates

11 years agoMerge pull request #552 from ceph/wip-4924-master
João Eduardo Luís [Wed, 28 Aug 2013 17:08:31 +0000 (10:08 -0700)]
Merge pull request #552 from ceph/wip-4924-master

mon: discover mon addrs, names during election state too

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: discover mon addrs, names during election state too 552/head
Sage Weil [Wed, 28 Aug 2013 16:50:11 +0000 (09:50 -0700)]
mon: discover mon addrs, names during election state too

Currently we only detect new mon addrs and names during the probing phase.
For non-trivial clusters, this means we can get into a sticky spot when
we discover enough peers to form an quorum, but not all of them, and the
undiscovered ones are enough to break the mon ranks and prevent an
election.

One way to work around this is to continue addr and name discovery during
the election.  We should also consider making the ranks less sensitive to
the undefined addrs; that is a separate change.

Fixes: #4924
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Tested-by: Bernhard Glomm <bernhard.glomm@ecologic.eu>
11 years agodoc/dev/cache-pool: document cache pool management interface
Sage Weil [Mon, 26 Aug 2013 23:57:58 +0000 (16:57 -0700)]
doc/dev/cache-pool: document cache pool management interface

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoadd CEPH_FEATURE_OSD_CACHEPOOL
Sage Weil [Mon, 26 Aug 2013 22:11:43 +0000 (15:11 -0700)]
add CEPH_FEATURE_OSD_CACHEPOOL

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #549 from ceph/wip-6029
Gregory Farnum [Wed, 28 Aug 2013 16:15:36 +0000 (09:15 -0700)]
Merge pull request #549 from ceph/wip-6029

Make user_version a first-class citizen
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
11 years agoPGLog: don't maintain log_keys_debug if the config is disabled
Samuel Just [Tue, 27 Aug 2013 14:27:26 +0000 (07:27 -0700)]
PGLog: don't maintain log_keys_debug if the config is disabled

Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPGLog: move the log size check after the early return
Samuel Just [Tue, 27 Aug 2013 06:19:45 +0000 (23:19 -0700)]
PGLog: move the log size check after the early return

There really are stl implementations (like the one on my ubuntu 12.04
machine) which have a list::size() which is linear in the size of the
list.  That assert, therefore, is quite expensive!

Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge remote-tracking branch 'origin/master' into wip-6029 549/head
Greg Farnum [Wed, 28 Aug 2013 00:26:36 +0000 (17:26 -0700)]
Merge remote-tracking branch 'origin/master' into wip-6029

Conflicts:
src/librados/AioCompletionImpl.h