Commit Graph

25150 Commits

Author SHA1 Message Date
Sage Weil
76a5ee3e21 Merge remote-tracking branch 'gh/wip-4556'
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-27 13:21:24 -07:00
Sage Weil
89c69016e1 osd: disallow classes with flags==0
They must be RD, WR, or something....

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-27 13:19:03 -07:00
Sage Weil
f2dda43c9e osd: EINVAL when rmw_flags is 0
A broken client (e.g., v0.56) can send a request that ends up with an
rmw_flags of 0.  Treat this as invalid and return EINVAL.

Fixes: #4556
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-27 13:09:31 -07:00
Sage Weil
50b831e364 osd: fix detection of non-existent class method
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-27 13:09:31 -07:00
Sage Weil
21a09b147d Merge pull request #141 from ceph/wip-rgw-zone-config
Wip rgw zone config

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-27 13:04:50 -07:00
David Zafman
b0103abdee OSD fails to start with error assert(values.size() == 2)
Remove redundant setting of dirty_info
Fix PG::upgrade() to conform to programming style
Set dirty_big_info in PG::write_info for upgrades

BUG: #4562

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-27 11:11:39 -07:00
athanatos
c8317dde73 Merge pull request #148 from dachary/wip-4542
fix append to uninitialized buffer in FlatIndex::created

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-27 11:00:14 -07:00
Joe Buck
4485cb87ce Merge pull request #153 from dalgaaf/wip-da-java
Fix some small java issues
2013-03-27 10:08:24 -07:00
Sage Weil
0d98815b23 Merge pull request #160 from alram/master
Fix radosgw upstart job

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-27 09:59:50 -07:00
Alexandre Marangone
4db4a022c3 Fix radosgw upstart job
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
2013-03-27 09:31:07 -07:00
Sage Weil
d4961e0ca3 Merge pull request #158 from alram/master
Change ceph apt recipe to repo in doc
2013-03-27 09:18:49 -07:00
Sam Lang
5aa5bc2cae mds: Delay session close if in clientreplay
If the mds is in clientreplay, a session close
request needs to be delayed until it reaches
active.  Otherwise, the session state gets set to
'closing', and the replay requests get dropped on the
floor.

Fixes #4564.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-27 11:06:28 -05:00
Alexandre Marangone
9369f91871 Change ceph::apt -> ceph::repo in doc
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
2013-03-27 09:01:01 -07:00
Sage Weil
54f538531e Merge pull request #156 from dalgaaf/wip-da-fix-mkcephfs
Fix issues in mkcephfs

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-27 08:52:41 -07:00
Danny Al-Gaaf
98f6a25c03 mkcephfs.in: use 32 chars for mktemp to be more unique
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 16:50:12 +01:00
Sage Weil
68901575e2 Merge pull request #152 from dalgaaf/wip-da-fix-misc
MDS.cc: remove double is_clientreplay() check in active_start()

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-27 08:28:49 -07:00
Sage Weil
295c92ce91 Merge pull request #157 from ceph/wip-4539
mds: Clear backtrace updates on standby_trim_seg

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-27 08:26:25 -07:00
Danny Al-Gaaf
2cb9f96314 mkcephfs.in: cleanup rdir in MON case
Remove $rdir in MON case of 'mkcephfs -a' as soon as it's no
longer needed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 16:03:20 +01:00
Danny Al-Gaaf
a8338ee1a8 mkcephfs.in: provide a valid rdir for MONs on -a
Provide also a valid rdir for ssh as in case of OSD/MDS hosts if
mkcephfs -a is called.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 15:55:56 +01:00
Danny Al-Gaaf
38f845deb0 mkcephfs.in: use mktemp instead of dd+md5sum+awk
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 15:40:58 +01:00
Sam Lang
0e009b1bb3 mds: Clear backtrace updates on standby_trim_seg
If the mds is standby, when a segment is trimmed, we need
to clear the backtrace updates list to avoid the following
assertion when the segment is deleted.

./include/elist.h: 92: FAILED assert(_head.empty())
ceph version 0.59-478-g8befbca (8befbca77a)
(MDLog::standby_trim_segments()+0xce5) [0x6ccec5]
(MDS::C_MDS_StandbyReplayRestartFinish::finish(int)+0x39) [0x4e86b9]
(Journaler::_finish_reprobe(int, unsigned long, Context*)+0x190)
[0x6d3210]
(Filer::_probed(Filer::Probe*, object_t const&, unsigned long,
utime_t)+0x558) [0x704a88]
(Objecter::C_Stat::finish(int)+0xc0) [0x705900]
(Objecter::handle_osd_op_reply(MOSDOpReply*)+0xe38) [0x6f1df8]
(MDS::handle_core_message(Message*)+0xae8) [0x4dc318]
(MDS::_dispatch(Message*)+0x2f) [0x4dc4df]
(MDS::ms_dispatch(Message*)+0x1db) [0x4ddf7b]
(DispatchQueue::entry()+0x341) [0x81f561]
(DispatchQueue::DispatchThread::entry()+0xd) [0x79c6ad]
(()+0x7e9a) [0x7f346bb9ee9a]
(clone()+0x6d) [0x7f346a3574bd]

Fixes #4539.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-27 09:35:08 -05:00
Danny Al-Gaaf
0c43ac32a2 ceph_common.sh: fix typo in comment
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 14:37:49 +01:00
Danny Al-Gaaf
17029a6c7a java libcephfs: add serialVersionUID to some Exception classes
Fix for: "The serializable class does not declare a static final
serialVersionUID field" warning.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 12:38:03 +01:00
Danny Al-Gaaf
10191a9c0f CephMount.java: remove unused import
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 12:37:34 +01:00
Danny Al-Gaaf
8c962b5e3f MDS.cc: remove double is_clientreplay() check in active_start()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-27 11:05:11 +01:00
Sage Weil
3f2e71169a mon: fix crush_ops.sh tests
Make it work.  Also, make note that these aren't handled idempotently by
the mon currently.  Doh!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-26 22:47:37 -07:00
Sage Weil
ae993c47c4 Merge remote-tracking branch 'gh/next' 2013-03-26 18:19:27 -07:00
Samuel Just
76b296f01f ReplicatedPG: send entire stats on OP_BACKFILL_FINISH
Otherwise, we update the stat.stat structure, but not the
stat.invalid_stats part.  This will result in a recently
split primary propogating the invalid stats but not the
invalid marker.  Sending the whole pg_stat_t structure
also mirrors MOSDSubOp.

Fixes: #4557
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-26 17:21:51 -07:00
Sage Weil
8eb2274011 Merge remote-tracking branch 'gh/next' 2013-03-26 17:05:48 -07:00
Joe Buck
503ed9ee49 testing: fix hadoop-internal-test
Remove now superfluous directory changes
that are causing tests to fail.
This code should have been removed when we transitioned
from running tests with Ant to using Java to run the tests.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-26 16:08:51 -07:00
Sage Weil
75bf193764 Merge pull request #149 from ceph/wip-4530
#4530

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-26 15:13:24 -07:00
Joe Buck
ebc3abaf6d Merge pull request #139 from ceph/wip-topo-java
Merging in Noah's branch for adding topology calls. This passes existing libcephfs, libcephfs-java and hadoop tests.
2013-03-26 15:09:19 -07:00
Sam Lang
7c1e9be0e9 client: Don't signal requests already handled
The assertion failure reported in #4530 is triggered
by the following:

1. client sends request
2. mds sends unsafe reply
3. before request gets journaled, mds is killed
4. mds restarts
5. client receives session close (from close request before restart)
6. session close does kick_requests()
7. kick_requests tries to signal caller that doesn't exist.

This fix avoids signaling a caller if the unsafe reply
has been received and the make_request() function has completed.
We do this by setting the caller_cond to null once the caller
is woken up, and only signal the caller in kick_requests if
caller_cond is non-null.  This avoids trying to resend requests
listed in mds_request but that have already received unsafe replies.
The unsafe requests are handled by resend_unsafe_requests() code,
so skipping those requests is allowable.

Fixes #4530.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-26 17:08:49 -05:00
Loic Dachary
77230d434a fix append to uninitialized buffer in FlatIndex::created
The long_name variable is not initialized. When the append_oname
function is called, it will strlen(long_name) and get a result
that depends on the stack content. The long_name is truncated to a
zero length string to prevent this unexpected behavior.

There is no sure way to trigger the problem by writing a unit
test. Unit tests are added for all public methods of the FlatIndex
class. Most of the time the tests fail if the long_name variable is
not properly initialized.

 * uint32_t collection_version()
 * coll_t coll() const
 * void set_ref(std::tr1::shared_ptr<CollectionIndex> ref)
 * int cleanup()
 * int init()
 * int created(const hobject_t &hoid, const char *path)
 * int unlink(const hobject_t &hoid)
 * int lookup(const hobject_t &hoid, IndexedPath *path, int *exist)
 * int collection_list(vector<hobject_t> *ls)
 * int collection_list_partial(const hobject_t &start, int min_count, int max_count, snapid_t seq, vector<hobject_t> *ls, hobject_t *next)

There are a number of border cases that cannot be tested, such as the
logic of the lfn_get static function. Since FlatIndex code is designed
to transition from older namespace conventions, it is difficult to
figure out.

The tests rely on xattr(2) and their availability is checked before
running them.

http://tracker.ceph.com/issues/4542 refs #4542

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-03-26 16:28:06 -04:00
Sage Weil
b8160018bd Merge pull request #144 from dalgaaf/wip-da-ceph-disk
Fix some issues in ceph-dsk

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-26 12:06:41 -07:00
Sage Weil
1baf66b9ee Merge pull request #143 from ceph/wip-mds-health
improve mds health checks

Reviewed-by: Sam Lang <sam.lang@inktank.com>
2013-03-26 11:44:29 -07:00
Gary Lowell
9eda8e5d5a ceph-disk: udevadm settle before partprobe
After changing the partition table, allow the udev event to be
processed before calling partprobe.  This helps prevent partprobe
from getting a resource busy error on some platforms.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-03-26 11:31:16 -07:00
Sage Weil
23faa9f050 Merge pull request #147 from ceph/wip-4537
mds: CInode::build_backtrace() always incr iter

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-26 09:29:42 -07:00
Sam Lang
14cef276f1 mds: CInode::build_backtrace() always incr iter
Always increment the iterator when adding old pools
to the backtrace.  This fixes a bug on files where
the layout had been set to a different pool and then
back to the same pool, causing continuous looping in
the build_backtrace() function.

Fixes #4537.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-26 11:14:52 -05:00
Noah Watkins
bb68a20fb4 java: fix test name typo
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-26 09:06:14 -07:00
Sage Weil
67c696dfac Merge pull request #145 from dalgaaf/wip-da-c_str
CrushWrapper.cc: remove some std::string::c_str() calls

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-26 08:15:53 -07:00
Sam Lang
b9141e9493 client: Cleanup request signaling
Split up the conditionals handling unsafe reply
and signaling the caller to improve readability.
The overall behavior of the code remains the same.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-26 09:25:19 -05:00
Sam Lang
3b520b5173 client: Handle duplicate safe replies
If the mds sends a duplicate safe reply, the mds_requests
map won't contain a matching request id (tid).  Instead of
assert failing, we log a message that we saw a reply without
a matching request.

Also remove redundant mds_requests->erase(tid) line.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-26 09:25:18 -05:00
Sam Lang
dfb46b9a32 client: Always cleanup request after safe
The client MetaRequest should always be cleaned up
and removed from the mds_requests map once the client
gets a safe reply.  This patch avoids a leak where the
mds does not send back an unsafe reply and the request
is never cleaned up.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-26 09:25:18 -05:00
Sam Lang
4dda138b07 client: Remove got_safe from MetaRequest
Once a safe reply is received, we remove the
request from the mds_requests map, so checking that
it might be a duplicate won't succeed.  This patch
removes the got_safe checks in the reply handling code
and the got_safe field on the MetaRequest to avoid confusion.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-26 09:25:18 -05:00
Danny Al-Gaaf
f957e72345 CrushWrapper.cc: remove some std::string::c_str() calls
Passing the result of c_str() to a function that takes
std::string as argument is slow and redundant.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-26 12:46:46 +01:00
Sage Weil
ffe8235f34 Merge remote-tracking branch 'gh/wip-crush'
The non-crush bits
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-03-25 16:29:56 -07:00
Sage Weil
7f65c5129a doc/release-notes: extra note for v0.56.4
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-25 16:24:48 -07:00
Sage Weil
82b129ff0d doc/release-notes: v0.56.4
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-25 16:09:24 -07:00
David Zafman
491795e234 Improve test by getting cloneid from my_snaps vector
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-25 11:42:35 -07:00