Commit Graph

42760 Commits

Author SHA1 Message Date
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
Nathan Cutler
4dd1e67de5 ceph.spec.in: fix _with_systemd conditional
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-03 10:18:44 +02:00
Kefu Chai
b3f364e86c Merge pull request #5071 from cxwshawn/master
obj_bencher: check run_name and prefix for empty string instead of NULL

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-03 15:49:49 +08:00
shawn chen
0f7aeee1d9 obj_bencher: check run_name and prefix for empty string instead of NULL
change aio_bench and clean_up parameter const char * to const std::string & format.
In rest_bench.cc, aio_bench used run_name.c_str(), so this format will always be empty
string not NULL, so the condition statement
const std::string run_name_meta = (run_name == NULL ? BENCH_LASTRUN_METADATA : std::string(run_name));
is wrong!

test fix:
    before:
        ./rest-bench --seconds 1 -t 2 -b 100 write --api-host=radosgw.com --bucket=test_rm --access-key=FTL7TSJAGXX5KKDQHMJM  --secret=123456879
        use s3cmd ls s3://test_rm , we can a lot of objects in this bucket, objects are not cleaned up.
    after changes, do the same procedure, objects are cleaned up.

Signed-off-by: shawn chen <cxwshawn@gmail.com>
2015-07-03 11:17:58 +08:00
Michal Jarzabek
3b5620d969 common/Thread: added const to 2 functions
Changed get_thread_id and am_self to const member functions

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2015-07-02 21:08:17 +01:00
Jason Dillaman
8a25674204 rbd: explicitly close images to check for unexpected errors
While errors shouldn't occur during image close, it is possible that
they could occur.  In this case, the user should be informed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-02 12:59:45 -04:00
Jason Dillaman
273421f770 pybind: RBD close can now raise an exception on close
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-02 12:47:23 -04:00
Jason Dillaman
7ef4af5d33 librbd: closing images now returns a result code
Added new librbd::Image::close method to allow checking the close result
when using the C++ librbd library.  rbd_close is no longer hard-coded to
return 0.

Fixes: #12069
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-02 12:47:12 -04:00
Dan van der Ster
8cc0cf025a mds: nuke the unused mds_mem_max option
mds mem max has been a noop since argonaut. Nuke it because it
is misleading.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2015-07-02 16:44:40 +02:00
Kefu Chai
40399e38fa doc: indent warning messages in add-or-rm-osds.rst
otherwise they are rendered as normal text

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-02 20:59:23 +08:00
Kefu Chai
253e256964 doc: fix the link in dev/quick_guide
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-02 20:50:48 +08:00
Jianpeng Ma
efccc58f1e osd/ReplicatedPG: for writefull, offset is zero so replace offset w/ zero.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-02 17:05:53 +08:00
Jianpeng Ma
89a7b12e1a osd/Replicated: Using write_update_size_and_usage for WRITEFULL.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-02 16:59:10 +08:00
Jianpeng Ma
a1005b11ae osd/Replicated: First calc crc then call write_update_size_and_usage.
Because write_update_size_and_usage will change oi.size which cause
don't calc new crc.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-02 16:50:41 +08:00
Kefu Chai
8202767f3f Merge pull request #5125 from majianpeng/print-blocked-op
mon/PGMonitor: Make blocked Op message more readable.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-02 12:44:58 +08:00
Jianpeng Ma
df2c9844e7 mon/PGMonitor: Make blocked Op message more readable.
W/O this patch:
root@dev:/var/log/ceph# ceph health detail
HEALTH_WARN 1 pgs stuck unclean; 2 requests are blocked > 32 sec; 1 osds
have slow requests; recovery 5/115 objects degraded (4.348%); recovery
1/38 unfound (2.632%); too few PGs per OSD (15 < min 30)
pg 2.1 is stuck unclean for 899.708271, current state active, last
acting [2,3,0,1]
1 ops are blocked > 1048.58 sec
1 ops are blocked > 262.144 sec
1 ops are blocked > 1048.58 sec on osd.2
1 ops are blocked > 262.144 sec on osd.2
1 osds have slow requests
recovery 5/115 objects degraded (4.348%)
recovery 1/38 unfound (2.632%)
too few PGs per OSD (15 < min 30)

W/ this patch:
ceph health detail
HEALTH_WARN 1 pgs stuck unclean; 2 requests are blocked > 32 sec; 1 osds
have slow requests; recovery 5/115 objects degraded (4.348%); recovery
1/38 unfound (2.632%); too few PGs per OSD (15 < min 30)
pg 2.1 is stuck unclean for 427.103877, current state active, last
acting [2,3,0,1]
1 ops are blocked > 524.288 sec on osd.2
1 ops are blocked > 131.072 sec on osd.2
1 osds have slow requests
recovery 5/115 objects degraded (4.348%)
recovery 1/38 unfound (2.632%)
too few PGs per OSD (15 < min 30

Later messages looks better.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-02 09:59:53 +08:00
Jianpeng Ma
db1643d4b1 osd/ReplicatedPG: For WRITEFULL replica object, only truncate if new
size less than old size(only truncate to new size)

If new size larger or equal old size, no need do truncate.
It can diretcly overwrite.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-07-02 08:18:16 +08:00
Kefu Chai
cb44cbd440 Merge pull request #4951 from SUSE/wip-432-missing-divergent
osd_types.cc: replace count with iterator in add_next_event function

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-02 00:29:26 +08:00
Gregory Farnum
58814709bc Merge pull request #5074 from majianpeng/mds-small-max-event
mds: fix mds crash when mds_max_log_events smaller.

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-01 16:49:40 +01:00
Kefu Chai
ec132a7986 Merge pull request #4166 from sponce/wip-10759
tools: rados cli --striper

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-07-01 23:32:57 +08:00
Kefu Chai
6df56f252b Merge pull request #4928 from xiaoxichen/wip-cleanup-key
os/{LevelDB,Rocks}Store: don't keep key_list in transaction

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-01 22:41:03 +08:00
Kefu Chai
725b6097d0 Merge pull request #5113 from tchaikov/wip-11840-reject-multiple-tiering
mon: disallow adding a tier on top of another tier

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-01 20:57:47 +08:00
Alfredo Deza
ce0c8f8f2d test: ignore symlinked ceph.py file
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-07-01 08:34:15 -04:00
Alfredo Deza
8b53568503 test: ignore symlinked ceph_disk.py file
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-07-01 08:34:14 -04:00
Alfredo Deza
a30aa952c4 ceph.in: linter cleanup, remove unused imports
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-07-01 08:34:14 -04:00
Alfredo Deza
e296793eea test: create python test files for ceph cli
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-07-01 08:34:08 -04:00
Kefu Chai
5c3d074051 mon: disallow adding a tier on top of another tier
multiple tiering is not supported at the moment

Fixes: #11840
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-01 19:27:37 +08:00
Gregory Farnum
f32c00d860 Merge pull request #5112 from tchaikov/wip-12120
fix a couple build warnings

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-01 12:08:11 +01:00
Kefu Chai
e819a3c734 client: return EINVAL if iovcnt < 0 for p{read,write}v()
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-01 17:13:05 +08:00
Kefu Chai
19a75f1bd5 tools: fix deprecated warning
s/set_op_flags/set_op_flags2/

Fixes: #12120
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-01 17:12:58 +08:00
Sage Weil
5f8ecf2247 crush/CrushTester: fix signed/unsigned warning
Fixes: #12120
Signed-off-by: Sage Weil <sage@redhat.com>
2015-07-01 17:12:51 +08:00
Sage Weil
373e065037 client: fix signed/unsigned warnings in preadv code
Fixes: #12120
Signed-off-by: Sage Weil <sage@redhat.com>
2015-07-01 17:12:25 +08:00
Haomai Wang
1102c54768 Merge pull request #5107 from yuyuyu101/wip-fix-async-14
AsyncConnection: Move sign_message to write_message
2015-07-01 14:56:04 +08:00
Yan, Zheng
fb28226a75 Merge pull request #5070 from ceph/wip-4161
mds: store layout on header object
2015-07-01 09:00:11 +08:00
Haomai Wang
67fa726061 AsyncConnection: Move sign_message to write_message
sign_message require correct connection feature which may wrong when preparing
message

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-07-01 00:58:34 +08:00
Loic Dachary
59023a5390 Merge pull request #5105 from Oxygen31/master
doc : missing link in "quick_guide.rst"

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-06-30 17:25:09 +02:00
unknown
504a48a3d3 doc : missing link in "quick_guide.rst"
Fixes: #12009

Signed-off-by: Germain CHIPAUX <germain.chipaux@gmail.com>
Signed-off-by: Thomas LAUMONDAIS <thomas.laumondais@gmail.com>
Signed-off-by: Pierre CHAUMONT <pierre.chaumont31@gmail.com>
Signed-off-by: Benjamin TROQUEREAU <benjamin.troquereau@gmail.com>
Signed-off-by: Benjamin SESIA <benjamin.sesia@gmail.com>
2015-06-30 15:58:17 +02:00
Kefu Chai
5f20add5c0 Merge pull request #5084 from JevonQ/fix-issue-12123
tests: fix segfault issue in preadv/pwritev tests

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-30 17:22:12 +08:00
Jianpeng Ma
db1635324a mds: change mds_log_max_segments type from int to unsigned.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-06-30 16:42:00 +08:00
Jianpeng Ma
8a91daae82 mds: fix mds crash when mds_max_log_events smaller.
If 'mds max log events' small, it met this bug:

mds/journal.cc: 155: FAILED assert(ls != this)
 ceph version 9.0.1-1117-gb0dc971
(b0dc97198a)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char
const*)+0x80) [0x16ef7bf]
 2: (LogSegment::try_to_expire(MDS*,
C_GatherBuilderBase<MDSInternalContextBase, MDSGather>&, int)+0x1925)
[0x15475e5]
 3: (MDLog::try_expire(LogSegment*, int)+0x66) [0x14c50a0]
 4: (MDLog::trim(int)+0xd67) [0x14c4511]
 5: (MDS::tick()+0x265) [0x1146e0b]
 6: (MDS::C_MDS_Tick::finish(int)+0x32) [0x11693b2]
 7: (Context::complete(int)+0x27) [0x11611a7]
 8: (MDSInternalContextBase::complete(int)+0x1a4) [0x14977fa]
 9: (SafeTimer::timer_thread()+0x37a) [0x16e28fa]
 10: (SafeTimerThread::entry()+0x1c) [0x16e3c56]
 11: (Thread::entry_wrapper()+0xa8) [0x16df0ee]
 12: (Thread::_entry_func(void*)+0x18) [0x16df03c]
 13: /lib64/libpthread.so.0() [0x30c9c07555]
 14: (clone()+0x6d) [0x30c9901f3d]

Check segments.size() > 1 can trim segment.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-06-30 16:39:40 +08:00
Jevon Qiao
5614ec6cf5 tests: fix segfault issue in preadv/pwritev tests
Previously copied the sample data to the iov buffers not yet allocated.
Now allocate buffers before writing data into them.

Fixes: #12123
Signed-off-by: Jevon Qiao <qiaojianfeng@unitedstack.com>
2015-06-30 10:07:11 +08:00