Commit Graph

33224 Commits

Author SHA1 Message Date
Haomai Wang
5f1259cdf0 librbd: Fix image_watcher test
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-10 16:51:52 +08:00
Haomai Wang
dcf2b3b9e9 Librbd: Don't affect global md_config_t
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-10 16:44:47 +08:00
Haomai Wang
16d66167ef Librbd: Don't apply to global configserver
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-10 14:36:28 +08:00
Zhiqiang Wang
15cc83b8e6 librbd/AsyncResize: avoid dup incrementing refresh seq
The refresh_seq is incremented in notify_change when calling
notify_async_complete after the locker owner completes the resize
request.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2015-04-10 13:44:07 +08:00
Yan, Zheng
47c2cecc21 mds: update snaptable when renaming snapshot
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-10 09:48:46 +08:00
Yan, Zheng
f311ac161a mds: rename snapshot support
Fixes: #3645
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-10 09:48:44 +08:00
Loic Dachary
c4c2927a39 Merge pull request #4320 from liewegas/wip-crush-straw2-div0
crush/mapper: fix divide-by-0 in straw2

Reviewed-by: Yann Dupont <yann@objoo.org>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-10 00:05:36 +02:00
Sage Weil
64d1e900ec crush/mapper: fix divide-by-0 in straw2
If the item weight is 0 we don't want to divide; instead draw a minimal
value.

Fixes: #11357
Reported-by: Yann Dupont <yd@objoo.org>
Tested-by: Yann Dupont <yd@objoo.org>
Signed-off-by: Sage Weil <sage@redhat.com>
2015-04-09 14:42:34 -07:00
Jason Dillaman
3b95edb5bd tests: ensure old-format RBD tests still work
Override the RBD default image format back to version 1
to ensure tests properly cover the old format.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-09 15:07:41 -04:00
Jason Dillaman
808e4a881a rbd: deprecate --new-format command-line option
Image formats can be explicitly chosen via the --image-format X
command-line option.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-09 15:07:41 -04:00
Jason Dillaman
4b55af5b12 common/config_opts: updated rbd_default_format
New images will now default to format 2 RBD images.

Fixes: #11348
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-09 15:07:32 -04:00
Jason Dillaman
0344910402 librados_test_stub: added rados_ioctx_cct implementation
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-09 14:58:16 -04:00
Samuel Just
aec2f5de3b Merge pull request #4174 from trociny/wip-10976.master
osd: fix PG::all_unfound_are_queried_or_lost for non-existent osds

Reviewed-by: Kefu Chai <tchaikov@gmail.com
Reviewed-by: Samuel Just <sjust@redhat.com>
2015-04-09 11:25:03 -07:00
Samuel Just
eeb2cf5cc1 Merge pull request #4111 from wonzhq/hitsets-check
osd/ReplicatedPG: correct the checking if the promoting object is in other hit sets

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2015-04-09 11:22:55 -07:00
Samuel Just
7ae9e6bc15 Merge pull request #4136 from XinzeChi/wip-pg-delete-sleep
osd: return fast if PG::deleting is true in snap_trimmer and PG::scrub

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-09 11:21:37 -07:00
Samuel Just
c8f662cba3 Merge pull request #4178 from XinzeChi/wip-tracker-message
osd: more useful message to find out potential unhealth osd

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-09 11:21:20 -07:00
Samuel Just
52efad3aac Merge pull request #4155 from wonzhq/prdop
osd/ReplicatedPG: don't check order in finish_proxy_read

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-09 11:20:24 -07:00
Samuel Just
b7e62c63da Merge pull request #4139 from Ved-vampir/oscnt
Perf counters descriptions

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2015-04-09 11:19:23 -07:00
Samuel Just
a9b497600c Merge pull request #3928 from dmitryya/rados_bench_with_iops_metric
rados bench: Add IOPS metric to `rados bench'

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-09 11:17:55 -07:00
Samuel Just
1b66dfbaec Merge pull request #4253 from majianpeng/scrub-fix2
Scrub bug fix

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-04-09 11:16:56 -07:00
Yehuda Sadeh
306c7eba2b Merge pull request #4224 from rzarzynski/wip-10682_bucketlisting
rgw: add support for end_marker parameter for GET on Swift container.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-09 10:02:08 -07:00
Yehuda Sadeh
5d866ad7e0 Merge pull request #4305 from Ved-vampir/rgw
rgw: add perf counters descriptions

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-09 09:55:25 -07:00
Yehuda Sadeh
4e425c2585 Merge pull request #4240 from 9seconds/post_check_quotas
rgw: Quota not respected in POST object

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-09 09:51:35 -07:00
Yehuda Sadeh
290ee5d12e Merge pull request #4268 from guangyy/wip-11322
rgw : Issue AIO for next chunk first before flush the (cached) data.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-09 09:50:02 -07:00
Haomai Wang
899a0e1a23 Librbd: aware_metadata_confs->apply_metadata_confs
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-09 16:06:06 +08:00
Haomai Wang
31070a5645 Librbd: Use boost:assign to init aware_confs
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-09 16:04:07 +08:00
Haomai Wang
ea2edf36e1 Event: process event before pop it to avoid releasing
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-09 15:11:59 +08:00
Josh Durgin
21f60a9d26 Merge pull request #4233 from ceph/wip-librbd-aio-request
librbd: simplify AioRequest constructor parameters

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-08 15:19:24 -07:00
Josh Durgin
94ceeb94ba Merge remote-tracking branch 'origin/wip-2862'
Reviewed-by: Josh Durgin <jdurgin@redhat.com>

Conflicts:
	src/common/ceph_argparse.cc
	src/rbd.cc
2015-04-08 13:55:13 -07:00
Dan Mick
28820a55b8 Merge pull request #4307 from dzafman/wip-dz-cmd-fix
osd: Fix wrong usage for "ceph tell osd.* debug dump_missing"

Reviewed-by: Dan Mick <dmick@redhat.com>
2015-04-08 13:28:12 -07:00
David Zafman
88f5ef4c39 osd: Fix wrong usage for "ceph tell osd.* debug dump_missing"
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-04-08 12:45:37 -07:00
John Spray
7c4d0a295a Merge pull request #4304 from Ved-vampir/mds
mds: add perf counters descriptions

Reviewed-by: John Spray <john.spray@redhat.com>
2015-04-08 19:12:05 +01:00
Ved-vampir
22834ca667 rgw: add perf counters descriptions
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-08 20:48:00 +03:00
Ved-vampir
0498b6abc8 mds: add perf counters descriptions
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-08 20:08:09 +03:00
Kefu Chai
93e7c3c914 Merge pull request #4274 from liewegas/wip-osd-cleanup
osd: remove some dead(ish) code

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-08 23:56:54 +08:00
Kefu Chai
89aae1929e Merge pull request #4289 from dachary/wip-docker-user
tests: allow multiple users of docker-tests.sh

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-08 16:28:51 +08:00
Kefu Chai
de0528dca6 Merge pull request #4210 from trociny/fix-11261
ceph_argparse: return false instead exiting when argument is missed

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-08 15:19:29 +08:00
Rajesh Nambiar
fb51175acd TestCase: Change in testcase output
For the local sanity test to pass this change is needed as the output message changes.

Signed-off-by: Rajesh Nambiar <rajesh.n@msystechnologies.com>
2015-04-07 23:40:58 -07:00
Rajesh Nambiar
b15f6d0231 Fix to some of the command line parsing (including rbd)
Fix#: 2862

Changes to some of the common files for command line parsing

Change to ceph_argparse.cc
-------------------------

Added function ceph_arg_value_type()
  Given an input it will determine
   i) If that input is an option or not
   ii) If input is numeric in nature or not.

  It will set the flag bool_option and bool_numeric appropriately.
  This function is called by ceph_argparse_witharg() to figure out if
  the input parameter to those functions are numeric in nature and not
  an option.  If the input parameter to ceph_argparse_witharg()
  happens to be an option then it implies that user didn't supply
  value to the option.

Changes to strol.cc
-------------------
Changes to strict_strtoll() and strict_strtol()

  Both these functions reponsibility is to convert the string to long or to int.
  I felt it may be not be good for it to display error message within this function,
  rather caller of this function who has better understanding of the function's purpose
  can display the error message.

  Made change in this function to just create a generic error message,Its the
  caller of this function decides what to do with this message.

Signed-off-by: Rajesh Nambiar <rajesh.n@msystechnologies.com>
2015-04-07 23:39:07 -07:00
Rajesh Nambiar
b0172d870e rbd: create command throws inappropriate error messages
Fixes: #2862

Changes related to rbd file

Changes to rbd.cc
-----------------

Change 1: line# 2744 to 2747

 If the option is --order then do the check of its value if its less
 than 12 or greaterthan 25 then throw error. Correct value of --order
 is 12 to 25.

Change 2: Removal of validation from line# 3205 to 3209

  Since the check for correct value of --order is done before hence the
  check here is not needed.

Signed-off-by: Rajesh Nambiar <rajesh.n@msystechnologies.com>
2015-04-07 23:31:48 -07:00
Josh Durgin
6210f589e5 Merge pull request #4292 from ceph/wip-11342
librbd: moved snap_create header update notification to initiator

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-07 15:55:33 -07:00
Josh Durgin
25015f9aeb Merge pull request #4281 from wonzhq/readahead
librbd: readahead fixes

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-07 14:47:44 -07:00
Jason Dillaman
6e20ed6834 librbd: moved snap_create header update notification to initiator
When handling a proxied snap_create operation, the client which
invoked the snap_create should send the header update notification
to avoid a possible race condition where snap_create completes but
the client doesn't see the new snapshot (since it didn't yet receive
the notification).

Fixes: #11342
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-07 16:12:01 -04:00
Yehuda Sadeh
b13161dadc Merge pull request #4283 from oritwas/multizone
rgw: remove meta file after deleting bucket

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-07 10:43:31 -07:00
Jason Dillaman
46515971ed librbd: simplify AioRequest constructor parameters
Moved all parent overlap computation to within AioRequest so that
callers don't need to independently compute the overlap.  Also
removed the need to pass the snap_id for write operations since
it can only be CEPH_NOSNAP.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-07 11:26:57 -04:00
Radoslaw Zarzynski
29073d8464 rgw: send Content-Length in response for HEAD on Swift account.
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 17:15:20 +02:00
Radoslaw Zarzynski
d260a93405 rgw: send Content-Length in response for DELETE on Swift container.
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 17:15:20 +02:00
Radoslaw Zarzynski
10c1f1aa1e rgw: send Content-Length in response for PUT on Swift container.
Fixes: #11036
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 17:15:20 +02:00
Radoslaw Zarzynski
5a64fb5430 rgw: send Content-Length in response for GET on Swift container.
Fixes: #10971
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 17:15:14 +02:00
Radoslaw Zarzynski
50cf7432db rgw: add support for end_marker for GET on Swift container.
Fixes: #10682
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 16:55:29 +02:00
Loic Dachary
509437feff tests: remove dead code in docker-test-helper.sh
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-07 16:19:36 +02:00
Loic Dachary
def9862be3 tests: allow multiple users of docker-tests.sh
The docker image created by docker-tests.sh for a given operating system
is parameterized with the user name. If two users on the same machine
try to use the same image, they will compete and fail with an error
like:

... user get supplementary groups Unable to find user ...

Add the $USER to the image name to reflect the fact that they contain an
account for this user.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-07 16:07:40 +02:00
Radoslaw Zarzynski
214c8b32b1 rgw: improve code formatting ONLY.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 16:01:29 +02:00
Kefu Chai
1c381b3ca8 Merge pull request #4273 from dachary/wip-docker-ccache
tests: docker-test must bind mount .ccache

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-07 21:21:19 +08:00
John Spray
780576ba62 Merge pull request #4255 from Ved-vampir/osdccnt
Perf counters descriptions, new part

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Joao Eduardo Luis <jluis@suse.com>
2015-04-07 14:10:04 +01:00
Radoslaw Zarzynski
e7724a1d8c rgw: send X-Copied-From-Last-Modified header of Swift API.
Fixes: #10663
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-07 14:02:09 +02:00
Ved-vampir
6a76b9d1da mon: add perf counters description
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-07 14:25:24 +03:00
John Spray
4d921ee6b7 Merge pull request #4265 from trociny/wip-11319
ceph daemonperf: add watch interval and count parameters

Reviewed-by: John Spray <john.spray@redhat.com>
2015-04-07 11:58:54 +01:00
Orit Wasserman
dfdc7afb59 rgw: remove meta file after deleting bucket
The meta file is deleted only if the bucket meta data is not synced

Signed-off-by: Orit Wasserman <owasserm@redhat.com>

Fixes: #11149
Backport: hammer, firefly
2015-04-07 10:35:51 +02:00
9seconds
e76f84e179 rgw: quota not respected in POST object
Signed-off-by: Sergey Arkhipov <nineseconds@yandex.ru>
Backport: hammer, firefly
Fixes: #11323
2015-04-07 09:45:42 +03:00
Zhiqiang Wang
b47a5499a0 librbd: don't do readahead when m_readahead_pos reaching limit
When m_readahead_pos reaches the limit, there's no need to call
_compute_readahead to calculate the readahead. Just return with no
readahead.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2015-04-07 14:23:38 +08:00
Zhiqiang Wang
04fe26921f librbd: start readahead from m_last_pos when the size of the continuing
triggering request is big enough

If the size of the read triggering the continuing readahead is such big
that exceeding m_readahead_pos, should do the readahead starting from
m_last_pos.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2015-04-07 13:43:36 +08:00
Sage Weil
9c7ea3be91 Merge pull request #3867 from wonzhq/fiemap
FileStore: fiemap implementation using SEEK_HOLE/SEEK_DATA

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-06 15:48:27 -07:00
Sage Weil
cee47b361c Merge pull request #3170 from tchaikov/python-rados-refactor
python-rados: extract type-checking into a decorator

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 15:47:33 -07:00
Sage Weil
a074a1478d Merge pull request #3560 from XinzeChi/wip-pmon-all
ceph.in: add ceph ping mon.* for ping all monitor

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-06 15:47:09 -07:00
Sage Weil
6c070accfc Merge pull request #3879 from liewegas/wip-cache-mode-none
mon: warn if cache_mode is none and pool is a read or writ eoverlay tier

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-06 15:46:21 -07:00
Josh Durgin
04566f5c54 Merge pull request #3980 from ceph/wip-rbd-update-features
librbd: add support for updating image features 

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-06 15:33:53 -07:00
Sage Weil
1594daecc6 Merge remote-tracking branch 'gh/hammer'
Conflicts:
	src/gmock
2015-04-06 13:43:01 -07:00
Yehuda Sadeh
405003b313 Merge pull request #4133 from rzarzynski/wip-10645
rgw: improve metadata handling on object copy operation of Swift API.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-06 11:49:50 -07:00
Jason Dillaman
37b1996bf3 librbd: remove object maps when disabling
If the object map feature is disabled, remove any object maps
prior to disabling the feature.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:35 -04:00
Jason Dillaman
5bc3a454ef librbd: flag the snapshot object map as invalid when error occurs
Instead of flagging the HEAD image object map as invalid when an
error occurs with a snapshot object map, properly flag the snapshot
as invalid.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:35 -04:00
Jason Dillaman
3a7b28d9a2 rbd: add feature enable/disable support
Mutable image features can now be enabled/disabled via
the rbd CLI.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:35 -04:00
Jason Dillaman
d1348e5cfe tests: add update_features test to test_librbd
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
28557c3e17 tests: add update_features test for pybind
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
82affca727 pybind: add update_features to rbd.py
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
7cff359188 librbd: add update_features to librbd API
Allow mutable features to be enabled / disabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
34c347becb tests: add test case for cls_rbd set_features
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
71b4c12478 cls_rbd_client: add set_features helper method
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
71dcee745b cls_rbd: add set_features class method
Allow certain mutable feature flags to be updated within
an image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
2e26309329 librbd: remove usage of snapshot features
The features for the image HEAD now apply to all
snapshots within the image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
59b6801976 tests: update cls_rbd_client tests for get_features changes
Images no longer track per-snapshot features. snapshot_list
no longer needs to retrieve per-snapshot features.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
58d59d6e52 cls_rbd_client: snapshot_list no longer retrieves features
Features should now be consistent across snapshots, so
no reason to retrieve them.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Jason Dillaman
281f87f9ee cls_rbd: get_features on snapshots returns HEAD image features
In preparation for dynamic feature bits, it probably doesn't
make sense to have snapshots have different features enabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Sage Weil
557715049a Merge pull request #4246 from ceph/wip-11113-hammer
librbd: snap_remove should ignore -ENOENT errors
2015-04-06 08:55:51 -07:00
Sage Weil
97dfde8dc7 Merge pull request #4250 from athanatos/wip-11265
ECTransaction: write out the hinfo key on touch as well

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-06 08:07:28 -07:00
Sage Weil
ad8481b708 Merge pull request #4251 from athanatos/wip-11284
ReplicatedPG::promote_object: do not create obc if not promoting

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-06 08:07:15 -07:00
Mykola Golub
983958474b ceph daemonperf: add watch interval and count parameters
Fixes: #11319
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-04-06 16:55:08 +03:00
Mykola Golub
8881441db1 ceph daemonperf: make error message less confusing
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-04-06 16:22:27 +03:00
Loic Dachary
c78940714c Merge pull request #4238 from ceph/wip-9580
ceph-disk: make journal setup conditional on osd backend

Reviewed-by: Travis Rhoden <trhoden@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 12:15:38 +02:00
Loic Dachary
106d006787 tests: add ceph-disk.sh activate for memstore
Add a test for the activation of the memstore objectstore and verify
that it works without specifying a journal.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:19 +02:00
Loic Dachary
4601e10800 tests: move rados put/get tests in a function
Add the test_pool_read_write function to share the rados put / get test
that demonstrate the osd that has been created can actually be used. Use
it from the both the regular device and dmcrypt tests.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:19 +02:00
Loic Dachary
8db870edf1 tests: ceph-disk.sh dmcrypt tests use test_setup_dev_and_run
Instead of duplicating the device construction / destruction logic for
dmcrypt tests, use test_setup_dev_and_run to do it. It is now able to
recover from devmapper leftover which may occur when a cryptsetup test
fails.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:19 +02:00
Loic Dachary
8c6d209650 tests: merge ceph-disk.sh activate dmcrypt functions
The activate_dmcrypt_plain_dev_body and activate_dmcrypt_dev_body
functions are almost identical, merge them and differentiate with an
argument.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:18 +02:00
Loic Dachary
282ccce16a tests: add test_setup_dev_and_run to ceph-disk.sh
Move test_activate_dev to test_setup_dev_and_run and make it
run the function given in argument. test_activate_dev calls
test_setup_dev_and_run and no longer needs to implement device
allocation or destruction.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:18 +02:00
Loic Dachary
c583b57670 tests: improve ceph-disk.sh setup/teardown
Address all possible failure cases, when ceph-disk.sh completes or when
it starts with leftover from a previous interrupted run. It is assumed
that ceph-disk.sh will crash at any point.

* umount all mount points that belong to ceph-disk.sh (check the
  absolute path of the directory)
* dmsetup remove all device mapper nodes found to hold a loop device
  that ceph-disks.sh no longer uses
* losetup --detach all loop devices that ceph-disks.sh no longer uses

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:18 +02:00
Loic Dachary
eaf89661d9 tests: do not use -e in ceph-disk.sh
The tests explicitly return on error when relevant. Add two error cases:

* detect when the allocation of a loop device fails.
* in the outer loop, return immediately if one of the test fails

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:18 +02:00
Loic Dachary
28269d7cb8 tests: reduce ceph-disk.sh verbosity
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-06 01:58:18 +02:00
Loic Dachary
123230ce55 tests: docker-test must bind mount .ccache
run-make-check.sh relies on ccache. If ~/.ccache is not bind mounted and
$HOME is not bind mounted either, ./configure will fail with an obscure
error because it cannot create the directory. Create the directory if it
does not exist already and avoid this problem. The worst that can happen
is that an empty .ccache directory is created and never used which
should not be a major inconvenience.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-05 21:27:28 +02:00
Sage Weil
3fa859af07 osd: kill ager
This is more or less dead.  Definitely unused.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-04-05 10:56:04 -07:00
Sage Weil
b1ab103412 osd: remove osd_auto_weight function
This is essentially dead code.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-04-05 10:56:02 -07:00
Mykola Golub
46103b2c3b ceph_argparse: don't die when called by injectargs
Fixes: #11261
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-04-04 10:55:04 +03:00
Mykola Golub
c579ebfebb common: ceph_argparse_witharg: pass oss by reference
It is always supposed to be a valid pointer here.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-04-04 10:07:33 +03:00
Guang Yang
366e8a85c0 rgw : Issue AIO for next chunk first before flush the (cached) data.
When handling GET request for large object (with multiple chunks), currently it will first flush the
cached data, and then issue AIO request for next chunk, this has the potential issue to make the retriving
from OSD and sending to client serialized. This patch switch the two operations.

Fixes: 11322
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
2015-04-03 12:27:04 +00:00
Ved-vampir
fa359ae72c client: remove useless perf counters
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-03 13:33:59 +03:00
Ved-vampir
66aa905f7b client: add perf counters description
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-03 13:31:59 +03:00
Ved-vampir
2d6e0695ce os: add perf counters description
Sign-off-by Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-03 13:22:59 +03:00
Ved-vampir
43fe246bf7 common: add perf counters descriptions
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-03 13:21:48 +03:00
Ved-vampir
8c8ea8a15c osdc: perf counters description added
Sign-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
2015-04-03 11:11:03 +03:00
Haomai Wang
b235a42a0a Librbd: Discard all global config used for image
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-03 11:27:36 +08:00
David Zafman
070cadf111 mon: Add MIN_READ_RECENCY_FOR_PROMOTE to ONLY_TIER_CHOICES
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-04-02 11:36:27 -07:00
John Spray
607994d9e3 check mdr->ls before trying to write to it
Not all may_write operations actually log anything (e.g. setfilelock)

squash into: mds: persist completed_requests reliably
2015-04-02 16:45:13 +01:00
Loic Dachary
fe28daa166 Merge pull request #4220 from jdurgin/wip-librados-global-flags
Revert "librados: remove the unused flags."

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-02 16:02:55 +02:00
Loic Dachary
7c6e213093 Merge pull request #4201 from tchaikov/xlist-iterator
xlist: add compare operator for iterator

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-02 12:49:30 +02:00
Loic Dachary
e33951342d Merge pull request #4068 from dachary/wip-opensuse
tests: add OpenSUSE 13.2 dockerfile

Reviewed-by: Owen Synge <osynge@suse.com>
2015-04-02 11:32:09 +02:00
Jianpeng Ma
0b8ec6be1c Scrub: when delete pg, call clear_scrub_reserved().
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-04-02 16:56:09 +08:00
Jianpeng Ma
137a2d550a osd/PG: Remove the unuseful judgement.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-04-02 16:54:19 +08:00
Samuel Just
5c2ecc3b89 Merge pull request #4167 from dzafman/wip-11184
Fix 11184 by filtering the log

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-04-01 21:03:37 -07:00
Jason Dillaman
57d2781da8 librbd: snap_remove should ignore -ENOENT errors
If the attempt to deregister the snapshot from the parent
image fails with -ENOENT, ignore the error as it is safe
to assume that the child is not associated with the parent.

Fixes: #11113
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit cf8094942c)
2015-04-01 15:54:51 -04:00
Jason Dillaman
572a2f5707 librbd: get_parent_info should protect against invalid parent
get_parent_info should return -ENOENT if the image does not
have an associated parent image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 21afd0ef8e)
2015-04-01 15:54:51 -04:00
Josh Durgin
03d2d80131 Merge pull request #4221 from xiaoxichen/rbd_discard_skip
Add rbd_discard_skip_zeroing flag

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-01 10:35:58 -07:00
Sage Weil
777dfa51f9 Merge pull request #4213 from xiaoxichen/wip-new-rocksdb
RocksDB configuration

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-01 10:05:03 -07:00
Kefu Chai
ba5bfce584 Merge pull request #4208 from dmitryya/ceph_argparse_improvement
ceph_argparse: Remove code duplication and generalize ceph_argparse_with* routines

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-01 21:38:55 +08:00
John Spray
aa7f0b3669 mds: batch up writes in SessionMap::save_if_dirty
...in order to avoid issuing lots of separate RADOS ops
if expiring a segment that contained requests for many
clients.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-01 12:21:05 +01:00
Xiaoxi Chen
e7812b8416 Add rbd_skip_partial_discard flag
If we want to discard a range of an object, we will zero(use fallocate
to punch a hole) the range now. In general this introduce some overhead(extra writes).

If the filesystem ontop of RBD holding lots of small files, this
behavior will bring big performance penalty.

Adding a flag that allow user to control if they want to zero the
range.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-04-01 14:43:23 +08:00
Haomai Wang
6055df3985 Librbd: Make image aware of more configs
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-04-01 11:15:42 +08:00
Sage Weil
52fd9c6323 ceph-disk: follow ceph-osd hints when setting up journal
- If the journal is required, require it.
- If the journal is not allowed, do not allow one to be specified
- If the journal is not wanted, to not set one up by default when none is
provided.

See #9580

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-31 17:19:32 -07:00
Sage Weil
542820d065 ceph-osd: add --check-wants-journal, --check-allows-journal
Completes OSD side of #9580

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-31 13:49:35 -07:00
Sage Weil
0c29343548 ceph-osd: fix usage
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-31 13:44:08 -07:00
Josh Durgin
01b5085235 Merge pull request #4235 from ceph/wip-rbd-unit-tests
tests: exercise all RBD features during unit testing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-31 12:36:18 -07:00
Josh Durgin
41b9cee96f Merge pull request #4232 from ceph/fix-make-conf
Fix make conf

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-31 12:34:00 -07:00
John Spray
81df12990a mds: update Makefile for removed script
Oversight in "mds: remove verify-mds-journal.sh script"

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-31 20:15:28 +01:00
Dmitry Yatsushkevich
aa77a4661c ceph_argparse: generalize ceph_argparse_with* routines
Remove code duplication by generalizing ceph_argparse_with{int,float,longlong}
routines - make one template function for those cases.

Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
2015-03-31 12:13:55 -07:00
Dmitry Yatsushkevich
b491c820bb rbd cli: remove erroneous arg for ceph_argparse_witharg
Remove erroneous arg for ceph_argparse_witharg call when '--io-pattern' parsed:
the name look up will point the compiler to bool ceph_argparse_witharg(
    std::vector<const char*> &args,
    std::vector<const char*>::iterator &i, std::string *ret, ...) when compiler
is resolving this function call. The &err argument will be wrongly interpreted
as a char * variable to be compared with the argument name pointed by i.

Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
2015-03-31 12:13:55 -07:00
Jason Dillaman
9859cae286 tests: exercise all RBD features during unit test
The librbd unit tests currently only test the old image format. Ensure
the new format and its possible features are also tested.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-31 14:34:05 -04:00
Noah Watkins
c4c646ca5b make: fix with_rbd guard
FileJournal needs stuff from blkdev.c in libcommon.

./.libs/libosd.a(libos_la-FileJournal.o): In function `FileJournal::_open_block_device()':
/home/nwatkins/src/ceph/src/os/FileJournal.cc:139: undefined reference to `get_block_device_size(int, long*)'
/home/nwatkins/src/ceph/src/os/FileJournal.cc:161: undefined reference to `block_device_support_discard(char const*)'
./.libs/libosd.a(libos_la-FileJournal.o): In function `FileJournal::do_discard(long, long)':
/home/nwatkins/src/ceph/src/os/FileJournal.cc:1587: undefined reference to `block_device_discard(int, long, long)'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-03-31 10:46:10 -07:00
Noah Watkins
18edc50e95 make: add with_rbd guard
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-03-31 10:43:49 -07:00
Gregory Farnum
aedb2ecbae Merge pull request #4231 from ceph/wip-rm-verify-mds
mds: remove verify-mds-journal.sh script

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-31 10:08:53 -07:00
John Spray
7e49804a56 mds: remove verify-mds-journal.sh script
This invokes the MDS in a way that it no longer understands,
and is unused.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-31 17:50:11 +01:00
Samuel Just
28787d2184 Merge pull request #4230 from athanatos/wip-11244
ReplicatedPG::cancel_pull: requeue waiters as well

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-31 09:47:10 -07:00
Samuel Just
5ad54359a4 Merge pull request #4219 from liewegas/wip-scrub-mtime
osd: do not update mtime when recording digest

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:45:46 -07:00
Sage Weil
fd26cd1f4e Merge pull request #4229 from athanatos/wip-scrub-hitsets
ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-31 09:39:32 -07:00
Sage Weil
9d0dcc1f06 Merge pull request #4228 from athanatos/wip-11280
Wip 11280

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-31 09:38:48 -07:00
Samuel Just
e5ff97201f Merge pull request #4207 from ceph/wip-11177
common: fix logging default channel to be 'cluster' not 'default' (11177)

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:26:56 -07:00
Gregory Farnum
ba12448c80 Merge pull request #4211 from ceph/wip-11120
osdc/Striper.cc fix stripe_count == 1 && stripe_unit != object_size

Reviewed-by: John Spray <jspray@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-31 09:26:04 -07:00
Samuel Just
0b2e272430 ReplicatedPG::cancel_pull: requeue waiters as well
If we are in recovery_wait, we might not recover that object as part of
recover_primary for some time.  Worse, if we are waiting on a backfill
which is blocked waiting on a copy_from on the missing object in
question, it can become a dead lock.

Fixes: 11244
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:21:36 -07:00
Samuel Just
23efab7d4f ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat
Fixes: 11263
Fixes: 11262
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:21:04 -07:00
Samuel Just
85307b933d ReplicatedPG: in do_op, requeue op if we requeue waiters in agent_choose_mode
The current op might be ordered after a waiter.

Fixes: 11280
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:20:28 -07:00
Samuel Just
b1f078bc22 ReplicatedPG: requeue waiting_for_active before waiting_for_cache_not_full
The waiting_for_cache_not_full waiters must be dequeued first.

Fixes: 11267
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:20:20 -07:00
Samuel Just
b0a3941ff6 ReplicatedPG::promote_object: do not create obc if not promoting
Otherwise, we can leave an incorrect cached obc around.

Introduced: 65bb4df599
Fixes: 11284
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 08:41:09 -07:00
Samuel Just
bdc664fb3d ECTransaction: write out the hinfo key on touch as well
This way, even empty objects have the hinfo key written.  That way,
touch and touch->append->truncate end up with the same state.

Fixes: 11265
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 08:30:10 -07:00
John Spray
9b171d23eb Merge pull request #4215 from ceph/wip-11258
Wip 11258

Reviewed-by: John Spray <john.spray@redhat.com>
2015-03-31 14:23:19 +01:00
Yan, Zheng
486509a3e5 mds: make sure lock state not stay in XLOCK/XLOCKDONE indefinitely
Fixes: #11254
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-31 15:08:20 +08:00
Xiaoxi Chen
4c122c1a46 Set disableDataSync to false
If datasync is disabled, we may potentially lose data
on power failure.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-03-31 08:44:57 +08:00
Xiaoxi Chen
0bd767fb7e Update RocksDB configuration to make it more clear
Add some performance critial configurations

Also group and polish the description of each configuration
to make it more clear, changed the default from 0 to actual
value.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-03-31 08:44:57 +08:00
Sage Weil
497737aabf Merge remote-tracking branch 'gh/hammer'
Conflicts:
	src/gmock
	src/osd/ReplicatedPG.cc
2015-03-30 15:41:13 -07:00
Josh Durgin
febb5a47f0 librados: define C++ global flags from the C constants
This will help prevent drift in the future. It also makes it clear
that the flags are supposed to have the same values.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-03-30 15:29:24 -07:00
Josh Durgin
b2b436906d test: add librados global op flags test
Just verify that the read gets the right data, to demonstrate that
passing a flag doesn't cause problems.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-03-30 15:19:25 -07:00
Sage Weil
c7de236d2f os/KeyValueDB: skip experimental check for test_init
We don't want to spit out the warning twice, and we don't have cct
anyway.

Also test_init is annoying; we should try to kill it.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 15:14:15 -07:00
Josh Durgin
7e5b81b381 Revert "librados: remove the unused flags."
This reverts commit 4bd2bd6bb8.

These constants are the only way these flags are exposed through the C
interface. C users can't include librados.hpp.  Ideally we would have
only one version of these (just the C ones), but the C++ ones came
first and need to stay for backwards compatibility.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-03-30 13:22:16 -07:00
Sage Weil
2e908f1e87 Merge pull request #3878 from ceph/wip-dirty-pg-keys
osd: coalesce into single omap_setkeys for normal writes

Tested-by: Andreas Bluemle <andreas.bluemle@itxperts.de>
Reviewed-by: David Zafman <dzafman@redhat.com>
2015-03-30 11:18:56 -07:00
Loic Dachary
b28a42ce32 Merge pull request #4212 from zhouyuan/isal_2.13
erasure-code: Update ISA-L to 2.13

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-03-30 20:17:38 +02:00
Sage Weil
a05871a185 Merge pull request #4160 from ceph/wip-rocksdb
update rocksdb
2015-03-30 10:57:07 -07:00
Sage Weil
8e5d4c66dc osd: drop unused utime_t now arg to issue_repop
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:45:00 -07:00
Jianpeng Ma
8db4056ba8 osd: do not update mtime when recording digest
The user mtime and local_mtime are normally set in finish_ctx based on the
value of ctx->mtime; clear that to avoid this update.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
[Sage: simplified]
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:41:58 -07:00
Sage Weil
a4c01f38f1 mark kinetic experimental
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:00:01 -07:00
Sage Weil
002b7fdadf mark rocksdb experimental
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:00:01 -07:00
John Spray
1b0b598394 mds: persist completed_requests reliably
Ensure that if this was modified during
a segment, and the session is not
persisted for some other reason, we
go ahead and persist it at the end
of the segment.

Fixes: #11048
Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-30 13:53:49 +01:00
Loic Dachary
6f4936ee96 Merge pull request #4131 from t-miyamae/wip-mshec-documentation-h2
erasure code: add shec's documentation / change default layout

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-03-30 14:37:08 +02:00
Haomai Wang
c4d8e65d38 Librbd: Add existing rbd configs to aware table
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-03-30 18:42:36 +08:00
Haomai Wang
cf715bd3e1 Librbd: Add tests for aware metadata config
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-03-30 18:29:22 +08:00
Yan, Zheng
ccdeaf87df mds: fix out-of-order messages
When MDS is no longer laggy, it should process deferred messages
first, then process newly received messages.

Fix: #11258
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-30 17:49:06 +08:00
Kefu Chai
f47a572424 Merge pull request #4183 from stiopaa1/OSDMonTrailingSpaces
mon/OSDMonitor: remove trailing whitespaces

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-30 16:43:37 +08:00
Haomai Wang
364e15b8a3 Librbd: Add basic metadata aware method
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-03-30 16:38:08 +08:00
Yuan Zhou
59aa6700fa erasure-code: Update ISA-L to 2.13
ISA-L 2.13 brings better performance on Avoton (20%). There's no impact on Xeon
platform. The details are in the release notes.

There's a new API ec_encode_data_update() for incremental encoding
and decoding. The other highlevel API keeps the same as in 2.10

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
2015-03-30 13:39:31 +08:00
Yan, Zheng
ad15f7d795 osdc/Striper.cc fix stripe_count == 1 && stripe_unit != object_size
Fixes:11120
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-30 11:30:35 +08:00
Noah Watkins
f5a95dc700 java: dump extra info for ftruncate assertion
Nightly ran and encountered a situation in which fstat following
ftruncate reported a size not equal to the truncated size.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-03-27 19:09:15 -07:00
David Zafman
491474f7b7 test: Add testing for PGLog::filter_log()
Indirectly tests pg_log_t::filter_log()

Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-27 18:25:24 -07:00
David Zafman
1fcd3fbdef osd: Create a filter_log for PGLog
This could be tested as a way to test pg_log_t::filter_log()

Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-27 18:23:08 -07:00
David Zafman
c751191f65 ceph-objectstore-tool, osd: Filter the pg_log_t for objects no longer in pg
Fixes: #11184

Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-27 18:23:08 -07:00
Sage Weil
ccc08397e6 common: send cluster log messages to 'cluster' channel by default
The CLOG_CHANNEL_DEFAULT constant was being abused for two purposes:

 - the default channel to log messages to
 - the name of the config option key in the key/value pair string that is
   used for the default option, e.g. "default=true foo=false bar=false"

Fix this by making the config option key CLOG_CONFIG_DEFAULT_KEY and
replacing throughout, and changing CLOG_CHANNEL_DEFAULT to "cluster" (as
it should be and has been historically).

Fixes: #11177
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-27 15:35:21 -07:00
John Spray
b489f94a98 mds: separate MDLog::safe_pos from journaler
...and update it via wait_For_flush completions, so
that its updates are ordered with respect to the
callbacks that happen after a log event is persisted.

Fixes: #10368
Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-27 22:17:55 +00:00
Gregory Farnum
71a0c793ab Merge pull request #4203 from Vicente-Cheng/fixed-get-mdsmap-assertion
mds: fixed the ceph get mdsmap assertion.

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-27 11:35:30 -07:00
Gregory Farnum
c50f5b1e26 Merge pull request #4173 from ceph/wip-mds-kill-session
Wip mds kill session

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: John Spray <jspray@redhat.com>
2015-03-27 11:29:19 -07:00
Gregory Farnum
7721b224c4 Merge pull request #4168 from ceph/wip-11226-dir-fx
RFC client: Hold on to exclusive caps on directories we "own"

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-27 11:28:31 -07:00
Gregory Farnum
0e4a75b2e3 Merge pull request #4177 from ceph/wip-11226-extra
Wip 11226 extra

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-27 11:27:58 -07:00
Gregory Farnum
413da564d4 Merge pull request #4189 from ceph/wip-11236
test_libcephfs: do cleanup in ReleaseMounted test

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-27 11:26:21 -07:00
Gregory Farnum
bd1d11f6eb Merge pull request #4192 from ceph/wip-11218
#11218: Multi-MDS fixes for 'damaged' ranks

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-27 11:24:50 -07:00
Josh Durgin
015c643735 Merge pull request #4199 from ceph/wip-11250
cls_rbd: fix read past end of bufferlist c_str() in debug log msg

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-27 08:51:19 -07:00
Sage Weil
59143d141c Merge pull request #4194 from athanatos/wip-11199
ReplicatedPG: trim backfill intervals based on peer's last_backfill_star...

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-27 08:15:29 -07:00
Sage Weil
efb66b9120 Merge pull request #4195 from athanatos/wip-11197
PG: set/clear CREATING in Primary state entry/exit

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-27 08:10:20 -07:00
Mykola Golub
e08bccf377 vstart.sh: set PATH to include pwd
ceph-mon needs crushtool to be in PATH. Don't set if it is run
from ceph_vstart_wrapper, which already sets it as it needs.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-27 15:44:35 +02:00
Vicente Cheng
f4398d2e6c Fixed the ceph get mdsmap assertion.
When we want to get mdsmap, we try to get_version()
    and the return value err = 0 means success.

    The assert verified r == 0. r would not change in this flow.
    It always meet assert and lead mon failure.

    I think this verify should be:
        assert(err == 0)
    It will help to check return value of get_version().

If you have any questions, feel free to let me know.
Thanks!

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
2015-03-27 18:49:28 +08:00
Kefu Chai
fc9426a5a1 xlist: add compare operator for iterator
* and add basic test cases for xlist

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-03-27 17:35:56 +08:00
Mykola Golub
21699fcf70 mon: osd setcrushmap: use own timeout implementation
instead of relying on external util.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-27 10:08:22 +02:00
Mykola Golub
bc8c2b7d65 common: SubProcess: timeout support
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-27 10:08:21 +02:00
Mykola Golub
ec024419f4 crush: CrushTester::test_with_crushtool: use SubProcess to spawn crushtool
Fixes and improvements this brings:

* Use _exit(2) instead of exit(2) if exec(3) failed (does not call the atexit
  functions, removing asock and pid files in the child process).
* Close all parent descriptors before exec(3).
* Log crushtool stderr.
* SubProcess is covered by unit tests.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-27 10:08:21 +02:00
Mykola Golub
538852133b common: SubProcess: helper class to spawn subprocess
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-27 10:08:21 +02:00
Yan, Zheng
d789f44074 mds: properly remove inode after purging stray
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-27 15:10:53 +08:00
Sage Weil
ea32960f58 cls_rbd: fix read past end of bufferlist c_str() in debug log msg
Fixes: #11250
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-26 21:00:00 -07:00
Sage Weil
877d5d8820 Merge pull request #4171 from majianpeng/cleanup
common: print hexadecimal for ghobject_t.generation.

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-26 17:45:20 -07:00
David Zafman
f9b98c94e6 ceph-objectstore-tool: Fix message and make it debug only to stderr
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-26 16:25:31 -07:00
David Zafman
923d53235a ceph-objectstore-tool: Remove bogus comment and eliminate a debug message
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-26 16:24:21 -07:00
Sage Weil
90c38b5b97 rocksdb: fix 32-bit build
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-26 11:04:18 -07:00
Sage Weil
ddad2d4465 Makefile-rocksdb.am: update for latest rocks
Lots of files changed here; rebuilt the list from scratch.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-26 11:01:35 -07:00
Samuel Just
c176ebf791 osd/: Move ReplicatedBackend methods into ReplicatedBackend.cc
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-26 10:50:19 -07:00
Samuel Just
e9d6096f25 ReplicatedPG: remove unused C_OnPushCommit
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-26 10:44:00 -07:00
Josh Durgin
887354099e Merge pull request #4113 from wonzhq/rbd-fix
rbd: misc fixes

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-26 10:06:37 -07:00
John Spray
6413209ef3 mds: include damaged in MDSMap::dump
Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-26 15:48:55 +00:00
John Spray
3b2a0917e8 mds: update peer failure response to account for damaged
...by calling get_down_mds_set instead of get_failed_mds_set.

Also remove a redundant if(true) around this region.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-26 13:11:44 +00:00
John Spray
f311bb77e3 mds: add get_down_mds_set method
For places where we would like to treat failed
and damaged MDS ranks the same, like detecting
when someone has dropped offline.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-26 13:11:44 +00:00
John Spray
7eccf920ba mds: account for 'damaged' in MDSMap::is_degraded
Fixes: #11218
Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-26 13:11:44 +00:00
John Spray
aae265bfe1 mds: clarify MDBalancer::send_heartbeat
The initial is_degraded() check guarantees that
the 'in' set is equal to the 'up' set.  Later,
this calls get_mds_set and assigns it to a variable
called 'up'.

It's clearer to use get_up_mds_set into the variable
called up (this was confusing when debugging #11218
which was itself a result of is_degraded() ignoring
damaged ranks).

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-26 12:54:53 +00:00
Yan, Zheng
c7d5c02680 test_libcephfs: do cleanup in ReleaseMounted test
Fixes: #11236
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-26 15:21:52 +08:00
Loic Dachary
9008a3391d Merge pull request #4188 from XinzeChi/wip-test-1
test: add compile-command for test_ceph_daemon.py

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-03-26 07:45:05 +01:00
Xinze Chi
9418e432ad test: add compile-command for test_ceph_daemon.py
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
2015-03-26 13:58:33 +08:00
Jianpeng Ma
aa6a46cfd9 common: print hexadecimal for ghobject_t.generation & shard_id
In filestore, it use hexadecimal for ghobject_t.generation &
shard_id. Make the same.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-03-26 13:51:02 +08:00
Kefu Chai
4d6b9d1b13 python-rados: extract type-checking into a decorator
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2015-03-26 09:43:51 +08:00
Michal Jarzabek
b9e89fcb0b mon/OSDMonitor: remove trailing whitespaces
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2015-03-25 21:22:31 +00:00
Greg Farnum
e51761233e ReplicatedPG: fix a signed/unsigned comparison warning
This mismatch about whether pool IDs are signed or unsigned is
a persistent annoyance. I'm now casting the unsigned down to signed space
because apparently the OSD is using negative IDs for temporary object
namespaces.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-03-25 12:03:38 -07:00
Greg Farnum
0c6bd2775f client: Hold on to exclusive caps on directories we "own"
If a directory is complete, we *really* want to keep the exclusive cap
so that we don't end up needing to do MDS lookup requests on every cache
miss.

Fixes: #11226

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-03-25 11:10:56 -07:00
Sage Weil
edf64dd564 osd: do not double-write log entries
The pg_log.add() call already dirties the log such that the later
write_log() call will write it.  There is no need to encode it separately
here and then explicitly omap_setkeys() it.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-25 10:34:45 -07:00
Sage Weil
34c7d2c527 osd: combine info and log writes into single omap_setkeys
This saves a surprising amount of CPU.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-25 10:32:02 -07:00
Sage Weil
b486e58695 osd: pass map to write_info instead of txn
No real change yet.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-25 10:32:02 -07:00
Sage Weil
2724ce2d1b Merge remote-tracking branch 'gh/hammer'
Conflicts:
	src/gmock
2015-03-25 10:30:20 -07:00
Samuel Just
ddf0292250 PG: set/clear CREATING in Primary state entry/exit
Previously, we did not actually set it when we got a pg creation message from
the mon.  It would actually get set on the first start_peering_interval after
that point.  If we don't get that far, but do send a stat update to the mon, we
can end up with 11197.  Instead, let's just set it and clear it upon entry into
and exit from the Primary state.

Fixes: 11197
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-25 10:29:07 -07:00
Sage Weil
1b81d8c029 Merge pull request #3688 from XinzeChi/wip-clear-transaction
osd: new transcation if needed

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-25 10:28:25 -07:00
Sage Weil
cc3527a51e Merge pull request #3870 from majianpeng/cache-tier
Cache tier bug fixs

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-25 10:27:56 -07:00
Sage Weil
6748ff9522 Merge pull request #3679 from mslovy/wip-findObjectContext-opt
ReplicatedPG:: find_object_context clear extra creation (head,snapdir)

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-25 10:24:43 -07:00
Sage Weil
82d9153f01 Merge pull request #4065 from majianpeng/pgop-memleak
osd/ReplicatedPG: Fix a memory leak in do_pg_op.

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-25 10:24:17 -07:00
Sage Weil
29d0d46db8 Merge pull request #3974 from majianpeng/fgetattr-fix
os/FileStore: For getxattr, enlarge the value size avoid try again.

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-25 10:24:00 -07:00
Sage Weil
c639ce51ac Merge pull request #3604 from yghannam/yazen-testing
crc32c: add aarch64 optimized crc32c implementation

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-25 10:06:46 -07:00
Sage Weil
dca722ec7b Merge pull request #4073 from jdurgin/wip-lttng-daemon
common, global: use lttng ust functions for handling fork-like calls

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-25 10:06:13 -07:00
Kefu Chai
8654b65740 Merge pull request #4000 from ceph/wip-da-SCA-20150312
Fixes for Covertity issues

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-26 00:12:35 +08:00
Samuel Just
6994648bc4 Merge pull request #4128 from dzafman/wip-11139-hammer
ceph-objectstore-tool: Use exit status 11 for incompatible import attemp...

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-03-25 08:29:31 -07:00
Samuel Just
0ff3d58757 Merge pull request #4124 from ceph/wip-omap-clear
osd: fix omap_clear handling

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-03-25 08:27:59 -07:00
Alfredo Deza
6e6771e616 ceph-disk: add test files to EXTRA_DIST
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-03-25 10:10:43 -04:00
Alfredo Deza
b3019824bb ceph-disk: remove double import
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-03-25 09:47:13 -04:00
Alfredo Deza
0f267c15ea ceph-disk: create initial structure for tox/unit tests
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-03-25 09:46:16 -04:00
Xinze Chi
2b37d12435 osd: more useful message to find out potential unhealth osd
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
2015-03-25 19:44:29 +08:00
Yan, Zheng
89fd137fb4 client: conclude -ENOENT when there is null dentry
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-25 18:20:39 +08:00
Yan, Zheng
ba62027189 client: don't clear COMPLETE flag when trimming null dentry
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-25 18:20:39 +08:00
Yan, Zheng
73e3358000 mds: make sure readdir reply include Fs cap for directory
filelock in LOCK_XSYN state does not allow Fs cap. so client can't
mark directory as complete when handling the readdir reply.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-25 18:20:38 +08:00
Mykola Golub
0c396f85ed test: test_lost.sh: update tests
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-25 09:32:03 +02:00
Mykola Golub
255dd6428d osd: add tests for 'pg mark_unfound_lost' command after osd lost
Fixes: #10976

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-25 09:31:57 +02:00
Mykola Golub
5bb5132013 osd: fix PG::all_unfound_are_queried_or_lost for non-existent osds
A common mistake upon osd loss is to remove the osd from the crush map
before marking the osd lost. This tends to make it so that the user
can no longer mark the osd lost to satisfy all_unfound_are_queried_or_lost.

The simple solution is for all_unfound_are_queried_or_lost to ignore
the osd if it does not exist.

Fixes: #10976
Backports: firefly,giant

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-25 09:31:52 +02:00
Mykola Golub
e6bd722def test: test_common.sh: start_recovery: don't use deprecated command
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-25 09:31:46 +02:00
Mykola Golub
5019eae23f test: test_common.sh: stop_osd: wait for osd termination before return
This fixed races in tests when an osd is starting while the previos
process is not finished yet.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-03-25 09:31:40 +02:00
Zhiqiang Wang
560a5839c0 osd/ReplicatedPG: don't check order in finish_proxy_read
Read doesn't need to be ordered. So when proxy read comes back from base
tier, it's not necessarily at the front of the in progress list.

Fixes: #11211

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
2015-03-25 14:47:10 +08:00
Yan, Zheng
2d6277683b mds: drop replayed requests when seesion is closed
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-25 10:47:22 +08:00
Yan, Zheng
8f91547654 mds: fix crash when killing busy session
journal_close_session() has already freed pending_prealloc_inos

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-03-25 10:38:28 +08:00