Commit Graph

24985 Commits

Author SHA1 Message Date
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
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
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
Sage Weil
8befbca77a Merge branch 'next' 2013-03-23 17:31:29 -07:00
Sam Lang
ece4348807 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>
2013-03-23 17:30:53 -07:00
Sage Weil
84738791fe Merge branch 'next' 2013-03-23 11:03:58 -07:00
Sam Lang
836b97f386 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>
2013-03-23 11:03:55 -07:00
Sam Lang
8e6a970c45 client: Fix rename returning ENOENT for dest
Introduced by fc80c1dc6e,
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>
2013-03-23 11:01:50 -07:00
Sage Weil
838f1cde94 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>
2013-03-22 15:24:51 -07:00
Sage Weil
4f2051c4a1 mon: factor out _get_pending_crush() helper
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:38 -07:00
Sage Weil
eae1532ca1 mon, crush: add some tests to build a DAG via the cli
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:38 -07:00
Sage Weil
a60d7df419 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>
2013-03-22 15:15:38 -07:00
Sage Weil
b54db77ede 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>
2013-03-22 15:15:38 -07:00
Sage Weil
d8f4be6e6d 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>
2013-03-22 15:15:38 -07:00
Sage Weil
96e08ef1d4 mon: allow removal of buckets via 'osd crush rm ...'
No reason to limit this to leaves.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:37 -07:00
Sage Weil
683f745c14 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>
2013-03-22 15:15:37 -07:00
Sage Weil
751b4bf89f 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>
2013-03-22 15:15:37 -07:00
Sage Weil
ee6b9937aa crush: add remove_item_under()
Remove only instances of item nested beneath a particular ancestor.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:37 -07:00
Sage Weil
6cba563f5f 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>
2013-03-22 15:15:37 -07:00
Sage Weil
fe4e86c6ac 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>
2013-03-22 15:15:37 -07:00
Sage Weil
a54a41173d 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>
2013-03-22 15:15:37 -07:00
Sage Weil
05dac04ba0 mon: 'ceph osd crush add ...' to add a second link to an item
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:36 -07:00
Samuel Just
16063db20e Merge remote-tracking branch 'upstream/wip_4435'
Fixes: #4435
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-03-22 14:15:33 -07:00
Samuel Just
4fe4deafbe 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>
2013-03-22 14:07:04 -07:00
Samuel Just
d611eba9ca 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>
2013-03-22 14:06:45 -07:00
Sage Weil
c524e2e01d 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>
2013-03-22 13:25:49 -07:00
Sage Weil
6a7ad2eac1 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>
2013-03-22 13:25:43 -07:00
Sage Weil
051734522f 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>
2013-03-22 13:25:33 -07:00
Sage Weil
f463ef78d7 mkcephfs: make remote temp directory name unique
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>
2013-03-22 13:25:23 -07:00
Sage Weil
0d3f065c23 Merge pull request #130 from ceph/wip-fs-rename
test: add ceph_rename test

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-22 13:07:41 -07:00
John Wilkins
853dd35969 doc: Added {id} argument to OSD lost.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-22 11:52:12 -07:00
Sage Weil
6d63752c8f ceph-disk: re-add python 2.7 dependency comment
FIXME!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 10:09:55 -07:00
Sage Weil
c9157a1946 Merge pull request #117 from ceph/wip-ceph-disk
ceph-disk-* refactor
2013-03-22 10:06:13 -07:00
Sage Weil
0981e4666b Merge branch 'next' 2013-03-22 09:15:52 -07:00
Sage Weil
38a5acbb82 osd: reenable 'journal aio = true'
Now that #4079 is resolved.  Reverts 1cfc3ae0.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 09:15:23 -07:00
Sage Weil
e5940da9a5 os/FileJournal: fix aio self-throttling deadlock
This block of code tries to limit the number of aios in flight by waiting
for the amount of data to be written to grow relative to a function of the
number of aios.  Strictly speaking, the condition we are waiting for is a
function of both aio_num and the write queue, but we are only woken by
changes in aio_num, and were (in rare cases) waiting when aio_num == 0 and
there was no possibility of being woken.

Fix this by verifying that aio_num > 0, and restructuring the loop to
recheck that condition on each wakeup.

Fixes: #4079
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-22 09:15:20 -07:00
Sage Weil
a35b865093 Merge pull request #137 from dalgaaf/wip-da-cleanup-includes
Cleanup some twice included header

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-22 08:46:31 -07:00
Danny Al-Gaaf
6c79604cef test/test_snap_mapper.cc: remove twice included <tr1/memory>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-22 16:03:22 +01:00
Danny Al-Gaaf
00cf8178b6 mon/MDSMonitor.cc: remove twice included MonitorDBStore.h
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-22 16:02:55 +01:00
Danny Al-Gaaf
a583029e81 mon/LogMonitor.cc: remove twice included <sstream>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-22 16:02:23 +01:00
Danny Al-Gaaf
9dd5b209a2 mon/AuthMonitor.cc: remove twice included <sstream>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-22 16:01:53 +01:00
Danny Al-Gaaf
1144260957 common/Formatter.h: remove twice included <list>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-22 16:01:15 +01:00
Samuel Just
000310fd10 ReplicatedPG: add debug flag to skip full check at reservation
This will make it easier to test the check in do_scan.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-21 18:51:40 -07:00
Samuel Just
29a288f993 ReplicatedPG: replica should post BackfillTooFull in do_scan if full
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-21 18:51:40 -07:00
Samuel Just
f9c8190e4f PG: halt backfill on RemoteReservationRejected in Backilling
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-21 18:51:40 -07:00
Samuel Just
022903bf73 PG: add helper for adding a timer event to retry backfill
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-21 18:51:40 -07:00