]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agorados: remove confusing argument echo on error 167/head
Dan Mick [Thu, 28 Mar 2013 17:10:26 +0000 (10:10 -0700)]
rados: remove confusing argument echo on error

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agolibrados.h: fix comment describing rados_pool_list
Dan Mick [Thu, 28 Mar 2013 07:17:00 +0000 (00:17 -0700)]
librados.h: fix comment describing rados_pool_list

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoradosgw-admin: fix help clitest
Sage Weil [Thu, 28 Mar 2013 04:35:49 +0000 (21:35 -0700)]
radosgw-admin: fix help clitest

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 28 Mar 2013 04:27:16 +0000 (21:27 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoMerge pull request #159 from ceph/wip-4564
Sage Weil [Thu, 28 Mar 2013 04:20:50 +0000 (21:20 -0700)]
Merge pull request #159 from ceph/wip-4564

mds: Delay session close if in clientreplay

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Updated usage.
John Wilkins [Thu, 28 Mar 2013 00:13:18 +0000 (17:13 -0700)]
doc: Updated usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Updated usage.
John Wilkins [Wed, 27 Mar 2013 23:50:26 +0000 (16:50 -0700)]
doc: Updated usage.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoceph-disk: conditionally remove mount path
Sage Weil [Wed, 27 Mar 2013 19:45:29 +0000 (12:45 -0700)]
ceph-disk: conditionally remove mount path

umount removes it on success; only remove it here if it is still there.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk: ignore udevadm settle return code
Sage Weil [Wed, 27 Mar 2013 00:04:14 +0000 (17:04 -0700)]
ceph-disk: ignore udevadm settle return code

If we time out, just continue and let the next step fail.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: try udevadm settle if osd journal isn't present
Sage Weil [Tue, 26 Mar 2013 23:04:54 +0000 (16:04 -0700)]
upstart: try udevadm settle if osd journal isn't present

Wait briefly for the journal to appear if it isn't there yet, then give up.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-4556'
Sage Weil [Wed, 27 Mar 2013 20:21:24 +0000 (13:21 -0700)]
Merge remote-tracking branch 'gh/wip-4556'

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: disallow classes with flags==0
Sage Weil [Wed, 27 Mar 2013 20:19:03 +0000 (13:19 -0700)]
osd: disallow classes with flags==0

They must be RD, WR, or something....

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: EINVAL when rmw_flags is 0
Sage Weil [Wed, 27 Mar 2013 19:59:41 +0000 (12:59 -0700)]
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>
12 years agoosd: fix detection of non-existent class method
Sage Weil [Wed, 27 Mar 2013 20:08:38 +0000 (13:08 -0700)]
osd: fix detection of non-existent class method

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #141 from ceph/wip-rgw-zone-config
Sage Weil [Wed, 27 Mar 2013 20:04:50 +0000 (13:04 -0700)]
Merge pull request #141 from ceph/wip-rgw-zone-config

Wip rgw zone config

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoOSD fails to start with error assert(values.size() == 2)
David Zafman [Wed, 27 Mar 2013 18:06:07 +0000 (11:06 -0700)]
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>
12 years agoMerge pull request #148 from dachary/wip-4542
athanatos [Wed, 27 Mar 2013 18:00:14 +0000 (11:00 -0700)]
Merge pull request #148 from dachary/wip-4542

fix append to uninitialized buffer in FlatIndex::created

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge pull request #153 from dalgaaf/wip-da-java
Joe Buck [Wed, 27 Mar 2013 17:08:24 +0000 (10:08 -0700)]
Merge pull request #153 from dalgaaf/wip-da-java

Fix some small java issues

12 years agoMerge pull request #160 from alram/master
Sage Weil [Wed, 27 Mar 2013 16:59:50 +0000 (09:59 -0700)]
Merge pull request #160 from alram/master

Fix radosgw upstart job

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoFix radosgw upstart job 160/head
Alexandre Marangone [Wed, 27 Mar 2013 16:31:07 +0000 (09:31 -0700)]
Fix radosgw upstart job

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
12 years agoMerge pull request #158 from alram/master
Sage Weil [Wed, 27 Mar 2013 16:18:49 +0000 (09:18 -0700)]
Merge pull request #158 from alram/master

Change ceph apt recipe to repo in doc

12 years agomds: Delay session close if in clientreplay 159/head
Sam Lang [Wed, 27 Mar 2013 15:58:25 +0000 (10:58 -0500)]
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>
12 years agoChange ceph::apt -> ceph::repo in doc 158/head
Alexandre Marangone [Wed, 27 Mar 2013 16:01:01 +0000 (09:01 -0700)]
Change ceph::apt -> ceph::repo in doc

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
12 years agoMerge pull request #156 from dalgaaf/wip-da-fix-mkcephfs
Sage Weil [Wed, 27 Mar 2013 15:52:41 +0000 (08:52 -0700)]
Merge pull request #156 from dalgaaf/wip-da-fix-mkcephfs

Fix issues in mkcephfs

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomkcephfs.in: use 32 chars for mktemp to be more unique 156/head
Danny Al-Gaaf [Wed, 27 Mar 2013 15:50:12 +0000 (16:50 +0100)]
mkcephfs.in: use 32 chars for mktemp to be more unique

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge pull request #152 from dalgaaf/wip-da-fix-misc
Sage Weil [Wed, 27 Mar 2013 15:28:49 +0000 (08:28 -0700)]
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>
12 years agoMerge pull request #157 from ceph/wip-4539
Sage Weil [Wed, 27 Mar 2013 15:26:25 +0000 (08:26 -0700)]
Merge pull request #157 from ceph/wip-4539

mds: Clear backtrace updates on standby_trim_seg

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomkcephfs.in: cleanup rdir in MON case
Danny Al-Gaaf [Wed, 27 Mar 2013 15:03:20 +0000 (16:03 +0100)]
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>
12 years agomkcephfs.in: provide a valid rdir for MONs on -a
Danny Al-Gaaf [Wed, 27 Mar 2013 14:55:56 +0000 (15:55 +0100)]
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>
12 years agomkcephfs.in: use mktemp instead of dd+md5sum+awk
Danny Al-Gaaf [Wed, 27 Mar 2013 14:40:58 +0000 (15:40 +0100)]
mkcephfs.in: use mktemp instead of dd+md5sum+awk

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds: Clear backtrace updates on standby_trim_seg 155/head 157/head
Sam Lang [Wed, 27 Mar 2013 14:35:08 +0000 (09:35 -0500)]
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 (8befbca77aa50a1188969892aabedaf11d8f8ce7)
(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>
12 years agoceph_common.sh: fix typo in comment
Danny Al-Gaaf [Wed, 27 Mar 2013 13:37:49 +0000 (14:37 +0100)]
ceph_common.sh: fix typo in comment

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agojava libcephfs: add serialVersionUID to some Exception classes 153/head
Danny Al-Gaaf [Wed, 27 Mar 2013 11:38:03 +0000 (12:38 +0100)]
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>
12 years agoCephMount.java: remove unused import
Danny Al-Gaaf [Wed, 27 Mar 2013 11:37:34 +0000 (12:37 +0100)]
CephMount.java: remove unused import

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMDS.cc: remove double is_clientreplay() check in active_start() 152/head
Danny Al-Gaaf [Wed, 27 Mar 2013 10:05:11 +0000 (11:05 +0100)]
MDS.cc: remove double is_clientreplay() check in active_start()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon: fix crush_ops.sh tests
Sage Weil [Wed, 27 Mar 2013 05:47:11 +0000 (22:47 -0700)]
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>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 27 Mar 2013 01:19:27 +0000 (18:19 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoReplicatedPG: send entire stats on OP_BACKFILL_FINISH
Samuel Just [Tue, 26 Mar 2013 22:10:37 +0000 (15:10 -0700)]
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>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 27 Mar 2013 00:05:48 +0000 (17:05 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agotesting: fix hadoop-internal-test
Joe Buck [Tue, 26 Mar 2013 21:17:14 +0000 (14:17 -0700)]
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>
12 years agoMerge pull request #149 from ceph/wip-4530
Sage Weil [Tue, 26 Mar 2013 22:13:24 +0000 (15:13 -0700)]
Merge pull request #149 from ceph/wip-4530

#4530

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #139 from ceph/wip-topo-java
Joe Buck [Tue, 26 Mar 2013 22:09:19 +0000 (15:09 -0700)]
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.

12 years agoclient: Don't signal requests already handled 149/head
Sam Lang [Mon, 25 Mar 2013 19:55:20 +0000 (14:55 -0500)]
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>
12 years agofix append to uninitialized buffer in FlatIndex::created 148/head
Loic Dachary [Mon, 25 Mar 2013 17:40:32 +0000 (13:40 -0400)]
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>
12 years agoMerge pull request #144 from dalgaaf/wip-da-ceph-disk
Sage Weil [Tue, 26 Mar 2013 19:06:41 +0000 (12:06 -0700)]
Merge pull request #144 from dalgaaf/wip-da-ceph-disk

Fix some issues in ceph-dsk

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #143 from ceph/wip-mds-health
Sage Weil [Tue, 26 Mar 2013 18:44:29 +0000 (11:44 -0700)]
Merge pull request #143 from ceph/wip-mds-health

improve mds health checks

Reviewed-by: Sam Lang <sam.lang@inktank.com>
12 years agoceph-disk: udevadm settle before partprobe
Gary Lowell [Tue, 26 Mar 2013 18:31:16 +0000 (11:31 -0700)]
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>
12 years agoMerge pull request #147 from ceph/wip-4537
Sage Weil [Tue, 26 Mar 2013 16:29:42 +0000 (09:29 -0700)]
Merge pull request #147 from ceph/wip-4537

mds: CInode::build_backtrace() always incr iter

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: CInode::build_backtrace() always incr iter 147/head
Sam Lang [Tue, 26 Mar 2013 13:55:40 +0000 (08:55 -0500)]
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>
12 years agojava: fix test name typo 139/head
Noah Watkins [Tue, 26 Mar 2013 16:06:14 +0000 (09:06 -0700)]
java: fix test name typo

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge pull request #145 from dalgaaf/wip-da-c_str
Sage Weil [Tue, 26 Mar 2013 15:15:53 +0000 (08:15 -0700)]
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>
12 years agoclient: Cleanup request signaling
Sam Lang [Mon, 25 Mar 2013 18:13:28 +0000 (13:13 -0500)]
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>
12 years agoclient: Handle duplicate safe replies
Sam Lang [Mon, 25 Mar 2013 17:58:13 +0000 (12:58 -0500)]
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>
12 years agoclient: Always cleanup request after safe
Sam Lang [Mon, 25 Mar 2013 16:43:54 +0000 (11:43 -0500)]
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>
12 years agoclient: Remove got_safe from MetaRequest
Sam Lang [Mon, 25 Mar 2013 16:39:19 +0000 (11:39 -0500)]
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>
12 years agoCrushWrapper.cc: remove some std::string::c_str() calls 145/head
Danny Al-Gaaf [Tue, 26 Mar 2013 11:46:46 +0000 (12:46 +0100)]
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>
12 years agoMerge remote-tracking branch 'gh/wip-crush'
Sage Weil [Mon, 25 Mar 2013 23:29:56 +0000 (16:29 -0700)]
Merge remote-tracking branch 'gh/wip-crush'

The non-crush bits
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agodoc/release-notes: extra note for v0.56.4
Sage Weil [Mon, 25 Mar 2013 23:24:48 +0000 (16:24 -0700)]
doc/release-notes: extra note for v0.56.4

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/release-notes: v0.56.4
Sage Weil [Mon, 25 Mar 2013 23:09:24 +0000 (16:09 -0700)]
doc/release-notes: v0.56.4

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoImprove test by getting cloneid from my_snaps vector
David Zafman [Sat, 23 Mar 2013 01:14:10 +0000 (18:14 -0700)]
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>
12 years agorgw: bucket index ops on system buckets shouldn't do anything
Yehuda Sadeh [Mon, 25 Mar 2013 16:50:33 +0000 (09:50 -0700)]
rgw: bucket index ops on system buckets shouldn't do anything

Fixes: #4508
Backport: bobtail
On certain bucket index operations we didn't check whether
the bucket was a system bucket, which caused the operations
to fail. This triggered an error message on bucket removal
operations.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph-disk: rename some local variabels in list_*partitions 144/head
Danny Al-Gaaf [Mon, 25 Mar 2013 16:45:32 +0000 (17:45 +0100)]
ceph-disk: rename some local variabels in list_*partitions

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-disk: fix naming of a local variable in find_cluster_by_uuid
Danny Al-Gaaf [Mon, 25 Mar 2013 15:24:00 +0000 (16:24 +0100)]
ceph-disk: fix naming of a local variable in find_cluster_by_uuid

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-disk: rename some constants to upper case variable names
Danny Al-Gaaf [Mon, 25 Mar 2013 15:18:17 +0000 (16:18 +0100)]
ceph-disk: rename some constants to upper case variable names

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-disk: add some more docstrings
Danny Al-Gaaf [Mon, 25 Mar 2013 15:15:29 +0000 (16:15 +0100)]
ceph-disk: add some more docstrings

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-disk: print subprocess.CalledProcessError on error
Danny Al-Gaaf [Mon, 25 Mar 2013 13:36:41 +0000 (14:36 +0100)]
ceph-disk: print subprocess.CalledProcessError on error

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-disk: fix indention
Danny Al-Gaaf [Mon, 25 Mar 2013 12:55:56 +0000 (13:55 +0100)]
ceph-disk: fix indention

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agojava: pretty print Ceph extent
Noah Watkins [Sun, 24 Mar 2013 20:03:56 +0000 (13:03 -0700)]
java: pretty print Ceph extent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: support ceph_get_osd_addr
Noah Watkins [Fri, 22 Mar 2013 19:42:47 +0000 (12:42 -0700)]
java: support ceph_get_osd_addr

Adds a few JNI utilities from the Android project (license: Apache) to
help with IP address conversions. These functions are also updated to
work in our environment (use Ceph exception utilities, edit header
paths).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: support ceph_get_osd_crush_location
Noah Watkins [Thu, 21 Mar 2013 22:42:34 +0000 (15:42 -0700)]
java: support ceph_get_osd_crush_location

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: support ceph_get_file_extent_osds
Noah Watkins [Thu, 21 Mar 2013 22:41:10 +0000 (15:41 -0700)]
java: support ceph_get_file_extent_osds

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoPendingReleaseNotes: mention renamin of cluster to zone 141/head
Yehuda Sadeh [Sun, 24 Mar 2013 04:10:31 +0000 (21:10 -0700)]
PendingReleaseNotes: mention renamin of cluster to zone

radosgw-admin now uses the term 'zone'

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Sun, 24 Mar 2013 00:31:29 +0000 (17:31 -0700)]
Merge branch 'next'

12 years agoclient: don't set other if lookup fails in rename
Sam Lang [Sat, 23 Mar 2013 19:07:59 +0000 (14:07 -0500)]
client: don't set other if lookup fails in rename

On rename, only set the other inode if the
lookup for the destination succeeds, otherwise we hit
a segv in set_other_inode().

Fixes #4517.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Tested-by: Noah Watkins <jayhawk@cs.ucsc.edu>
12 years agoMerge branch 'next'
Sage Weil [Sat, 23 Mar 2013 18:03:58 +0000 (11:03 -0700)]
Merge branch 'next'

12 years agotest/libcephfs: Test rename error cases
Sam Lang [Fri, 22 Mar 2013 20:23:21 +0000 (15:23 -0500)]
test/libcephfs: Test rename error cases

Make sure that rename fails with the ENOENT
if the source path doesn't exist.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Fix rename returning ENOENT for dest
Sam Lang [Fri, 22 Mar 2013 20:02:58 +0000 (15:02 -0500)]
client: Fix rename returning ENOENT for dest

Introduced by fc80c1dc6ee315ae5e039986602ffadba46cb43b,
the client should _not_ fail if the lookup for the
destination path on rename returns ENOENT.

The previous code also did not check that the lookup
returned ENOENT or success.  We add the check and fail
if we get any other errors.

Fixes #4517.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMDSMap: improve health check 143/head
Sage Weil [Sat, 23 Mar 2013 04:04:43 +0000 (21:04 -0700)]
MDSMap: improve health check

Note if the cluster is degraded.  If so, indicate specifically which MDSs
are degraded and what state they are in.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMDSMap:: constify a bunch of methods
Sage Weil [Sat, 23 Mar 2013 01:22:21 +0000 (18:22 -0700)]
MDSMap:: constify a bunch of methods

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agopreserve /var/lib/ceph on deb/rpm purge
Sage Weil [Fri, 22 Mar 2013 22:24:39 +0000 (15:24 -0700)]
preserve /var/lib/ceph on deb/rpm purge

We should clobber configuration and log data, but *not* user data.  Leave
/var/lib/ceph alone.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agomon: factor out _get_pending_crush() helper 129/head
Sage Weil [Fri, 22 Mar 2013 21:27:21 +0000 (14:27 -0700)]
mon: factor out _get_pending_crush() helper

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon, crush: add some tests to build a DAG via the cli
Sage Weil [Fri, 22 Mar 2013 19:32:47 +0000 (12:32 -0700)]
mon, crush: add some tests to build a DAG via the cli

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrush, mon: unlink vs remove
Sage Weil [Fri, 22 Mar 2013 19:32:15 +0000 (12:32 -0700)]
crush, mon: unlink vs remove

Make an 'unlink' mode of remove that will remove a link to a bucket but
not remove the bucket itself.  This refactors remove_item[_under] and moves
some of the checks into common helpers where they are not duplicated.  Fix
callers to pass the extra arg.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrush: fix remove_item on bucket removal
Sage Weil [Thu, 21 Mar 2013 18:15:30 +0000 (11:15 -0700)]
crush: fix remove_item on bucket removal

Remove the bucket if there are no references left.

Remove the name from the map even if it is a bucket (not sure why that
condition was there in the first place!).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: add 'osd crush add-bucket <name> <type>'
Sage Weil [Thu, 21 Mar 2013 18:04:59 +0000 (11:04 -0700)]
mon: add 'osd crush add-bucket <name> <type>'

This is (I think) the last missing piece to let you construct an entire
map via the CLI.  The add/set commands will construct intervening ancestor
nodes provide there is an existing ancestor to stick them under, but this
is needed to create the initial root node.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: allow removal of buckets via 'osd crush rm ...'
Sage Weil [Thu, 21 Mar 2013 18:03:55 +0000 (11:03 -0700)]
mon: allow removal of buckets via 'osd crush rm ...'

No reason to limit this to leaves.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrush: change find_roots(); add find_takes()
Sage Weil [Fri, 22 Mar 2013 21:23:37 +0000 (14:23 -0700)]
crush: change find_roots(); add find_takes()

The find_roots() was looking for nodes referenced by 'take', but those
aren't necessarily roots, which is what the callers actually want.

Rename to find_takes() and add a real find_roots().  Not very efficient,
but we don't care.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: add optional ancestor arg to 'ceph osd crush rm <item> [ancestor]'
Sage Weil [Wed, 20 Mar 2013 15:40:37 +0000 (08:40 -0700)]
mon: add optional ancestor arg to 'ceph osd crush rm <item> [ancestor]'

Remove only instances of the item underneath a particular ancestor.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrush: add remove_item_under()
Sage Weil [Wed, 20 Mar 2013 15:40:09 +0000 (08:40 -0700)]
crush: add remove_item_under()

Remove only instances of item nested beneath a particular ancestor.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: 'ceph osd crush link ...' to add a link to an existing bucket
Sage Weil [Wed, 20 Mar 2013 15:00:12 +0000 (08:00 -0700)]
mon: 'ceph osd crush link ...' to add a link to an existing bucket

Allow a second reference to an existing bucket to be added.  This lets
you create a DAG instead of a tree using the CLI.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrush: prevent formation of a loop
Sage Weil [Wed, 20 Mar 2013 14:59:26 +0000 (07:59 -0700)]
crush: prevent formation of a loop

If we are adding an item, ensure it cannot form a loop in the tree/map/
DAG.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrush: add link_bucket()
Sage Weil [Wed, 20 Mar 2013 14:59:03 +0000 (07:59 -0700)]
crush: add link_bucket()

Allow an existing bucket to get linked from a new position in the tree.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: 'ceph osd crush add ...' to add a second link to an item
Sage Weil [Wed, 20 Mar 2013 14:02:20 +0000 (07:02 -0700)]
mon: 'ceph osd crush add ...' to add a second link to an item

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: zone info is configurable
Yehuda Sadeh [Fri, 1 Feb 2013 01:13:06 +0000 (17:13 -0800)]
rgw: zone info is configurable

Also rename RadosParams to ZoneParams

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge remote-tracking branch 'upstream/wip_4435'
Samuel Just [Fri, 22 Mar 2013 21:15:31 +0000 (14:15 -0700)]
Merge remote-tracking branch 'upstream/wip_4435'

Fixes: #4435
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoPG::GetMissing: need to check need_up_thru in MLogRec handler
Samuel Just [Fri, 22 Mar 2013 20:51:14 +0000 (13:51 -0700)]
PG::GetMissing: need to check need_up_thru in MLogRec handler

Backport: bobtail
Fixes: #4534
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG,osd_types: improve check_new_interval debugging
Samuel Just [Fri, 22 Mar 2013 20:48:49 +0000 (13:48 -0700)]
PG,osd_types: improve check_new_interval debugging

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agocommon/MemoryModel: remove logging to /tmp/memlog
Sage Weil [Fri, 22 Mar 2013 20:25:49 +0000 (13:25 -0700)]
common/MemoryModel: remove logging to /tmp/memlog

This was a hack for dev purposes ages ago; remove it.  The predictable
filename is a security issue.

CVE-2013-1882

Reported-by: Michael Scherer <misc@zarb.org>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoinit-ceph: clean up temp ceph.conf filename on exit
Sage Weil [Fri, 22 Mar 2013 20:25:43 +0000 (13:25 -0700)]
init-ceph: clean up temp ceph.conf filename on exit

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoinit-ceph: push temp conf file to a unique location on remote host
Sage Weil [Fri, 22 Mar 2013 20:25:33 +0000 (13:25 -0700)]
init-ceph: push temp conf file to a unique location on remote host

The predictable file name is a security problem.

CVE-2013-1882

Reported-by: Michael Scherer <misc@zarb.org>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>