Commit Graph

30708 Commits

Author SHA1 Message Date
Loic Dachary
d443841094 mon: add flags argument to common_init_finish
It is the same flag that is given to common_preinit. The service thread
is not initialized if CINIT_FLAG_NO_DAEMON_ACTIONS is set.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-31 13:47:44 +01:00
Loic Dachary
403f777b24 mon: fix indentation
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-31 13:46:38 +01:00
Loic Dachary
a1945135ac mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-31 13:46:38 +01:00
Loic Dachary
10aa220a55 mon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate
--mkfs, --inject_monmap and --extract-monmap are no daemon actions.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-31 13:46:38 +01:00
Kun Huang
e0bae95240 Fix typos in erasure code documents
Signed-off-by: Kun Huang <academicgareth@gmail.com>
2013-12-31 06:17:52 -05:00
Sage Weil
34e50364f4 Merge pull request #1023 from ceph/port/misc
misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-30 21:04:45 -08:00
Josh Durgin
2b0a435920 osd_types: add missing osd op flags
These were accidentally removed in:
85282319ee

Fixes: #7067
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 20:34:24 -08:00
Xihui He
f8e413f9c7 msgr: fix rebind() race
stop the accepter and mark all pipes down before rebind to avoid race

Fixes: #6992

Signed-off-by: Xihui He xihuihe@gmail.com
2013-12-31 10:57:57 +08:00
Josh Durgin
ece8b7702c Merge pull request #1006 from yuyuyu101/wip-7066
Fix rbd bench-write improper behavior

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 14:52:40 -08:00
Josh Durgin
8fcfc9114f qa: test rados listomapvals with >512 keys
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 13:36:37 -08:00
Bjørnar Ness
be5afa2e66 rados: allow listomapvals to list all k/v pairs
Current code only lists first 512 k/v pairs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 13:36:31 -08:00
Gary Lowell
c165483bc7 v0.74 2013-12-30 21:03:17 +00:00
Noah Watkins
b4fc16c70e make: conditionally build filestore backends
Each of btrfs and zfs backends are wrapped in if __linux__ and if
WITH_ZFS, respectively, resulting in empty object files and the
associated warnings. This builds them under the same conditions.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
9d41fd2c85 test_cls_rbd: avoid warning -Wno-unnamed-template-args
According to this https://code.google.com/p/googletest/source/detail?r=446
the use of unnamed types (in this case the protection flag enums from
librbd/parent_types.h) as template parameters (in this case the gtest
macros) is not valid C++ pre C++0x.

As suggested, converting the enum into an int with integral promotion
via unary plus operator solves the problem.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
fdd85625c7 test_cls_rbd: avoid shift overflow
warning: signed shift result (0x500000000) requires 36 bits to represent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
ce8b26e89d erasure: add dummy symbol to avoid warnings
Empty object files generate warning.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
5b77533404 make: avoid symbol exporting for C++ libs on non-Linux
This removes export-symbol-regex for installed libraries with C++
interfaces on non-Linux where the hidden symbols are not resolved. This
is a temporary fix.

See ceph-devel topic "Shared library symbol visibility" for discussion
about a perm solution.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
8c8be16df7 json_spirit: don't build json_spirit_value.cpp
This file just includes the header that is full of templates and
typedefs, so the resulting object file has no symbols in it and
generates warnings.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
da5a082ec5 make: add top-level libcommon dependency
On OSX there is consistently a problem with resolving pipe_cloexec and other
symbols through indirect libtool dependencies (below libglobal has a dependency
on libcommon). This makes the dependency top-level for most executables.

  CXXLD    ceph_test_timers
Undefined symbols for architecture x86_64:
  "_pipe_cloexec", referenced from:
      AdminSocket::create_shutdown_pipe(int*, int*) in libglobal.a(admin_socket.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
f7a66d6bbe make: restrict use of --as-needed to Linux
This should really be checked in configure.ac in the future.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Rutger ter Borg
87db89ea8f librados: read into user's bufferlist for aio_read
* The 'buf' argument to read() used to be passed into
  AioCompletionImpl, and the results would be copied back after
  reading. This is replaced with the creation of a static buffer of
  that buf.

* The pbl argument in AioCompletionImpl is removed.

The patch is tested against an application using librados. I've
assumed that 'pbl' in

aio_read( ...., pbl, )

is allocated by the user. It may even speed things up: a buffer copy
is prevented.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 11:10:26 -08:00
Sage Weil
15cdcba106 Merge pull request #1018 from dachary/wip-vstart-fsid
vstart: set fsid in [global]

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-30 08:13:30 -08:00
Sage Weil
85edc9f695 Merge pull request #1019 from dachary/wip-show-config-value
common: evaluate --show-config* after CEPH_ARGS

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-30 08:12:18 -08:00
Loic Dachary
0b40bbd495 common: evaluate --show-config* after CEPH_ARGS
The content of CEPH_ARGS is appended to the list of arguments. When
--show-config or --show-config-value is also set, it should be evaluated
after all arguments are parsed to accurately reflect the value that
would be visible to the program.

It failed to do so because the action for --show-config* was carried out
immediately. It is postponed until all options are parsed instead.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-30 11:12:41 +01:00
Loic Dachary
b5c17f6f81 vstart: set fsid in [global]
If not set, commands that rely on --show-config-value fsid or something
equivalent will fail. ceph-disk does, for instance and setting the fsid
in CEPH_ARGS won't help because it will be appended after
--show-config-value :

    CEPH_ARGS="--fsid 96a3abe6-7552-4635-a79b-f3c096ff8b95" ./ceph-mon --cluster=ceph --name=osd. --show_args --show-config-value fsid
    args: --cluster=ceph --name=osd. --show_args --show-config-value fsid --fsid 96a3abe6-7552-4635-a79b-f3c096ff8b95
    00000000-0000-0000-0000-000000000000

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-30 10:09:41 +01:00
Sage Weil
38d9613bcb Merge pull request #1008 from ceph/port/spinlock
spinlock: add generic spinlock implementation

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-29 21:09:04 -08:00
Sage Weil
f9b50cee94 Merge pull request #1014 from ceph/port/misc
misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-29 20:58:17 -08:00
Sage Weil
9a7e85dba1 Merge pull request #1015 from yuyuyu101/wip-fix-tests
Fix some test codes problems

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-29 20:44:13 -08:00
Sage Weil
fb941d82e0 Merge pull request #1013 from ceph/port/public-hdrs
use portable types in public headers

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-29 20:41:24 -08:00
Haomai Wang
d7d7ca8451 Fix qa/workunits/rados/test_cache_pool.sh typos
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2013-12-30 12:07:56 +08:00
Haomai Wang
cc67b7b2aa Fix test/filestore/store_test.cc error
Commit
d2b661d0ef
change the test result, just change it.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2013-12-30 12:06:37 +08:00
Noah Watkins
e8e174e791 rados: include struct timeval definition
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:35:58 -08:00
Noah Watkins
356d71a24d inttypes: use portable types in public headers
loff_t -> int64_t
  __u8 -> uint8_t

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:35:58 -08:00
Noah Watkins
76ad85d868 test: include headers for struct statfs
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
93c125ced9 test: remove platform specific header
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
a625b2804d test: print warning about missing fs features
- sync
- posix_fadvise

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
9a7a33ecab test: only build some tests on linux
These tests have portability problems that have yet to be solved on
non-Linux systems.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
a48d038689 test: fix VLA of non-POD type
Variable length array of non-POD type is not supported by clang.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
424d7c7813 gtest: disable tr1/tuple
Not all compilers are supporting tr1/tuple. This forces libgtest to use
an internal implementation of tuple. Alternatively, the newer 1.6
version of gtest may correctly handle this case automatically.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
0c09abd9cc make: use c++ flags for building librados
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
891801ed39 warning: fix typo and -Wmismatched-tags
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:32:00 -08:00
Noah Watkins
c7e1c4bfdb c++11: fix std::lock naming conflicts
Unfortunately, 'using namespace std;' is in pretty widespread use in the Ceph
tree, so we need to rename to avoid the conflict.

Example error output:

test/streamtest.cc:37:19: error: reference to 'lock' is ambiguous
  Mutex::Locker l(lock);
                  ^
test/streamtest.cc:32:7: note: candidate found by name lookup is 'lock'
Mutex lock("streamtest.cc lock");
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/mutex:346:1: note: candidate found by name lookup is 'std::__1::lock'
lock(_L0& __l0, _L1& __l1)

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:31:59 -08:00
Noah Watkins
bbcb022319 kvstore: only build on linux
There are several non-standard errno values used. There is still work to
do on addressing errno portability in Ceph, and this disables kvstore on
non-Linux platforms until that work is complete.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:31:59 -08:00
Sage Weil
f881157e37 Merge pull request #1007 from ceph/wip-misc-fixes
misc fixes

Reviewed-by: Loic Dachary <loic@dachary.org>
2013-12-29 12:04:09 -08:00
Loic Dachary
16699f4032 Merge pull request #1004 from ceph/wip-snaps
make ceph_test_rados read from snaps; resulting bugs found

Reviewed-by: Loic Dachary <loic@dachary.org>
2013-12-29 00:31:39 -08:00
Noah Watkins
1fec818f7c spinlock: add generic spinlock implementation
Adds a ceph_spinlock_t implementation that will use pthread_spinlock_t
if available, and otherwise reverts to pthread_mutex_t. Note that this
spinlock is not intended to be used in process-shared memory.

Switches implementation in:

  ceph_context
  SimpleMessenger
  atomic_t

Only ceph_context initialized its spinlock with PTHREAD_PROCESS_SHARED.
However, there does not appear to be any instance in which CephContext
is allocated in shared memory, and thus can use the default private
memory space behavior.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-28 14:43:14 -08:00
Sage Weil
12f4631586 qa/workunits/rest/test.py: rbd pool ruleset is now 0
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-28 10:36:27 -08:00
Sage Weil
b286e4fed3 ceph_test_rados_api_tier: retry EBUSY race checks
...or else these will occasionally fail against a thrashing cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-28 10:34:56 -08:00
Sage Weil
b88af07ef5 libcephfs: get osd location on -1 should return EINVAL
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-28 10:25:00 -08:00
Sage Weil
250ecf6655 qa/workunits/mon/crush_ops.sh: fix in-use rule rm test
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-28 10:22:18 -08:00