Commit Graph

24462 Commits

Author SHA1 Message Date
David Zafman
edd0a1c69f Fix FileStore to notice if filestore_flusher config is changed
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-07 17:59:31 -08:00
Sage Weil
de62a79589 Merge branch 'wip-traceless'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-07 17:52:26 -08:00
Sage Weil
eb9b5f074f client: move annoying traceless handling into verify_reply_trace()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3f1b7fd590 client: debug async cache invalidation
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3a7233bc8b mds: pass created_ino back to client on replayed requests
After an MDS restart, the client will resend uncommitted requests.  Use the
information we now have in the session_info_t to pass the created ino
back via the extra_bl payload in the reply.

Fixes: #4034
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
0bcf2ac081 mds: track created inos with completed request ids in session info
Along with each session completed request (tid), also track the created
ino (if any).  This will be used to pass back to the client when they
replay requests in the next patch.

Do not bother making this a backward compatible encoding.  The only
benefit is to allow ceph-mds code to run and then old mds code to run
after it.  Given all of the other incompat changes we *just* made, this
is highly unlikely and not worth the code clutter.  If we had spanned
more releases or a stable release the story would be different.

While we are here, inline the second add_completed_request() method variant
since there is only a single caller and having it overloaded somewhat
obscures what is going on.  This also avoids a duplicate lookup in the
session map in the have_session() check and then in the (old) helper.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:56 -08:00
Sage Weil
977a1cb257 client: debug created ino
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:42:47 -08:00
Sage Weil
974dc84f6e client: unlink old_dentry on traceless rename reply
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:42:44 -08:00
Sage Weil
bc92b40617 client: force lookup on traceless reply
Call _do_lookup directly so that we avoid hitting the cache

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
0d501f6121 client: make _do_lookup take a const string
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
31127548bd mds: do not do traceless reply for open O_TRUNC requests
Even though these are "may_write" and may be a mutation, the MDS should not
fake out a traceless reply.  In a real failure, it looks like:

 - mds process request (mutation)
 - mds fails
 - client resends request
 - mds notes that it is O_TRUNC, and already committed, and proceeds with
   a regular open

And that is all fine.

But, that means that if we are trying to simulate this behavior without a
failure, then we should never do a traceless reply on an O_TRUNC request,
because the client will never see such a reply--it'll get a full open
request response instead.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
98a383be2e client: handle fh cleanup in ll_create() failure path
Release the fh if we fail the permissions check.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
d87035c0c4 client: root can write to any file
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
613c8f1edf client: clear I_COMPLETE on traceless reply for dentry request
If a request is against a dentry, and we get a traceless reply, clear
the directory I_COMPLETE flag on the parent directory because we can no
longer trust that our cache is complete.

It is possible we could do something a bit more intelligent here, but it
is not trivial because of racing requests, and traceless replies are
rare, so it's not worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
80e122f5e8 client: pass ptarget from link, create, mkdir, symlink, setattr
Use the new make_request functionality to ensure that we properly handle
the re-lookup/getattr when we get a traceless reply back from the MDS.

Note that we have to do this on setattr() because ll_getattr() expects to
return the updated inode metadata to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
29abaf66ad client: handle traceless replies from make_request()
Modify the generic make_request wrapper to retry lookups or getattrs on
requests when the ptarget pointer is specified but there is no trace in
the reply.

Refactor the _create() method to use this, effectively moving all of the
extra_bl code processing into make_request where it is generically
useful.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 15:22:21 -08:00
Sage Weil
a714c16656 vstart.sh: osd debug op order = true
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 09:28:17 -08:00
David Zafman
e1e2d5d217 Missed adding rados_types.hpp to package
Caused by 3bd48cbbad
feature 4207 implementation

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-03-06 14:40:29 -08:00
Sage Weil
439d0e334d osd: add ctor for clone_info
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-06 10:21:59 -08:00
Sage Weil
1e01b045d3 Merge remote-tracking branch 'gh/wip-expose-topo'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-06 08:11:26 -08:00
Sage Weil
de31531da3 Merge pull request #90 from grosskur/fix-debian-libsnappy
debian: require libsnappy-dev for ceph
2013-03-06 07:54:13 -08:00
Alan Grosskurth
a319f5cb74 debian: require libsnappy-dev for ceph
Debian builds are currently broken without this requirement.
2013-03-06 02:21:12 -08:00
Noah Watkins
ee158ed267 libcephfs: return osd location from crush map
Adds ceph_get_osd_crush_location that returns a list of (type,name)
pairs for devices that exist between a given osd and the root of the
bucket hierarchy.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-05 23:18:07 -08:00
Gary Lowell
e694ea58c2 release-process.rst: Fix typos
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-03-05 22:08:15 -08:00
Noah Watkins
e8da4bf9b5 client: expose extent/osd mapping
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-05 16:04:55 -08:00
Sage Weil
8184b68c37 Merge branch 'wip-prepare'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Tested-by: Tamil Muthamizhan <tamil.muthamizhan@inktank.com>
2013-03-05 13:33:05 -08:00
Sage Weil
32407c994f ceph-disk-prepare: move in-use checks to the top, before zap
Move the in-use checks to the very top, before we (say) zap!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-05 13:08:26 -08:00
Sage Weil
8550e5c6ab doc/release-notes: v0.58
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-05 11:03:08 -08:00
carsonoid
b244b87f28 Update doc/radosgw/s3/python.rst
Note about creating conn object for non-ssl implementations.
2013-03-05 11:03:08 -08:00
David Zafman
3bd48cbbad Merge branch 'wip-4207'
Feature: #4207: osd/librados: add ops to list snaps for an object

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reported-by: Sam Just <sam.just@inktank.com>
2013-03-05 10:26:29 -08:00
Gary Lowell
af6b6eddae Merge branch 'master' of https://github.com/ceph/ceph 2013-03-05 09:06:24 -08:00
Gary Lowell
66cadbe515 Merge branch 'next' 2013-03-05 09:05:21 -08:00
David Zafman
7cd1cb2f9e Add list_snaps() calls to snapshots test cases
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 23:16:50 -08:00
David Zafman
818f3d298e Add rados listsnaps command
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 23:16:50 -08:00
David Zafman
db4ccc0827 osd/librados: add op to list clones/snaps for an object
Returning snap_set_t with clone info
and snapshots in ascending order
Add clones with snapshots to obj_list_snap_response_t
New rados_types.hpp with snap_set_t/clone_info_t
Move snap_t to rados_types.hpp
Add generate_test_instances() and TYPE() to encoding/types.h

Feature: #4207

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 23:16:43 -08:00
David Zafman
3b5933e0a0 Remove unused SnapContext in librados.hpp
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 21:35:00 -08:00
David Zafman
1ebfb41455 osd: Improve snapshot test
In SelfManagedSnapRollbackPP add some overlapping writes
New SelfManagedSnapOverlap creates overlapping writes

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 21:35:00 -08:00
David Zafman
84183303a6 osd: correct comment
SnapSet snaps are in descending order

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-04 21:35:00 -08:00
Sage Weil
a6196de9e2 ceph-disk-prepare: verify device is not in use by device-mapper
Be nice and tell the user which devices/mappings are consuming the device,
too.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 20:57:52 -08:00
Sage Weil
3bd0ac0ab0 ceph-disk-prepare: verify device is not mounted before using
Make sure the data and/or journal device(s) are not in use (mounted)
before using them.  Make room for additional "in-use" checks in the future.

Closes: #3256
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 17:30:13 -08:00
Josh Durgin
867586c674 debian: require >= python2.6 for ceph as well
ceph-disk-prepare and ceph-disk-activate use the with statement,
str.format, and possibly other new features from python 2.6.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-04 16:49:14 -08:00
Sage Weil
f03f62697f ceph-disk-prepare: clean up stupid check for a digit
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 16:29:57 -08:00
Sage Weil
59505546e5 ceph-disk-prepare: use os.path.realpath()
My janky symlink resolution is broken in various ways.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 16:08:15 -08:00
Gary Lowell
ba3f91e750 v0.58 2013-03-04 15:18:24 -08:00
Filippos Giannakos
66df847e00 Add X-Python-Version >=2.6 to debian control file.
python-ceph complains when installed to debian squeeze about the 'with'
statement. Apparently installation tries to install the python-ceph package for
python 2.5, which does not support the 'with' statement natively.

Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
2013-03-04 15:10:00 -08:00
Samuel Just
a06ea30f84 PG,ReplicatedPG: use pg_has_reset_since to discard old async events
Local async events are obsolete if the pg is deleting or if the
epoch at which they were created is prior to last_peering_reset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 62999ea2d3)
2013-03-04 13:54:06 -08:00
Samuel Just
83e9aa5038 PG::build_scrub_map: detect race with peering via last_peering_reset
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 67225339dc)
2013-03-04 13:54:04 -08:00
Samuel Just
9e4722595c ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 04ee8f478b)
2013-03-04 13:53:59 -08:00
Samuel Just
3e596678fd ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted
What we really care about is that the epoch in which the Context
was submitted is at complete() time >= last_peering_reset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit a01dea6af9)
2013-03-04 13:53:55 -08:00
Sage Weil
2a7e802d69 init-ceph: fix --restart option
Reported-by: Bryan K. Wright <bkw1a@ayesha.phys.virginia.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-04 12:34:58 -08:00