Commit Graph

43021 Commits

Author SHA1 Message Date
Loic Dachary
aefcf6d385 tests: ceph-helpers.sh reduce kill_daemon verbosity
When a test fails, the script returns immediately and kill_daemon
function is called to cleanup. It is quite verbose and requires
scrolling hundreds of lines back to find the actual error
message. Turn off the shell trace to reduce the verbosity and improve
error output readability.

The kill_daemon cannot just turn off set -x because it may be called by
a test, not just at the end of the run. Instead the kill_daemon function
checks if tracing is activated and temporarily disables it.

Also get rid of the find standard error that commonly happens when
kill_daemon is called to verify there are no leftovers and the test
directory does not exist.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-07-08 13:58:10 +02:00
Orit Wasserman
f9c682aa34 Merge pull request #5109 from ceph/wip-rgw-orphans-2
Wip rgw orphans 2
2015-07-08 11:30:01 +02:00
Gregory Farnum
016f57da85 Merge pull request #5151 from majianpeng/make-morereaable-dump-ops
common/TrackedOp: Make get_duration get correctly value.

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-08 10:00:27 +01:00
Haomai Wang
d5c697ad79 Merge pull request #5166 from yuyuyu101/wip-async-fix-17
AsyncConnection: Only prepare message when it support fast dispatch
2015-07-08 16:28:18 +08:00
Kefu Chai
6991bf49b1 Merge pull request #5157 from rajukv/wip-xio-rajukv
XIO: Add missing fastpath events to OSD

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-08 15:18:55 +08:00
Haomai Wang
e2454ee2cc AsyncConnection: Only prepare message when it support fast dispatch
Not all messages support reencode now, we just avoid them prepare firstly when
call "send_message"

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-07-08 11:32:29 +08:00
Yan, Zheng
34b939a81d client: reference counting 'struct Fh'
The async readahead finisher needs to reference 'struct Fh'. But
it's possible user closes FD and free the corresponding 'struct Fh'
before async readahead finishes.

Fixes: #12088
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-07-08 10:12:47 +08:00
Jianpeng Ma
998fe78197 common/TrackedOp: Make get_duration get correctly value.
For get_duration(), it should return the duration of Op. For ops which in
flight, the duration is the time current time subtrace the
initiated_time. For the completed Ops, it used the last event(done)
subtrace the initiated_time.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-08 09:01:19 +08:00
Haomai Wang
07a2a131e1 Merge pull request #4837 from xinxinsh/wip-kv-zero
in _zero() function, we should remove strips to minimize keyvalue DB update

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
2015-07-07 22:35:34 +08:00
John Spray
840011ba13 mds: safety around rejoin/resolve_done hooks
These should all have already been safe as rejoin/resolve
path only happens once, but lets assert as well so that
any logic bugs don't turn into segfaults.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-07 13:49:39 +01:00
Raju Kurunkad
cbc2a0ff67 XIO: Add missing fastpath events to OSD
Without this incoming fastpath messages will be dropped at OSD due to missing OSD::Session

Signed-off-by: Raju Kurunkad <raju.kurunkad@sandisk.com>
2015-07-07 16:13:32 +05:30
Mykola Golub
b53e3e275f qa: add tests for 'ceph mds metadata' command
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-07-07 09:59:32 +03:00
Mykola Golub
1883e46fbe mon: MDSMonitor: keep last_metadata in memory
Previously, update_metadata() read last_metadata from the store, added
a new metadata to the transaction, and triggered propose, so metadata
eventually was updated in the store. But if during this time window
another update_metadata() happened, it read old metadata (without the
new mds from the first update), and when it was committed the new mds
from the first update was lost.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-07-07 09:58:34 +03:00
Mykola Golub
c5a09a6bd1 mon: MDSMonitor: use pending_mdsmap when selecting items to remove
This fixes the issue with stale metadata records, observed after mds
restart.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-07-07 09:07:53 +03:00
Mykola Golub
60ff33740d mon: reset pending_proposal after dumping to log
It fixes crashes when running with 'debug paxos = 30'.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-07-07 09:07:53 +03:00
xinxin shu
32b9d637a3 generic check return code of get operation
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-07-07 13:46:28 +08:00
Kefu Chai
03f3fc4aba Merge pull request #5138 from majianpeng/cleanup
common/TrackedOp: code cleanups

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-07 10:15:20 +08:00
Kefu Chai
d0f0f07e12 Merge pull request #5148 from tchaikov/wip-fix-facility-syslog
mon/LogMonitor: use the configured facility if log to syslog

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2015-07-07 10:06:46 +08:00
Josh Durgin
72a0185ecc Merge remote-tracking branch 'origin/next' 2015-07-06 16:02:23 -07:00
John Spray
06e01824d8 Merge pull request #5142 from cernceph/wip-nukememmax
mds: nuke the unused mds_mem_max option

Reviewed-by: John Spray <john.spray@redhat.com>
2015-07-06 22:45:56 +01:00
Josh Durgin
f75cdafacf Merge pull request #5154 from ceph/wip-rbd-queue-depth
rbd: recognize queue_depth option

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-06 14:42:53 -07:00
Josh Durgin
dea73c1ddd Merge pull request #5146 from ceph/wip-12215-next
librbd: don't attempt to invalidate an object map in R/O mode

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-06 14:41:16 -07:00
Josh Durgin
a22f9ed5e0 Merge pull request #5145 from ceph/wip-12214-next
librbd: fix TestObjectMap.InvalidateFlagInMemoryOnly test

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-06 14:40:20 -07:00
Josh Durgin
05f0956216 Merge pull request #5131 from ceph/wip-12069-next
librbd: propagate errors from image close

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-06 14:27:00 -07:00
Orit Wasserman
f567120cce Merge pull request #5108 from ceph/wip-12079
Wip 12079
2015-07-06 21:50:29 +02:00
Yehuda Sadeh
f02ca61071 rgw: conversion tool to fix broken multipart objects
Fixes: #12079

Broken multipart objects: multipart objects that created on 0.94.2
and that start with underscore have a bad locator on their tail objects.
This extends the tool that was needed for older issue we've had with
hammer multipart objects (that start with underscore). The same usage
applies:

$ radosgw-admin bucket check --check-head-obj-locator \
                             --bucket=<bucket> [--fix]

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-07-06 11:09:28 -07:00
Yehuda Sadeh
3f4dab7b41 Merge pull request #5153 from oritwas/fix-cmake-3
Add libradosstriper to cmake

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-07-06 09:00:16 -07:00
Kefu Chai
627686c846 Merge pull request #5149 from tchaikov/wip-fix-erasure-hides-parse
erasure-code: do not hide overloaded ErasureCode::parse()

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-07-06 22:20:35 +08:00
Ilya Dryomov
89c2a0b58a rbd: recognize queue_depth option
.. and also stress the difference between libceph and rbd mapping
options.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-06 16:32:15 +03:00
Alfredo Deza
c042c0ae4e Merge pull request #5115 from ceph/wip-12037
Add unit/tox structure for ceph python script

Reviewed-by: Travis Rhoden <trhoden@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2015-07-06 08:24:35 -04:00
Orit Wasserman
75a8e233a3 Add libradosstriper to cmake
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2015-07-06 12:12:47 +02:00
Kefu Chai
9760c220b8 erasure-code: do not hide overloaded ErasureCode::parse()
* this change fixes the warning from clang:
  ErasureCodeJerasure::parse' hides overloaded virtual function
  [-Woverloaded-virtual]
* some erasure codecs' ErasureCode::parse() rewrites the profile
  using the default values when parsing it if the corresponding
  items are not specified. and we don't call ErasureCode::parse()
  via its children's references. so no need to make it a virtual
  function.
* and ErasureCode::parse() is used as a helper function by its
  children, so make it `protected`
* and parse() in ErasureCode's children is but a helper function
  called by ctor, descendants' parse() and init(). so make them
  protected or private accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-06 17:29:19 +08:00
Piotr Dałek
9bcf5f065c tools: fix race condition in seq/rand bench
Under certain conditions (like bench seq/rand -b 1024 -t 128) it is
possible that aio_read reads data into destination buffers before or
during memcmp execution, resulting in "[..] is not correct!" errors
even if actual objects are perfectly fine.
Also, moved latencty calculation around, so it is no longer affeted
by memcmp.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2015-07-06 09:56:11 +02:00
Jianpeng Ma
d7585c020d common/TrackedOp: check tracking_enabled for event "initiated/done".
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-06 13:49:42 +08:00
Kefu Chai
4d2ca37d3b mon/LogMonitor: use the configured facility if log to syslog
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-06 12:17:51 +08:00
Jianpeng Ma
edefd05edc common/TrackedOp: clean up code make look good.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-06 10:48:36 +08:00
Kefu Chai
5c6075f2e0 Merge pull request #4394 from majianpeng/tools-copyget-flags
add fadvise flags for rados/rbd

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-06 01:23:01 +08:00
Kefu Chai
9c81dafd47 Merge pull request #4937 from majianpeng/replicated-misc-fix
ReplicatedPG: small bugs and clean up

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-06 01:20:30 +08:00
Kefu Chai
e376a2113e Merge pull request #5141 from XinzeChi/wip-crush-rule
mon/PGMonitor: bug fix pg monitor get crush rule

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-06 01:18:21 +08:00
Jason Dillaman
64d740f8fa librbd: don't attempt to invalidate an object map in R/O mode
The ImageWatcher is not initialized when in R/O mode, which
resulted in a NULL pointer dereference.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-05 11:09:09 -04:00
Jason Dillaman
f8a7b50798 librados_test_stub: read op should return number of bytes read
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-05 10:47:38 -04:00
Jason Dillaman
2ace2b77f8 tests: fixed TestObjectMap.InvalidateFlagInMemoryOnly
librados and librados_test_stub return different result codes
for a read full object operation.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-05 10:35:28 -04:00
Haomai Wang
4cab1c47ee Merge pull request #5135 from yuyuyu101/wip-async-fix-16
AsyncConnection: Fix incorrect sign message behavior
2015-07-04 23:18:51 +08:00
Kefu Chai
02b75beaee Merge pull request #5144 from tchaikov/wip-fix-tools-rados
tools: fix segfault tools/rados introduced by 0f7aeee

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
2015-07-04 13:51:31 +08:00
Kefu Chai
813897c184 obj_bencher: remove trailing space
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-04 13:27:07 +08:00
Kefu Chai
76ba367f70 tools/rados: fix the segfault introduced in 0f7aeee
prefix and run_name should not be initialized by a temporary string

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-04 13:25:39 +08:00
Loic Dachary
bb33d99e8d Merge pull request #5134 from stiopaa1/ThreadAddConsts
common/Thread: added const to 2 functions

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-07-03 17:49:20 +02:00
Haomai Wang
0e7328c9f3 AsyncConnection: Fix incorrect sign message behavior
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-07-03 21:42:21 +08:00
Loic Dachary
97ce0c533a Merge pull request #5128 from ceph/wip-fix-doc
doc: fix the build

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-07-03 15:05:02 +02:00
Xinze Chi
498793393c mon/PGMonitor: bug fix pg monitor get crush rule
when some rules have been deleted before, the index in array of crush->rules
is not always equals to crush_ruleset of pool.

Fixes: #12210
Reported-by: Ning Yao <zay11022@gmail.com>
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
2015-07-03 19:31:36 +08:00