Commit Graph

24184 Commits

Author SHA1 Message Date
Sage Weil
fecc3c3abf ceph-disk-prepare: -f for mkfs.xfs only
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-16 20:55:03 -08:00
Sage Weil
aff0bb6fdc debian: fix start of ceph-all
Tolerate failure, and do ceph-all, not ceph-osd-all.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-16 16:49:50 -08:00
Loic Dachary
c4573b745c fix operator>=(bufferlist& l, bufferlist& r)
bufferlist a;
  a.append("A");
  bufferlist ab;
  ab.append("AB");

a >= ab failed, throwing an instance of 'ceph::buffer::end_of_buffer'
because it tried to access a[1]. All comparison operators should be
tested using a lexicographic sort like strcmp or memcmp (-1, 0, 1).
In the meantime, the missing test is added:

  if (l.length() == p && r.length() > p) return false;

A set of unit tests demonstrating the problem and covering all comparison
operators are added to show that the proposed fix works as expected.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-02-16 14:51:40 -08:00
Sage Weil
37ef3f4b72 Merge remote-tracking branch 'gh/wip-deploy'
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-02-16 09:39:34 -08:00
Sage Weil
f45e9be2f3 Merge branch 'next' 2013-02-15 17:21:42 -08:00
Samuel Just
58837b2b54 Merge remote-tracking branch 'upstream/wip-4075'
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-02-15 16:54:39 -08:00
Sage Weil
c45fbc75a7 Merge pull request #62 from dalgaaf/wip-da-sca-cppcheck-performance-3
More performance patches 

Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-15 16:26:58 -08:00
Sage Weil
3f5c252796 qa: rbd/map-snapshat-io: unmap image when done
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 16:26:16 -08:00
Alexandre Marangone
d950d83250 ceph-disk-prepare: always force mkfs.xfs
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
2013-02-15 14:18:34 -08:00
Sage Weil
e090a92a20 udev: trigger on dmcrypted osd partitions
Automatically map encrypted journal partitions.

For encrypted OSD partitions, map them, wait for the mapped device to
appear, and then ceph-disk-activate.

This is much simpler than doing the work in ceph-disk-activate.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 14:18:34 -08:00
Sage Weil
c6ac0ddf91 ceph-disk-prepare: add initial support for dm-crypt
Keep keys in /etc/ceph/dmcrypt-keys.

Identify partition instances by the partition UUID.  Identify encrypted
partitions by a parallel set of type UUIDs.

Signed-off-by: Alexandre Marangone <alexandre.maragone@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 14:18:34 -08:00
Alexandre Marangone
e7040f55f0 ceph-disk-activate: pull mount options from ceph.conf
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
2013-02-15 14:18:25 -08:00
Sage Weil
b1c0fccba4 ceph-disk-activate: use full paths for everything
We are run from udev, which doesn't get a decent PATH.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 14:18:21 -08:00
Sage Weil
95835de9f8 ceph-disk-prepare: do partprobe after setting final partition type
This is necessary to kick udev into processing the updated partition and
running its rules.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 14:18:17 -08:00
Samuel Just
ea6cfb594e ReplicatedPG: handle missing set even for old format
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-15 14:04:32 -08:00
Sage Weil
bc74429c8b qa: rbd/map-snapshot-io.sh: chown rbd device stuff
This is fugly, but sudo -E doesn't work.  Fix this after we are installing
debs and the path doesn't matter anymore!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 13:57:47 -08:00
Danny Al-Gaaf
29b44666d5 cls/lock/cls_lock.cc: use !lockers.empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

warning from cppchecker was:
[src/cls/lock/cls_lock.cc:209]: (performance) Possible inefficient
  checking for 'lockers' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 21:55:09 +01:00
Danny Al-Gaaf
adb807c8ae src/client/SyntheticClient.cc: use !subdirs.empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

warning from cppchecker was:
[src/client/SyntheticClient.cc:2706]: (performance) Possible
  inefficient checking for 'subdirs' emptiness

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 21:55:08 +01:00
Danny Al-Gaaf
5c3e6570a3 client/Client.cc: use empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

warning from cppchecker was:
[src/client/Client.cc:3649]: (performance) Possible inefficient
  checking for 'mds_sessions' emptiness.
[src/client/Client.cc:7489]: (performance) Possible inefficient
  checking for 'osds' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 21:55:08 +01:00
Danny Al-Gaaf
49028367db mds/MDSMap.h: use up.empty() instead of up.size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

warning from cppchecker was:
[src/mds/MDSMap.h:448]: (performance) Possible inefficient
  checking for 'up' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 21:55:08 +01:00
Danny Al-Gaaf
28bf6cbab6 mds/CDentry.h: use projected.empty() instead of projected.size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

warning from cppchecker was:
[src/mds/CDentry.h:234]: (performance) Possible inefficient
  checking for 'projected' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 21:55:08 +01:00
Danny Al-Gaaf
d50a22d6a6 ceph_authtool.cc: use empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

warning from cppchecker was:
[src/ceph_authtool.cc:124]: (performance) Possible inefficient
  checking for 'caps' emptiness.
[src/ceph_authtool.cc:237]: (performance) Possible inefficient
  checking for 'caps' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 21:55:08 +01:00
Samuel Just
ab17aaf2ec OSD: add leveldblog compatibility flag for OSD
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-15 11:22:23 -08:00
Samuel Just
16b371873f PG: verify log versions during read_log
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-15 11:22:19 -08:00
Samuel Just
5f92b6cb95 PG: write_log if we read an old-format log
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-02-15 11:11:13 -08:00
David Zafman
1ef94200e9 osd: move pg log into leveldb
log from wip-pginfo
Fix bugs in PG::read_log() handling
Eliminate compiler warnings

Feature #4075: osd: move pg log into leveldb

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-02-15 11:11:13 -08:00
Sage Weil
ae0c2bbb50 qa: pull qa stuff from ceph.com ceph.git mirror
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 09:20:24 -08:00
Sage Weil
160490cdbf doc: radosgw: document config without 100-continue and custom fastcgi
Reported-by: carsonoid on github
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-15 09:20:24 -08:00
Wido den Hollander
467f7a7bfb config: Add small note about default number of PGs
It's still not clear to end users this should go into the
mon or global section of ceph.conf

Until this gets resolved document it here as well for the people
who look up their settings in the source code.

Signed-off-by: Wido den Hollander <wido@42on.com>
2013-02-15 11:04:22 -06:00
Noah Watkins
78450fed3c Merge remote-tracking branch 'origin/wip-hadoop-docs'
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-02-15 08:55:33 -08:00
Sage Weil
f62952f4a3 Merge pull request #59 from dalgaaf/wip-da-add-errorhandling
add error handling to test_sync_*.c

Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-15 08:54:57 -08:00
Sage Weil
69a8bbd8ab Merge remote-tracking branch 'gh/next' 2013-02-15 08:48:37 -08:00
Danny Al-Gaaf
6f3f17397a test_sync_io.c: add error handling
Add error handling for open(), posix_memalign() and malloc().
Reuse code for read_* and write_* functions.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 10:22:49 +01:00
Danny Al-Gaaf
26cdb6a61b test_short_dio_read.c: add error handling
Add error handling for open() calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-15 10:21:57 +01:00
Sage Weil
2c42bfc00c doc: update rados troubleshooting for slow requests
The example was out of date.  Adding a note about how to look at the request
queue on the OSD.

Reported-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-14 17:33:22 -08:00
Sage Weil
a6534bc8a0 osd/OSDCap: add unit test for parsing pools/objects with _ and -
Hunting #4122, where a user saw

2013-02-13 19:39:25.467916 7f766fdb4700 10 osd.0 10  session 0x2c8cc60 client.libvirt has caps osdcap[grant(object_prefix rbd^@children  class-read),grant(pool libvirt^@pool^@test rwx)] 'allow class-read object_prefix rbd_children, allow pool libvirt-pool-test rwx'

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 2ce28ef1d7)
2013-02-14 15:39:46 -08:00
Sage Weil
6c504d96c1 osd/OSDCap: tweak unquoted_word parsing in osd caps
Newer versions of spirit (1.49.0-3.1ubuntu1.1 in quantal, in particular)
dislike the construct with alnum and replace the - and _ with '\0' in the
resulting string.

Fixes: #4122
Backport: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-14 15:39:43 -08:00
Samuel Just
4dfcad4443 OSD: always activate_map in advance_pgs, only send messages if up
We should always handle_activate_map() after handle_advance_map() in
order to kick the pg into a valid peering state for processing requests
prior to dropping the lock.

Additionally, we would prefer to avoid sending irrelevant messages
during boot, so only send if we are up according to the current service
osdmap.

Fixes: #4064
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-14 14:57:38 -08:00
Sage Weil
2ce28ef1d7 osd/OSDCap: add unit test for parsing pools/objects with _ and -
Hunting #4122, where a user saw

2013-02-13 19:39:25.467916 7f766fdb4700 10 osd.0 10  session 0x2c8cc60 client.libvirt has caps osdcap[grant(object_prefix rbd^@children  class-read),grant(pool libvirt^@pool^@test rwx)] 'allow class-read object_prefix rbd_children, allow pool libvirt-pool-test rwx'

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-14 13:46:45 -08:00
Guilhem Lettron
a14bae6049 rgw: user can specify 'rgw port' to listen on a tcp port.
'rgw socket path' overrides 'rgw port'.
An 'rgw host' can be set to listen on a specific ip (default is 0.0.0.0)

Signed-off-by: Guilhem Lettron <guilhem.lettron@youscribe.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-02-14 12:38:55 -08:00
Sage Weil
93bfb3612a test/filestore/chain_xattr: remove testfile; disable LOGFILE
These make the gitbuilder checks unhappy.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-14 12:37:28 -08:00
Greg Farnum
84ef4a899e Merge branch 'master' of github.com:ceph/ceph 2013-02-14 11:39:13 -08:00
Greg Farnum
ffda2eab46 Merge branch 'wip-danny-perf-checks' 2013-02-14 11:36:40 -08:00
Sage Weil
1de16ac1c4 osd: log error when ondisk snap collections do not match
This way we notice when it happens instead of blindly moving on.

Backport: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-14 11:34:04 -08:00
Greg Farnum
c8f090aed9 Merge remote-tracking branch 'origin/wip-mds-names' 2013-02-14 11:31:30 -08:00
Sage Weil
971b1612cc osd: fix read_log error/warning messages to mon
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-14 10:44:44 -08:00
Sage Weil
61eb0e9625 Merge pull request #40 from dachary/master
Unit tests for chain_xattr.cc

Reviewed-by: Sage Weil <sage@inktank.com>
2013-02-14 10:31:37 -08:00
Danny Al-Gaaf
533fd7a8c8 wireshark/ceph/packet-ceph.c: fix some issues from cppcheck
Fix some smaller performance related issues from cppcheck due to
"Variable '..xy..' is reassigned a value before the old one has been used.

Fix some indention.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-14 10:27:40 -08:00
Danny Al-Gaaf
ab1166cd9c rest_bench.cc: use empty() to check for emptiness
Use empty() instead of 'size() == 0' or 'size() < 1' to check
for emptiness for performance reasons.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-14 10:27:40 -08:00
Danny Al-Gaaf
8202378476 tools/common.cc. use !empty() to check for non-emptiness
Use !empty() instead of size() to check for non-emptiness for
performance reasons.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-14 10:27:40 -08:00