Commit Graph

39430 Commits

Author SHA1 Message Date
Samuel Just
2598fc5074 ObjectStore: fix Transaction encoding version number
dbae92253f changed the encoding
significantly, but did not increase the transaction encoding version.
To fix this:
1) Increment the version number to 9.
2) Due to this bug, there are versions which encode the version 9
encoding incorrectly with version 8.  We will detect those by trying to
first decode any version 8 encoding with the old decoding function, and
then trying with the new one if there is an exception.

Fixes: 10734
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-02-04 11:20:04 -08:00
Gregory Farnum
fa9a160377 Merge pull request #3613 from rzarzynski/wip-4920
client: add support for O_NOFOLLOW and O_PATH

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-02-04 09:30:29 -08:00
Jason Dillaman
46f9ca463e pybind: fixed runtime errors with librbdpy
There was a typo within the RBD Image get_flags method and
several runtime errors relating to the new fadvise flags.

Fixes: #10782
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-04 09:47:55 -05:00
Joao Eduardo Luis
9124a76d4f test/vstart_wrapper.sh: set PATH before calling vstart.sh
ceph-mon needs crushtool to be in PATH.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-04 14:05:14 +00:00
Joao Eduardo Luis
189ef38074 init-ceph.in: add $PWD to PATH if running as ./init-ceph
ceph-mon needs crushtool in PATH and dev environments may not have
crushtool in the system's PATH.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-04 14:05:14 +00:00
Joao Eduardo Luis
0d80691979 qa: workunits: cephtool/test.sh: test 'ceph osd setcrushmap'
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-04 14:05:14 +00:00
Joao Eduardo Luis
ff7487331d mon: OSDMonitor: use CrushTester::test_with_crushtool
Sandbox the crush map test and avoid dieing a horrible death if it
segfaults.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-04 14:05:14 +00:00
Joao Eduardo Luis
58ea017f78 crush: CrushTester: add test_with_crushtool()
Instead of testing directly using CrushTester::test(), which may break
the monitor if a malformed map is passed and we don't manage to catch
it, fork and run crushtool instead.  This way, if crushtool segfaults,
the monitor (or whomever the call might be) will be protected from a
catastrophic failure.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-04 14:05:14 +00:00
Joao Eduardo Luis
481d563c3c tools: crushtool: allow '--infile -' to pipe read from STDIN
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-04 14:05:14 +00:00
John Spray
b2549a6ccf mds: implement export dir asok
This was available as a legacy mds tell command
previously: make it availably via the cleaner
asok interface.  asok rather than new `tell` because
it's a low level/debug thing.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-02-04 13:22:48 +01:00
Radoslaw Zarzynski
190c7e355d client: implement support for O_PATH on Linux.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-02-04 10:02:17 +01:00
Radoslaw Zarzynski
911e4c058e client: add support for O_NOFOLLOW in Client::open().
Fixes: #4920
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-02-04 10:00:53 +01:00
Min Chen
a7a6fe4fa0 rbd-recover-tool: add usefull information of this tool
include README, FAQ, TODO

Signed-off-by: Min Chen <minchen@ubuntukylin.com>
2015-02-04 16:12:01 +08:00
Min Chen
ea69219af4 rbd-recover-tool: add a test case for raw image & snapshot
Signed-off-by: Min Chen <minchen@ubuntukylin.com>
2015-02-04 16:11:13 +08:00
Min Chen
4f395ebb18 rbd-recover-tool: implement the function framework
add control files & config files

rbd-recover-tool is an offline tool for dead ceph cluster
to recever rbd image in replicated pool from all osds.
it is a simple but usefull policy to keep data secruity on ceph

Sigbed-off-by: Min Chen <minchen@ubuntukylin.com>
2015-02-04 16:09:13 +08:00
Min Chen
aa3cda22ac rbd-recover-tool: add the basic function files
Signed-off-by: Min Chen <minchen@ubuntukylin.com>
2015-02-04 16:06:19 +08:00
Loic Dachary
26cc9d3479 Merge pull request #3603 from dachary/wip-10729-debian-install-deps
install-deps.sh: get lsb_release if needed

Reviewed-by: Yann Dupont <yann@objoo.org>
2015-02-04 08:40:57 +01:00
Yan, Zheng
97abcdd1c7 mds: properly record created inode in completed requests list
current code does not handle case that inode is allocated from session's
preallocated inodes

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-04 14:53:47 +08:00
Yan, Zheng
419800fe14 client: re-send request when MDS enters reconnecting stage
So that MDS can process completed requests in clientreplay stage.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-04 14:53:47 +08:00
Yan, Zheng
b66caefbfb mds: avoid sending traceless reply for request that created new inode
When kernel client receives traceless reply for request that created
new inode, it re-send a lookup request to MDS get information of the
newly created inode. (VFS expects FS' callback return an inode in this
case). This breaks one request into two requests. Other client may
modify or move to the new inode in the middle.

The fix is avoid sending traceless reply for request that created new
inode. Instead, we convert the origin request into 'lookup' request.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-04 14:53:42 +08:00
Yan, Zheng
d12d92d6bf mds: process completed requests in clientreplay stage
Completed requests may have created new file/directorie. This guarantees
completed requests are processed before any other client gets change to
modify the new files/directorie.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-04 13:04:52 +08:00
Dan Mick
48c0a9f520 Merge pull request #3565 from rzarzynski/wip-7264
pybind/rados.py: fix error hiding and inconsistency on librados load.

Reviewed-by: Dan Mick <dan.mick@redhat.com>
2015-02-03 20:57:47 -08:00
John Wilkins
0548beadf2 doc: Removed references to Inktank suppport.
Signed-off-by: John Wilkins <jowilkin@redhat.com>
2015-02-03 14:50:25 -08:00
Danny Al-Gaaf
2d1803b385 xio/XioMsg.h: use static_cast instead of c-style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 23:20:39 +01:00
John Wilkins
babac0c4cc doc: Removed Inktank reference.
Signed-off-by: John Wilkins <jowilkin@redhat.com>
2015-02-03 14:14:22 -08:00
Danny Al-Gaaf
0d46790040 mds/MDS.cc: don't compare integer with bool
No need to use an extra variable to check the result of
a function returning bool if the result isn't used again.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 23:02:59 +01:00
Danny Al-Gaaf
aa7c968ae5 EventKqueue.cc: clarify calculation precedence for '&' and '?'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:51 +01:00
Danny Al-Gaaf
df161d32f1 XioMessenger.cc: fix dead pointer usage
Move _addr to upper scope to prevent dead pointer 'a' after
assignment of _addr in if-clause.

Fix for:

[src/msg/xio/XioMessenger.cc:669]: (error) Dead pointer usage.
Pointer 'a' is dead if it has been assigned '&_addr' at line 644

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:47 +01:00
Danny Al-Gaaf
32dde2f5c8 cls_rgw.cc: prefer ++operator for non-primitive iter
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:33 +01:00
Danny Al-Gaaf
72a7d0c953 rgw_rest_s3.cc: prefer !empty() over size() for emptiness check
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:26 +01:00
Danny Al-Gaaf
33b5c58f3f src/.gitignore: add new files, resort alphabetical
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
bb09695a05 xio: use static_cast instead of c-style casts
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
64b7c369f9 rbd-fuse.cc: use static_cast instead of c-style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
8ec3f768d3 XioMessenger.cc: use reinterpret_cast instead of c-style
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
c82da17281 ReplicatedPG.cc: prefer ++operator for non-primitive iter
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
e10417d08f CrushTreeDumper.h: prefer ++operator for non-primitive iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
4ec700b848 EventOutput.cc: prefer !empty() over size() for emptiness check
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
db37ef0c3c rgw/rgw_rados.cc: prefer !empty() over size() for emptiness check
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
1836f28af8 osd/PG.cc: prefer ++operator for non-primitive iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
5c55424f3c osd/Ager.cc: remove already in .h included header
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
8256cefcc3 AsyncConnection.h: remove twice included header, resort includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
d70676a235 common/Cycles.cc: reduce scope of variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:08 +01:00
Danny Al-Gaaf
25995a0399 cls/statelog/cls_statelog_*.h: init memvars in ctor
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
863dde2da3 common/escape.c: move cppcheck-suppress to correct lines
Seems that it doesn't work to add the cppcheck-suppress to
the define. Needs to go to the memcpy call using the define.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
d8456c4267 cls_log_ops.h: ctor init cls_log_list_op::max_entries
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
4421b55ca2 src/os/ObjectStore.h: reduce scope of variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
3cf04b8c70 TestErasureCodeIsa.cc: fix reassign before use old value
Fix for:

[src/test/erasure-code/TestErasureCodeIsa.cc:474] ->
 [src/test/erasure-code/TestErasureCodeIsa.cc:477]:
[src/test/erasure-code/TestErasureCodeIsa.cc:601] ->
 [src/test/erasure-code/TestErasureCodeIsa.cc:604]
[src/test/erasure-code/TestErasureCodeIsa.cc:728] ->
 [src/test/erasure-code/TestErasureCodeIsa.cc:731]
[src/test/erasure-code/TestErasureCodeIsa.cc:854] ->
 [src/test/erasure-code/TestErasureCodeIsa.cc:857]
 (performance) Variable 'err' is reassigned a value
 before the old one has been used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
86b7c388b0 os/ObjectStore.h: use reinterpret_cast instead of c-style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
a91cd60cb5 msg/async/EventKqueue.h: init 'size' in constructor
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00
Danny Al-Gaaf
8652ec99a3 sync/EventKqueue.cc: fix possible null pointer dereference
Remove pointer deref before NULL check. These lines are already
after NULL check.

Fix for:
[src/msg/async/EventKqueue.cc:96] -> [src/msg/async/EventKqueue.cc:99]:
 (warning) Possible null pointer dereference: tvp - otherwise it is
 redundant to check it against null.
[src/msg/async/EventKqueue.cc:97] -> [src/msg/async/EventKqueue.cc:99]:
 (warning) Possible null pointer dereference: tvp - otherwise it is
 redundant to check it against null.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-02-03 22:51:07 +01:00