]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoceph-disk: use /sys/dev/block/maj:min/partition to see if partition 5728/head
Mykola Golub [Mon, 17 Aug 2015 09:45:40 +0000 (12:45 +0300)]
ceph-disk: use /sys/dev/block/maj:min/partition to see if partition

Fixes: #12706
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
10 years agoceph.spec: package cls_numops
Sage Weil [Fri, 28 Aug 2015 20:54:49 +0000 (16:54 -0400)]
ceph.spec: package cls_numops

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #5684 from liewegas/wip-hammer-corpus
Sage Weil [Mon, 31 Aug 2015 17:50:11 +0000 (13:50 -0400)]
Merge pull request #5684 from liewegas/wip-hammer-corpus

add hammer objects to ceph-object-corpus

10 years agoMerge pull request #5451 from XinzeChi/wip-recovery-attr
Sage Weil [Mon, 31 Aug 2015 17:31:06 +0000 (13:31 -0400)]
Merge pull request #5451 from XinzeChi/wip-recovery-attr

bug fix: osd: do not cache unused buffer in attrs

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #5357 from ceph/wip-12325
Sage Weil [Mon, 31 Aug 2015 15:33:13 +0000 (11:33 -0400)]
Merge pull request #5357 from ceph/wip-12325

mon: LogMonitor: handle boolean options consistently

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge remote-tracking branch 'gh/infernalis'
Sage Weil [Mon, 31 Aug 2015 15:29:14 +0000 (11:29 -0400)]
Merge remote-tracking branch 'gh/infernalis'

10 years agoMerge pull request #5622 from ceph/wip-memstore
Sage Weil [Mon, 31 Aug 2015 15:08:46 +0000 (11:08 -0400)]
Merge pull request #5622 from ceph/wip-memstore

MemStore locking enhancements and bufferlist alternative

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoMerge pull request #5705 from dachary/wip-12786-centos-systemd
Sage Weil [Mon, 31 Aug 2015 15:06:52 +0000 (11:06 -0400)]
Merge pull request #5705 from dachary/wip-12786-centos-systemd

ceph-disk: {CentOS,RHEL} >= 7 && Fedora >= 22 are systemd

Reviewed-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #5699 from dachary/wip-11881-multipath
Sage Weil [Mon, 31 Aug 2015 15:06:27 +0000 (11:06 -0400)]
Merge pull request #5699 from dachary/wip-11881-multipath

  ceph-disk: add multipath support

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #5655 from duduribeiro/patch-1
Kefu Chai [Mon, 31 Aug 2015 14:33:15 +0000 (22:33 +0800)]
Merge pull request #5655 from duduribeiro/patch-1

doc: update ruby doc with the aws-sdk gem usage

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agodoc: update ruby doc with the aws-sdk gem usage 5655/head
Kadu Ribeiro [Tue, 25 Aug 2015 01:25:57 +0000 (22:25 -0300)]
doc: update ruby doc with the aws-sdk gem usage

Since I'm using ceph with the `aws-sdk` gem (https://github.com/aws/aws-sdk-ruby) instead `aws-s3` (https://github.com/marcel/aws-s3) because the aws-s3 have a trouble with the new active support (https://github.com/marcel/aws-s3/issues/98) (and the downgrade active-support wasn't a option), I proposed change the doc to receive the usage instructions with the aws-sdk gem.

I used ceph with aws-sdk gem with this commands.

Thanks so much

Signed-off-by: Carlos E Ribeiro <mail@carlosribeiro.me>
10 years agoMerge pull request #4869 from joaquimrocha/cls_numops
Sage Weil [Mon, 31 Aug 2015 14:16:10 +0000 (10:16 -0400)]
Merge pull request #4869 from joaquimrocha/cls_numops

CLS numops

Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
10 years agoMerge pull request #5724 from ceph/wip-i386
Gregory Farnum [Mon, 31 Aug 2015 14:12:19 +0000 (15:12 +0100)]
Merge pull request #5724 from ceph/wip-i386

perf_serialize: fix i386 build

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #5713 from yuyuyu101/wip-12798
Sage Weil [Mon, 31 Aug 2015 13:24:02 +0000 (09:24 -0400)]
Merge pull request #5713 from yuyuyu101/wip-12798

Fix keyvaluestore fails ceph_test_objectstore

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #5603 from wonzhq/doc-read-recency
Kefu Chai [Mon, 31 Aug 2015 10:12:43 +0000 (18:12 +0800)]
Merge pull request #5603 from wonzhq/doc-read-recency

doc: add the description for min_read_recency_for_promote

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #5460 from ceph/port/new
Kefu Chai [Mon, 31 Aug 2015 09:43:52 +0000 (17:43 +0800)]
Merge pull request #5460 from ceph/port/new

OSX and BSD derivatives port

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4896 from xinxinsh/wip-monitor-dump-transaction
Joao Eduardo Luis [Mon, 31 Aug 2015 09:17:58 +0000 (10:17 +0100)]
Merge pull request #4896 from xinxinsh/wip-monitor-dump-transaction

MonitorDBStore : make monitor transaction more readable

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomake: do not compile XFS.cc if --without-libxfs 5460/head
Kefu Chai [Sat, 29 Aug 2015 13:33:31 +0000 (21:33 +0800)]
make: do not compile XFS.cc if --without-libxfs

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoos/fs: include <sys/mount.h> on osx
Kefu Chai [Sat, 29 Aug 2015 12:53:40 +0000 (20:53 +0800)]
os/fs: include <sys/mount.h> on osx

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agotest_c_headers: don't use -Werror option for clang
Yan, Zheng [Mon, 17 Aug 2015 02:51:58 +0000 (10:51 +0800)]
test_c_headers: don't use -Werror option for clang

When using clang to compile ceph, there are lots of warnings:
clang: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2'

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoceph: use 'sed -ie' to edit file in-place
Yan, Zheng [Mon, 17 Aug 2015 02:44:44 +0000 (10:44 +0800)]
ceph: use 'sed -ie' to edit file in-place

On OSX, 'sed -i script' does not work, because it considers 'script'
as suffix of backup file. 'sed -ie script' works on both OSX and Linux.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: fix compile error on OSX
Yan, Zheng [Fri, 14 Aug 2015 14:52:09 +0000 (22:52 +0800)]
client: fix compile error on OSX

On OSX, type of the 3rd parameters of getgrouplist is 'int *'

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agocommon/blkdev: fix complie error on OSX/FreeBSD
Yan, Zheng [Fri, 14 Aug 2015 14:27:16 +0000 (22:27 +0800)]
common/blkdev: fix complie error on OSX/FreeBSD

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agocommon/admin_socket: fix compile error on OSX
Yan, Zheng [Fri, 14 Aug 2015 14:06:11 +0000 (22:06 +0800)]
common/admin_socket: fix compile error on OSX

Invalid operands to binary expression ('__bind<int &, sockaddr *,
unsigned long>' and 'int')

Without :: clang confuses C bind function and std::bind().

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotests: only use posix_fadvise on linux
Yan, Zheng [Fri, 14 Aug 2015 13:56:16 +0000 (21:56 +0800)]
tests: only use posix_fadvise on linux

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoos/chain_xattr: set CHAIN_XATTR_MAX_NAME_LEN according to max length of xattr name
Yan, Zheng [Fri, 31 Jul 2015 09:20:14 +0000 (17:20 +0800)]
os/chain_xattr: set CHAIN_XATTR_MAX_NAME_LEN according to max length of xattr name

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotest/admin_socket: check error message according to OS
Yan, Zheng [Fri, 31 Jul 2015 09:18:58 +0000 (17:18 +0800)]
test/admin_socket: check error message according to OS

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agocompat: move definitions in porting.h into include/compat.h
Yan, Zheng [Fri, 31 Jul 2015 02:01:01 +0000 (10:01 +0800)]
compat: move definitions in porting.h into include/compat.h

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoTestLFNIndex.cc: don't use "cp --preserve=xattr"
Yan, Zheng [Thu, 30 Jul 2015 10:15:18 +0000 (18:15 +0800)]
TestLFNIndex.cc: don't use "cp --preserve=xattr"

--preserve option is not supported by OSX's cp. use 'cp -a' instead

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotests: replace std::tr1::shared_ptr with ceph::shared_ptr
Yan, Zheng [Thu, 30 Jul 2015 08:03:56 +0000 (16:03 +0800)]
tests: replace std::tr1::shared_ptr with ceph::shared_ptr

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotests: disable unittest_blkdev on OSX
Yan, Zheng [Thu, 30 Jul 2015 08:01:46 +0000 (16:01 +0800)]
tests: disable unittest_blkdev on OSX

the test uses sysfs, which does not exist on OSX

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotest/librados: replace sem_init() with sem_open()
Yan, Zheng [Thu, 30 Jul 2015 06:31:20 +0000 (14:31 +0800)]
test/librados: replace sem_init() with sem_open()

sem_init() always fails on OSX (it's no longer supported).

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agobuffer: make buffer::exception classes undefined in dynamic objects
Yan, Zheng [Wed, 29 Jul 2015 09:44:52 +0000 (17:44 +0800)]
buffer: make buffer::exception classes undefined in dynamic objects

On OSX, if the an exception class is declared and defined in header file,
but it ends up being compiled as private symbols in different binaries.
The exception handling code will take the two compiled exception classes
as different types! In our case, the one in libcls_xxx.so and the one is
ceph-osd are considered as different classes, thus the try-catch statement
fails to work.

The fix is force buffer::exception classes undefined in libcls_xxx.so. The
ibcls_xxx.so are compiled with '-undefined dynamic_lookup' option. when
it is loaded into ceph-osd, buffer::exception classes in ceph-osd will be
used.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotest/librados: replace errno -125 with -ECANCELED
Yan, Zheng [Tue, 28 Jul 2015 09:55:30 +0000 (17:55 +0800)]
test/librados: replace errno -125 with -ECANCELED

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: convert XATTR_{CREATE,REPLACE} to CEPH_XATTR_{CREATE,REPLACE}
Yan, Zheng [Mon, 27 Jul 2015 11:08:48 +0000 (19:08 +0800)]
client: convert XATTR_{CREATE,REPLACE} to CEPH_XATTR_{CREATE,REPLACE}

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoxattr: convert ENOATTR to ENODATA on DARWIN
Yan, Zheng [Mon, 27 Jul 2015 08:01:31 +0000 (16:01 +0800)]
xattr: convert ENOATTR to ENODATA on DARWIN

On Darwin, getxattr/removexattr return ENOATTR when extended
attribute does not exist. But lots of ceph codes expect ENODATA
is returned in that case. On Darwin, ENOATTR and ENODATA have
different values, so we convert ENOATTR to ENODATA.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotest_libcephfs: disable flock test on OSX
Yan, Zheng [Fri, 24 Jul 2015 10:13:22 +0000 (18:13 +0800)]
test_libcephfs: disable flock test on OSX

there is no sem_timedwait on OSX. For inter-threads communication,
we can replace sem_t with pthread_cond_t. But for inter-processes
communication, it's extremely hard to figure out how to do a timed
wait. So disable the test case on OSX

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agolibradosstriper/striping.cc: include "include/types.h"
Yan, Zheng [Fri, 24 Jul 2015 08:06:01 +0000 (16:06 +0800)]
libradosstriper/striping.cc: include "include/types.h"

include definitions of __le{32,64)

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotest_c_headers: don't use -Wold-style-declaration option for clang
Yan, Zheng [Fri, 24 Jul 2015 08:03:48 +0000 (16:03 +0800)]
test_c_headers: don't use -Wold-style-declaration option for clang

clang does not support this option

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agolibcephfs: define loff_t as off_t on OSX
Yan, Zheng [Fri, 24 Jul 2015 07:30:03 +0000 (15:30 +0800)]
libcephfs: define loff_t as off_t on OSX

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotools: link ceph-client-debug to LIBCLIENT
Yan, Zheng [Fri, 24 Jul 2015 03:32:08 +0000 (11:32 +0800)]
tools: link ceph-client-debug to LIBCLIENT

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoinit-ceph: check if /lib/lsb/init-functions exists
Yan, Zheng [Thu, 23 Jul 2015 07:07:45 +0000 (15:07 +0800)]
init-ceph: check if /lib/lsb/init-functions exists

On OSX/FreeBSD, /lib/lsb/init-functions does not exist

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoinit-ceph: don't use procfs to check if daemon is running
Yan, Zheng [Thu, 23 Jul 2015 07:05:33 +0000 (15:05 +0800)]
init-ceph: don't use procfs to check if daemon is running

use ps(1) instead, which is portable

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoinit-ceph: replace 'echo -n' with printf
Yan, Zheng [Thu, 23 Jul 2015 02:58:05 +0000 (10:58 +0800)]
init-ceph: replace 'echo -n' with printf

'echo -n' is no portable. On OSX, output of 'echo -n' can be '-n'

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agovstart.sh: use portable way to get ip address
Yan, Zheng [Thu, 23 Jul 2015 02:24:33 +0000 (10:24 +0800)]
vstart.sh: use portable way to get ip address

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agovstart.sh: append ceph library path to {LD,DYLD}_LIBRARY_PATH
Yan, Zheng [Thu, 23 Jul 2015 02:20:26 +0000 (10:20 +0800)]
vstart.sh: append ceph library path to {LD,DYLD}_LIBRARY_PATH

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoOn Darwin: subfix of dynamic library is dylib
Yan, Zheng [Thu, 23 Jul 2015 01:52:08 +0000 (09:52 +0800)]
On Darwin: subfix of dynamic library is dylib

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoporting.h: add TODO comment
Kefu Chai [Fri, 10 Jul 2015 03:53:55 +0000 (11:53 +0800)]
porting.h: add TODO comment

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMakefile: add porting.h to dist tarball
Kefu Chai [Fri, 10 Jul 2015 03:52:51 +0000 (11:52 +0800)]
Makefile: add porting.h to dist tarball

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoDon't use '--exclude-libs' linker option on DARWIN
Yan, Zheng [Mon, 6 Jul 2015 01:20:33 +0000 (09:20 +0800)]
Don't use '--exclude-libs' linker option on DARWIN

Only GNU linker supports this option

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: don't try trimming kernel dcache on DARWIN/FreeBSD
Yan, Zheng [Sun, 5 Jul 2015 08:02:33 +0000 (16:02 +0800)]
client: don't try trimming kernel dcache on DARWIN/FreeBSD

still don't know if the methods used on linux also works on
DARWIN/FreeBSD

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: don't include unsupported mount options on DARWIN/FreeBSD
Yan, Zheng [Sun, 5 Jul 2015 07:54:27 +0000 (15:54 +0800)]
client: don't include unsupported mount options on DARWIN/FreeBSD

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoLink ceph-fuse to fuse on DARWIN
Yan, Zheng [Sun, 5 Jul 2015 07:49:49 +0000 (15:49 +0800)]
Link ceph-fuse to fuse on DARWIN

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agomsg: fix encoding/decoding sockaddr_storage on DARWIN/FreeBSD
Yan, Zheng [Sun, 5 Jul 2015 07:31:27 +0000 (15:31 +0800)]
msg: fix encoding/decoding sockaddr_storage on DARWIN/FreeBSD

sockaddr_storage on DARWIN/FreeBSD is different from sockaddr_storage
on Linux. sockaddr_storage on DARWIN/FreeBSD includes a ss_len field.
Besides, Its ss_len and ss_family fields are 'unsigned char'.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agolibrbd: Need to include errno.h on DARWIN.
Dennis Schafroth [Tue, 30 Jun 2015 18:39:50 +0000 (20:39 +0200)]
librbd: Need to include errno.h on DARWIN.

The file is not really required

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agoporting.h: add porting.h for porting/compatibility on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 18:39:03 +0000 (20:39 +0200)]
porting.h: add porting.h for porting/compatibility on DARWIN

Collection of porting/compatibility defines to compile on DARWIN

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agotools/ceph_objectstore_tool: Missing O_LARGEFILE on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 18:35:32 +0000 (20:35 +0200)]
tools/ceph_objectstore_tool: Missing O_LARGEFILE on DARWIN

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agotest: Fix error with clang on DARWIN (LLVM 3.6.0svn)
Dennis Schafroth [Tue, 30 Jun 2015 18:15:23 +0000 (20:15 +0200)]
test: Fix error with clang on DARWIN (LLVM 3.6.0svn)

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agorbd-replay: Different location of endian.h on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 18:13:10 +0000 (20:13 +0200)]
rbd-replay: Different location of endian.h on DARWIN

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agorbd-fuse: Add position to set/get xattr on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 18:12:37 +0000 (20:12 +0200)]
rbd-fuse: Add position to set/get xattr on DARWIN

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agoos/FileStore: fail with ENOTSUP if using sparse files on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 18:10:19 +0000 (20:10 +0200)]
os/FileStore: fail with ENOTSUP if using sparse files on DARWIN

For now, fail with Not supported (ENOTSUP) if configured using sparse files on DARWIN.

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agolibrbd: Include porting header
Dennis Schafroth [Tue, 30 Jun 2015 18:07:32 +0000 (20:07 +0200)]
librbd: Include porting header

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agocommon/xattr: Split out xattr on Linux and DARWIN.
Dennis Schafroth [Tue, 30 Jun 2015 17:55:10 +0000 (19:55 +0200)]
common/xattr: Split out xattr on Linux and DARWIN.

DARWIN requires position parameter

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agocommon/util: include sys/param.h and mount.h on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 17:52:17 +0000 (19:52 +0200)]
common/util: include sys/param.h and mount.h on DARWIN

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agocommon/SubProcess: fix build on DARWIN
Dennis Schafroth [Tue, 30 Jun 2015 17:51:32 +0000 (19:51 +0200)]
common/SubProcess: fix build on DARWIN

include <signal.h> to avoid errors/warnings on missing functions

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agoceph_fuse: Implement set/get xattr with position parameter on OSX
Dennis Schafroth [Tue, 30 Jun 2015 17:50:27 +0000 (19:50 +0200)]
ceph_fuse: Implement set/get xattr with position parameter on OSX

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agomsg/async: Include porting.h for MSG_*
Dennis Schafroth [Tue, 30 Jun 2015 17:49:04 +0000 (19:49 +0200)]
msg/async: Include porting.h for MSG_*

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agomsg/simple: Move MSG_ and SO_NOSIGPIPE into porting.h
Dennis Schafroth [Tue, 30 Jun 2015 17:47:24 +0000 (19:47 +0200)]
msg/simple: Move MSG_ and SO_NOSIGPIPE into porting.h

Only enable SO_PRIORITY on Linux

Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
10 years agoMerge pull request #5024 from xinxinsh/wip-12018
Kefu Chai [Mon, 31 Aug 2015 04:11:09 +0000 (12:11 +0800)]
Merge pull request #5024 from xinxinsh/wip-12018

make rbd and pool quota work

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #5448 from kylinstorage/wip-optimize-agent_choose_mode
Kefu Chai [Mon, 31 Aug 2015 04:10:00 +0000 (12:10 +0800)]
Merge pull request #5448 from kylinstorage/wip-optimize-agent_choose_mode

osd: avoid unnecessary calculation in agent_choose_mode()

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #5418 from branch-predictor/bp-remove-str-concat
Kefu Chai [Mon, 31 Aug 2015 04:08:46 +0000 (12:08 +0800)]
Merge pull request #5418 from branch-predictor/bp-remove-str-concat

osd/osd_types.cc: get rid of str concat when making hash key

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #5570 from dachary/wip-12673-proxy-read
Kefu Chai [Mon, 31 Aug 2015 04:04:59 +0000 (12:04 +0800)]
Merge pull request #5570 from dachary/wip-12673-proxy-read

osd: trigger the cache agent after a promotion

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoKeyValueStore: Fix broken assert statement 5713/head
Haomai Wang [Sun, 30 Aug 2015 14:12:29 +0000 (22:12 +0800)]
KeyValueStore: Fix broken assert statement

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoKeyValueStore: Fix getattrs nonexist object need return -ENOENT
Haomai Wang [Sat, 29 Aug 2015 15:10:43 +0000 (23:10 +0800)]
KeyValueStore: Fix getattrs nonexist object need return -ENOENT

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoMerge pull request #5710 from tchaikov/wip-check-boost_random-mt
Kefu Chai [Sat, 29 Aug 2015 14:32:20 +0000 (22:32 +0800)]
Merge pull request #5710 from tchaikov/wip-check-boost_random-mt

configure.ac: check for libboost_random-mt also

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #5711 from dachary/wip-12781-dmcrypt
Sage Weil [Sat, 29 Aug 2015 12:24:01 +0000 (08:24 -0400)]
Merge pull request #5711 from dachary/wip-12781-dmcrypt

ceph-disk: fix dmcrypt typo

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoceph-disk: fix dmcrypt typo 5711/head
Loic Dachary [Thu, 27 Aug 2015 10:51:14 +0000 (12:51 +0200)]
ceph-disk: fix dmcrypt typo

Fix the typo introduced by 29431944c77adbc3464a8faeb7e052b24f821780

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4731 from stiopaa1/cephdetectinitfix
Loic Dachary [Sat, 29 Aug 2015 09:03:02 +0000 (11:03 +0200)]
Merge pull request #4731 from stiopaa1/cephdetectinitfix

ceph-detect-init/debian/__init__: improved syntax

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #5503 from zhouyuan/isal_2.14_update
Loic Dachary [Sat, 29 Aug 2015 08:58:12 +0000 (10:58 +0200)]
Merge pull request #5503 from zhouyuan/isal_2.14_update

erasure-code: Update ISA-L to 2.14

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoconfigure.ac: check for libboost_random-mt also 5710/head
Kefu Chai [Sat, 29 Aug 2015 08:49:45 +0000 (16:49 +0800)]
configure.ac: check for libboost_random-mt also

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #5467 from dachary/wip-ceph-release-notes
Loic Dachary [Sat, 29 Aug 2015 08:47:26 +0000 (10:47 +0200)]
Merge pull request #5467 from dachary/wip-ceph-release-notes

tools: ceph-release-notes unicode handling

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agoceph-disk: integration tests for multipath 5699/head
Loic Dachary [Thu, 27 Aug 2015 20:22:43 +0000 (22:22 +0200)]
ceph-disk: integration tests for multipath

Add integration tests for multipath to the ceph-disk workunit, with the
following caveats:

A workaround is added (explicit call to ceph-disk activate) until the
CentOS activation bug http://tracker.ceph.com/issues/12786 is fixed.

The tests do not run on Ubuntu because of the multipath / device mapper
bug
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1488688
and it has not been tested on Debian.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: implement workunit
Loic Dachary [Thu, 27 Aug 2015 20:17:21 +0000 (22:17 +0200)]
ceph-disk: implement workunit

This new ceph-disk workunit re-implements the tests that previously were
in the src/test/ceph-disk.sh src/test/ceph-disk-root.sh scripts and is
meant to run in a virtual machine instead of docker.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: remove dead scripts
Loic Dachary [Thu, 27 Aug 2015 20:12:01 +0000 (22:12 +0200)]
tests: remove dead scripts

Revert 2d0d388162fba25af828ad2cb16560a6d00f2337 which introduced scripts
that were never actually used.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: CentOS 7 is systemd
Loic Dachary [Thu, 27 Aug 2015 20:08:46 +0000 (22:08 +0200)]
ceph-disk: CentOS 7 is systemd

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: implement list --format json
Loic Dachary [Thu, 27 Aug 2015 11:14:13 +0000 (13:14 +0200)]
ceph-disk: implement list --format json

The ceph-disk list command is reworked in two parts:

 1) the list_devices function that build an internal structure with all
    the information regarding disks and partitions.
 2) a function to display the internal structure in plain text or json

The ceph-disk list show the plain text version and is backward
compatible.

The ceph-disk list --format json output has more information about each
device than the plain text version and is intended for scripts.

The unit tests cover all modified lines (2610 to 2849).

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: fix dmcrypt typo
Loic Dachary [Thu, 27 Aug 2015 10:51:14 +0000 (12:51 +0200)]
ceph-disk: fix dmcrypt typo

Fix the typo introduced by 29431944c77adbc3464a8faeb7e052b24f821780

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: cosmetic: setup_logging function
Loic Dachary [Thu, 27 Aug 2015 10:43:58 +0000 (12:43 +0200)]
ceph-disk: cosmetic: setup_logging function

Split the main function to extract the verbose handling part into the
setup_logging function.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: cosmetic: argparse functions
Loic Dachary [Thu, 27 Aug 2015 10:41:41 +0000 (12:41 +0200)]
ceph-disk: cosmetic: argparse functions

Split the large parse_args function into separate functions, one for
each subparser.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: use sys.argv instead of implicit
Loic Dachary [Thu, 27 Aug 2015 10:37:15 +0000 (12:37 +0200)]
ceph-disk: use sys.argv instead of implicit

Make parse_args and main use and argument instead of relying on
argparse.ArgumentParser implicit use of sys.argv. It helps with tests.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: obsolete ceph-disk root tests
Loic Dachary [Thu, 27 Aug 2015 10:21:48 +0000 (12:21 +0200)]
tests: obsolete ceph-disk root tests

They were designed to run in a docker container using loop devices
instead of disks. Although this was fit for ceph-disk activate tests for
regular and dmcrypt devices, a docker instance does not have its own
udev instance it is not possible to run tests involving udev events
without interfering with the host.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: add multipath support
Loic Dachary [Sun, 16 Aug 2015 00:37:01 +0000 (02:37 +0200)]
ceph-disk: add multipath support

A multipath device is detected because there is a
/sys/dev/block/M:m/dm/uuid file with the mpath- prefix (or part\w+-mpath
prefix).

When ceph-disk prepares data or journal devices on a multipath device,
it sets the partition typecode to MPATH_JOURNAL_UUID, MPATH_OSD_UUID and
MPATH_TOBE_UUID to

 a) help the udev rules distinguish them from other devices in
    devicemapper
 b) allow ceph-disk to fail if an attempt is made to activate a device
    with this type without accessing it via a multipath device

The 95-ceph-osd.rules call ceph-disk activate on partitions of type
MPATH_JOURNAL_UUID, MPATH_OSD_UUID. It relies on ceph-disk to do nothing
if the device is not accessed via multipath.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: is_held must ignore multipath devices
Loic Dachary [Mon, 17 Aug 2015 22:18:51 +0000 (00:18 +0200)]
ceph-disk: is_held must ignore multipath devices

Always return an empty list when is_held is called on a multipath
device.

The dmcrypt logic base decisions depending on the holders/slaves
relationship. Such relationships can also exists for multipath devices
but do not have the same semantic.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: rework get_partition_{type,uuid}
Loic Dachary [Mon, 17 Aug 2015 22:04:32 +0000 (00:04 +0200)]
ceph-disk: rework get_partition_{type,uuid}

Mimic the get_partition_type implementation after get_partition_uuid
and factorize them to reduce the code footprint.

The get_partition_type implementation is based on blkid: it is complex
and fragile. Since sgdisk is consistently used to create partitions, use
it instead. It is already used for get_partition_uuid and there does not
seem to be any reason for concern.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: multipath support for split_dev_base_partnum
Loic Dachary [Mon, 17 Aug 2015 21:51:24 +0000 (23:51 +0200)]
ceph-disk: multipath support for split_dev_base_partnum

split_dev_base_partnum returns the path of the whole disk in
/dev/mapper. The base variable name to designate the device for the
whole disk is a misnomer since it cannot be used as a basename to
rebuild the parition device name in the case of multipath.

The logic of split_dev_base_partnum for devices is reworked to use
/sys/dev/block/M:m/partition instead of device name parsing.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: multipath support for is_partition and list_partitions
Loic Dachary [Mon, 17 Aug 2015 21:25:45 +0000 (23:25 +0200)]
ceph-disk: multipath support for is_partition and list_partitions

The is_partition predicate and the list_partitions function support
devices managed by multipath.

A set of helpers dedicated to multipath devices is implemented because
the content of the corresponding /sys directory does not use the same
conventions as regular devices regarding partitions.

Instead of relying on subdirectories such as /sys/block/name/name1, the
devicemapper uuid file is used and expected to start with part\d+. The
holders/slaves directories provide pointers between the whole device and
the partition devices.

Although these structural differences reduce the opportunity for
code factorization, it is easier for backward compatibility since the
multipath specific logic is limited to if is_mpath(dev) branches.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: --verbose shows a stack trace on error
Loic Dachary [Mon, 17 Aug 2015 21:02:40 +0000 (23:02 +0200)]
ceph-disk: --verbose shows a stack trace on error

When running with --verbose, do not hide the stack trace from the user
when an exception is raised. It is most helpful to figure out when the
exception actually happened.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: replace partx with partprobe
Loic Dachary [Mon, 17 Aug 2015 21:00:44 +0000 (23:00 +0200)]
ceph-disk: replace partx with partprobe

Older distributions that required partx (CentOS 6 and the like) are no
longer supported and the partx fallback can be obsoleted.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: is_mpath predicate for multipath devices
Loic Dachary [Mon, 17 Aug 2015 20:52:25 +0000 (22:52 +0200)]
ceph-disk: is_mpath predicate for multipath devices

The is_mpath predicate returns True if a device is managed by
multipath. It is based on the devicemapper uuid content which is
expected to always contain the mpath- string to identify the multipath
subsystem.

The block_path helper is added to convert the path to a device to the
/sys directory that describes it. It uses the major and minor number
instead of the device name because it is more reliable. The rationale
including an actual example is added as a comment for future
maintainers.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: ceph-disk tests may use system ceph-{mon,osd}
Loic Dachary [Mon, 17 Aug 2015 20:22:12 +0000 (22:22 +0200)]
tests: ceph-disk tests may use system ceph-{mon,osd}

Allow ceph-disk.sh to run to test ceph as installed from packages.

When run from sources, ceph-disk.sh is expected to use the binaries from
the source tree. It is enough to prepend . to the PATH. There is no need
to prefix each binary with ./

The virtualenv is also only necessary when running from sources and
setting it up for ceph-detect-init is only done if in the source tree.

Signed-off-by: Loic Dachary <ldachary@redhat.com>