Commit Graph

37746 Commits

Author SHA1 Message Date
Sage Weil
8c87e95021 crush/builder: prevent bucket weight underflow on item removal
It is possible to set a bucket weight that is not the sum of the item
weights if you manually modify/build the CRUSH map.  Protect against any
underflow on the bucket weight when removing items.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-08 16:21:24 -08:00
Sage Weil
eeadd60714 crush/CrushWrapper: fix _search_item_exists
Reported-by: Pawel Sadowski <ceph@sadziu.pl>
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-08 16:21:24 -08:00
cholcombe973
a198deea5f Modifying the docs to add the Get pool commands to match the CLI.
Signed-off-by: Chris Holcombe <chris.holcombe@nebula.com>
2014-12-08 16:10:38 -08:00
Loic Dachary
bc2b9f6bf5 Merge pull request #3106 from danderson/asan-fixes
Asan fixes

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-08 08:33:26 +01:00
Loic Dachary
7d381a60c8 Merge pull request #3113 from wonzhq/name-norm
mailmap: Zhiqiang Wang name normalization

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-08 08:09:50 +01:00
Zhiqiang Wang
e8b412cbcd mailmap: Zhiqiang Wang name normalization
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2014-12-08 12:33:00 +08:00
Xiaoxi Chen
c0ce4a5e32 Cleanup:Use get_type()instead of get_header().type
Cleanup the code ,use get_type() instead of get_header().type
for messages.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2014-12-08 12:03:49 +08:00
David Anderson
12d85c64ed Fix stack buffer overflow reported by ASan.
Signed-off-by: David Anderson <dave@natulte.net>
2014-12-07 14:40:09 -08:00
David Anderson
f6f6ea2982 Fix alloc-dealloc mismatch reported by ASan (new[] vs. delete).
Signed-off-by: David Anderson <dave@natulte.net>
2014-12-07 12:02:48 -08:00
David Anderson
5bb86664b8 Fix alloc-dealloc mismatch reported by ASan (malloc vs. C++ delete).
Signed-off-by: David Anderson <dave@natulte.net>
2014-12-07 11:52:54 -08:00
Sage Weil
8ed536e143 ceph_test_rados_api_watch_notify: fix signed/unsigend
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-07 10:36:17 -08:00
Sage Weil
45223d9a33 librados: mark new API watch/notify calls
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-07 10:36:07 -08:00
Loic Dachary
6010f1784b Merge pull request #3103 from danderson/ceph-dev-mode-python-envvar
ceph: respect the PYTHON environment variable for dev mode.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-07 11:12:06 +01:00
David Anderson
812ff7aac5 ceph: respect the PYTHON environment variable for dev mode.
On OSes where `python` is python3, dev mode's re-exec makes the
ceph tool fail. The standard way to fix this is by exporting
the PYTHON envvar pointing to the python2 interpreter.

Signed-off-by: Dave Anderson <dave@natulte.net>
2014-12-07 02:02:05 -08:00
Haomai Wang
09b3e77ddf FileStore: Move ftruncate to do_sparse_copy
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-12-07 00:14:06 +08:00
Loic Dachary
a368533e78 Merge pull request #3099 from sileht/sileht/python-rados-object-lock
python-rados: Add object lock support

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-06 16:56:47 +01:00
Mehdi Abaakouk
f5bf75fa41 python-rados: Add object lock support
This change adds to the python binding the support of:
 - rados_lock_exclusive
 - rados_lock_shared
 - rados_unlock

http://tracker.ceph.com/issues/6114 Refs: #6114

Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
2014-12-06 16:28:01 +01:00
Sage Weil
dc67cd6960 rgw: switch to new watch/notify API
Note that we don't use it properly, yet!

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-05 18:00:04 -08:00
Sage Weil
53fe29611d Merge pull request #3035 from dachary/wip-10197-arch-arm
arch: add support for HW_CAP based neon runtime detection

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-05 17:31:44 -08:00
Samuel Just
1ac17c0a66 osd_types: op_queue_age_hist and fs_perf_stat should be in osd_stat_t::operator==
Fixes: 10259
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
2014-12-05 16:49:08 -08:00
Sage Weil
9029813b27 common/ceph_context: don't import std namespace
This was broken by 7fed5dee4f

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-05 14:21:08 -08:00
Loic Dachary
e6558b47fe Merge pull request #3020 from dachary/wip-10192-objectstore-tool-lookup
objectstore tool lookup by name & --op list filter

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 22:02:50 +01:00
David Zafman
59b423e2e8 ceph_objectstore_tool: Accept json object with --pgid instead of array
It isn't anticipated that anyone would use this but keeps backward compatible

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 21:09:42 +01:00
David Zafman
de6384fda1 ceph_objectstore_tool: Improve object spec parsing error messages
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 21:09:42 +01:00
David Zafman
eae7c02fde ceph_objectstore_tool: Fix errors messages in newer code
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 21:09:42 +01:00
David Zafman
32c832f0c6 ceph_objectstore_tool: Remove extraneous endl on error throw messages
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 21:09:42 +01:00
David Zafman
cca85a534f ceph_objectstore_tool: Add --format and --pretty-format support
--pretty-format defaults true
Add --format so xml output can be requested
--op list defaults to single line of json per object
To override this more human readable output use --pretty-format=false
Add testing of --op list special handling

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 21:09:42 +01:00
Nilamdyuti Goswami
00c96c289d doc: Adds ceph-deploy man page in TOC.
Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-06 00:13:52 +05:30
Nilamdyuti Goswami
d93e561ff0 doc: Adds ceph-deploy man page under /man.
Adds entry for ceph-deploy man page in man/Makefile.am

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-06 00:10:55 +05:30
Nilamdyuti Goswami
9191005cca doc: Adds man page for ceph-deploy.
Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-06 00:07:44 +05:30
Samuel Just
f4735cfff1 .gitignore: add ceph_perf_objectstore
Signed-off-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-05 09:57:36 -08:00
Haomai Wang
bcee92ee2d StoreTest: Add tests for clone_range op
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-12-06 01:47:57 +08:00
Haomai Wang
cabb57a23a FileStore: Fix _do_sparse_copy_range don't truncate zero sections
If calling clone_range and zero filled sections is at the ending of src
range, the target fd won't write zero filled sections. If target's
origin size shorter than needed, it will cause inconsistence between
two fd's desired range.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-12-06 01:47:57 +08:00
Sage Weil
f1dc512599 Merge pull request #2987 from yuyuyu101/wip-9888
AsyncMessenger: Async event threads can shared by all AsyncMessenger

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-05 09:20:30 -08:00
Sage Weil
4c3b12994d Merge pull request #3043 from yuyuyu101/objectstore-perf
Objectstore::Transaction Perf Program

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-05 09:06:51 -08:00
Sage Weil
d7a9bf7cdb Merge pull request #3087 from dachary/wip-9785-dmcrypt-keys-permissions
ceph-disk: dmcrypt file permissions

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-05 08:39:30 -08:00
Sage Weil
26747d43fa Merge pull request #3094 from yuandong1222/bufferlist-get_contiguous
common: bufferlist::get_contiguous return 0 when param len == 0

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-05 08:33:49 -08:00
Dong Yuan
980f094842 common: bufferlist::get_contiguous return 0 when param len == 0
Change-Id: I3eaee45b12c634687cd1b294b3c264aed8cab03a
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2014-12-05 19:48:59 +00:00
Sage Weil
be11a451de os/FileStore: stop disabling fadvise on XFS
This was an issue with mixing fadvise and sync_file_range, not with just
fadvise.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-05 08:01:01 -08:00
Sage Weil
d6a7a7c6b3 os/FileStore: merge filestore_replica_fadvise -> filestore_fadvise
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-05 08:01:01 -08:00
David Zafman
5eacd3c5f3 ceph_objectstore_tool: Strip _* (always _head) from pgid in list entry output
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 13:01:36 +01:00
David Zafman
b617ee2d45 ceph_objectstore_tool: BUG: --op list wasn't including snapshots
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 13:01:36 +01:00
David Zafman
5a66db9418 ceph_objectstore_tool: For terminal output of list one object per line
Instead of a parsable array make it easier to cut and paste listed objects

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 13:01:36 +01:00
David Zafman
bc6ea9cb8a ceph_objectstore_tool: In error case umount objectstore
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-05 13:01:36 +01:00
Loic Dachary
ddba2676c4 objectstore_tool: test --op list variants
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 13:01:36 +01:00
Loic Dachary
df9d5c5cfd objectstore_tool: parse new object description format
The object format changed from

    {json object}

to

    [pgid,{json object}]

The parser is updated accordingly. If the --pgid is present, check that
it equals the pgid from the object description.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 13:01:36 +01:00
Loic Dachary
c69aaceac7 objectstore_tool: filter --op list and explore all PGs
The positional object name is used to filter the output of --op list and
only show the objects with a matching name. If both the object name and
the pgid are omitted, all objects from all PGs are displayed.

The output format is changed from

    {"oid":"GROUP","key":"","snapid":-2,
     "hash":2659194943,"max":0,"pool":0,"namespace":""}

to

    [["0.7_head",{"oid":"GROUP","key":"","snapid":-2,
                  "hash":2659194943,"max":0,"pool":0,
                  "namespace":""}]]

where the first member is the pgid where the object is found.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 13:01:36 +01:00
Loic Dachary
7c1165f963 objectstore_tool: lookup objects by name
If the object is not a parsable JSON string, assume an object name and
look it up in all the PGs. If multiple objects have the same name, only
apply the command to one of them. It is primarily useful in a test
environment where the names of the tests objects are known and only a
small number of objects exists. It replaces the following:

    path='--data-path dev/osd0 --journal-path dev/osd0.journal'
    for pgid in $(./ceph_objectstore_tool $path --op list-pgs) ; do
      object=$(./ceph_objectstore_tool $path --pgid $pgid --op list |
               grep '"oid":"NAME"')
      test -n "$object" && break
    done
    ./ceph_objectstore_tool $path --pgid $pgid "$object" remove

with:

    ./ceph_objectstore_tool $path NAME remove

http://tracker.ceph.com/issues/10192 Fixes: #10192

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 13:01:36 +01:00
Loic Dachary
d9e747b1bd objectstore_tool: refactor list-lost and fix-lost
Abstract out the PG exploration loops and encapsulate the list-lost and
fix-lost semantic in a callable object.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 13:01:36 +01:00
Loic Dachary
a90233c8b7 objectstore_tool: update usage strings
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-05 13:01:36 +01:00