]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoceph-disk: prepare --data-dir must not override files 1020/head
Loic Dachary [Mon, 30 Dec 2013 11:26:20 +0000 (12:26 +0100)]
ceph-disk: prepare --data-dir must not override files

ceph-disk does nothing when given a device that is already prepared. If
given a directory that already contains a successfully prepared OSD, it
will however override it.

Instead of overriding the files in the osd data directory, return
immediately if the magic file exists. Make it so the magic file is
created last to accurately reflect the success of the OSD preparation.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge branch 'next'
Gary Lowell [Wed, 1 Jan 2014 07:53:37 +0000 (07:53 +0000)]
Merge branch 'next'

11 years agoosd/ReplicatedPG: improve debug output from check_local
Sage Weil [Wed, 1 Jan 2014 01:21:49 +0000 (17:21 -0800)]
osd/ReplicatedPG: improve debug output from check_local

This will help with #6685

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1011 from dachary/wip-mon-daemonize
Loic Dachary [Wed, 1 Jan 2014 01:12:39 +0000 (17:12 -0800)]
Merge pull request #1011 from dachary/wip-mon-daemonize

do not daemonize ceph-mon when not necessary

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1022 from ceph/wip-listomapvals
Josh Durgin [Tue, 31 Dec 2013 20:21:51 +0000 (12:21 -0800)]
Merge pull request #1022 from ceph/wip-listomapvals

fix rados listomapvals for >512 keys

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1009 from dachary/wip-mon-idempotent
Sage Weil [Tue, 31 Dec 2013 19:32:32 +0000 (11:32 -0800)]
Merge pull request #1009 from dachary/wip-mon-idempotent

make ceph-mon --mkfs idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: remove fixture directory between runs 1009/head
Loic Dachary [Sun, 29 Dec 2013 12:41:45 +0000 (13:41 +0100)]
mon: remove fixture directory between runs

Instead of just removing the store.db directory, remove everything so
that --mkfs can re-create it instead of infering that it already exists.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: make ceph-mon --mkfs idempotent
Loic Dachary [Sun, 29 Dec 2013 12:14:14 +0000 (13:14 +0100)]
mon: make ceph-mon --mkfs idempotent

A mon is considered to exist if the mon-data directory exists and is not
empty. If ceph-mon --mkfs is run twice, it will display succeed the
second time around and display an informative message.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: create mon-data directory on --mkfs
Loic Dachary [Sun, 29 Dec 2013 12:10:12 +0000 (13:10 +0100)]
mon: create mon-data directory on --mkfs

If the mon-data directory does not exist when ceph-mon --mkfs runs, it
is created.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1016 from bydsky/bugfix
Sage Weil [Tue, 31 Dec 2013 16:18:15 +0000 (08:18 -0800)]
Merge pull request #1016 from bydsky/bugfix

Fix Issue #6992: stop the accepter and mark all pipes down before rebind

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1024 from jdurgin/wip-7067
Sage Weil [Tue, 31 Dec 2013 16:17:14 +0000 (08:17 -0800)]
Merge pull request #1024 from jdurgin/wip-7067

osd_types: add missing osd op flags

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: add flags argument to common_init_finish 1011/head
Loic Dachary [Sun, 29 Dec 2013 11:26:14 +0000 (12:26 +0100)]
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>
11 years agomon: fix indentation
Loic Dachary [Sun, 29 Dec 2013 11:24:48 +0000 (12:24 +0100)]
mon: fix indentation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS
Loic Dachary [Sun, 29 Dec 2013 11:22:16 +0000 (12:22 +0100)]
mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate
Loic Dachary [Sun, 29 Dec 2013 11:18:02 +0000 (12:18 +0100)]
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>
11 years agoMerge pull request #1023 from ceph/port/misc
Sage Weil [Tue, 31 Dec 2013 05:04:45 +0000 (21:04 -0800)]
Merge pull request #1023 from ceph/port/misc

misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd_types: add missing osd op flags 1024/head
Josh Durgin [Tue, 31 Dec 2013 04:34:18 +0000 (20:34 -0800)]
osd_types: add missing osd op flags

These were accidentally removed in:
85282319ee3e0d535d1ffc0a6ae8f763a41628b7

Fixes: #7067
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agomsgr: fix rebind() race 1016/head
Xihui He [Mon, 30 Dec 2013 04:04:10 +0000 (12:04 +0800)]
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
11 years agoMerge pull request #1006 from yuyuyu101/wip-7066
Josh Durgin [Mon, 30 Dec 2013 22:52:40 +0000 (14:52 -0800)]
Merge pull request #1006 from yuyuyu101/wip-7066

Fix rbd bench-write improper behavior

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoqa: test rados listomapvals with >512 keys 1022/head
Josh Durgin [Mon, 30 Dec 2013 21:31:18 +0000 (13:31 -0800)]
qa: test rados listomapvals with >512 keys

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorados: allow listomapvals to list all k/v pairs
Bjørnar Ness [Sat, 28 Dec 2013 13:59:00 +0000 (05:59 -0800)]
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>
11 years agov0.74 v0.74
Gary Lowell [Mon, 30 Dec 2013 21:03:17 +0000 (21:03 +0000)]
v0.74

11 years agomake: conditionally build filestore backends 1023/head
Noah Watkins [Mon, 30 Dec 2013 20:56:32 +0000 (12:56 -0800)]
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>
11 years agotest_cls_rbd: avoid warning -Wno-unnamed-template-args
Noah Watkins [Mon, 30 Dec 2013 20:43:57 +0000 (12:43 -0800)]
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>
11 years agotest_cls_rbd: avoid shift overflow
Noah Watkins [Mon, 30 Dec 2013 20:43:21 +0000 (12:43 -0800)]
test_cls_rbd: avoid shift overflow

warning: signed shift result (0x500000000) requires 36 bits to represent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoerasure: add dummy symbol to avoid warnings
Noah Watkins [Mon, 30 Dec 2013 20:16:44 +0000 (12:16 -0800)]
erasure: add dummy symbol to avoid warnings

Empty object files generate warning.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agomake: avoid symbol exporting for C++ libs on non-Linux
Noah Watkins [Mon, 30 Dec 2013 20:14:02 +0000 (12:14 -0800)]
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>
11 years agojson_spirit: don't build json_spirit_value.cpp
Noah Watkins [Mon, 30 Dec 2013 20:12:57 +0000 (12:12 -0800)]
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>
11 years agomake: add top-level libcommon dependency
Noah Watkins [Mon, 30 Dec 2013 20:10:53 +0000 (12:10 -0800)]
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>
11 years agomake: restrict use of --as-needed to Linux
Noah Watkins [Mon, 30 Dec 2013 20:03:54 +0000 (12:03 -0800)]
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>
11 years agolibrados: read into user's bufferlist for aio_read
Rutger ter Borg [Wed, 27 Nov 2013 08:49:00 +0000 (00:49 -0800)]
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>
11 years agoMerge pull request #1018 from dachary/wip-vstart-fsid
Sage Weil [Mon, 30 Dec 2013 16:13:30 +0000 (08:13 -0800)]
Merge pull request #1018 from dachary/wip-vstart-fsid

vstart: set fsid in [global]

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1019 from dachary/wip-show-config-value
Sage Weil [Mon, 30 Dec 2013 16:12:18 +0000 (08:12 -0800)]
Merge pull request #1019 from dachary/wip-show-config-value

common: evaluate --show-config* after CEPH_ARGS

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon: evaluate --show-config* after CEPH_ARGS 1019/head
Loic Dachary [Mon, 30 Dec 2013 09:30:51 +0000 (10:30 +0100)]
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>
11 years agovstart: set fsid in [global] 1018/head
Loic Dachary [Mon, 30 Dec 2013 09:09:41 +0000 (10:09 +0100)]
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>
11 years agoMerge pull request #1008 from ceph/port/spinlock
Sage Weil [Mon, 30 Dec 2013 05:09:04 +0000 (21:09 -0800)]
Merge pull request #1008 from ceph/port/spinlock

spinlock: add generic spinlock implementation

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1014 from ceph/port/misc
Sage Weil [Mon, 30 Dec 2013 04:58:17 +0000 (20:58 -0800)]
Merge pull request #1014 from ceph/port/misc

misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1015 from yuyuyu101/wip-fix-tests
Sage Weil [Mon, 30 Dec 2013 04:44:13 +0000 (20:44 -0800)]
Merge pull request #1015 from yuyuyu101/wip-fix-tests

Fix some test codes problems

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1013 from ceph/port/public-hdrs
Sage Weil [Mon, 30 Dec 2013 04:41:24 +0000 (20:41 -0800)]
Merge pull request #1013 from ceph/port/public-hdrs

use portable types in public headers

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoFix qa/workunits/rados/test_cache_pool.sh typos 1015/head
Haomai Wang [Mon, 30 Dec 2013 04:07:56 +0000 (12:07 +0800)]
Fix qa/workunits/rados/test_cache_pool.sh typos

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agoFix test/filestore/store_test.cc error
Haomai Wang [Mon, 30 Dec 2013 04:06:37 +0000 (12:06 +0800)]
Fix test/filestore/store_test.cc error

Commit
https://github.com/ceph/ceph/commit/d2b661d0efe79f5ec96e64647350cee0b80dc887
change the test result, just change it.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agorados: include struct timeval definition 1013/head
Noah Watkins [Sun, 29 Dec 2013 20:56:34 +0000 (12:56 -0800)]
rados: include struct timeval definition

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agointtypes: use portable types in public headers
Noah Watkins [Sun, 29 Dec 2013 20:54:48 +0000 (12:54 -0800)]
inttypes: use portable types in public headers

loff_t -> int64_t
  __u8 -> uint8_t

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: include headers for struct statfs 1014/head
Noah Watkins [Sun, 29 Dec 2013 21:01:06 +0000 (13:01 -0800)]
test: include headers for struct statfs

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: remove platform specific header
Noah Watkins [Sun, 29 Dec 2013 21:00:35 +0000 (13:00 -0800)]
test: remove platform specific header

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: print warning about missing fs features
Noah Watkins [Sun, 29 Dec 2013 20:59:15 +0000 (12:59 -0800)]
test: print warning about missing fs features

- sync
- posix_fadvise

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: only build some tests on linux
Noah Watkins [Sun, 29 Dec 2013 20:57:45 +0000 (12:57 -0800)]
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>
11 years agotest: fix VLA of non-POD type
Noah Watkins [Sun, 29 Dec 2013 19:44:57 +0000 (11:44 -0800)]
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>
11 years agogtest: disable tr1/tuple
Noah Watkins [Sun, 29 Dec 2013 18:01:38 +0000 (10:01 -0800)]
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>
11 years agomake: use c++ flags for building librados
Noah Watkins [Sat, 28 Dec 2013 22:32:31 +0000 (14:32 -0800)]
make: use c++ flags for building librados

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agowarning: fix typo and -Wmismatched-tags
Noah Watkins [Sun, 29 Dec 2013 18:07:37 +0000 (10:07 -0800)]
warning: fix typo and -Wmismatched-tags

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoc++11: fix std::lock naming conflicts
Noah Watkins [Sun, 29 Dec 2013 18:32:22 +0000 (10:32 -0800)]
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>
11 years agokvstore: only build on linux
Noah Watkins [Sun, 29 Dec 2013 21:10:02 +0000 (13:10 -0800)]
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>
11 years agoMerge pull request #1007 from ceph/wip-misc-fixes
Sage Weil [Sun, 29 Dec 2013 20:04:09 +0000 (12:04 -0800)]
Merge pull request #1007 from ceph/wip-misc-fixes

misc fixes

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1004 from ceph/wip-snaps
Loic Dachary [Sun, 29 Dec 2013 08:31:39 +0000 (00:31 -0800)]
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>
11 years agospinlock: add generic spinlock implementation 1008/head
Noah Watkins [Sun, 21 Jul 2013 01:41:40 +0000 (18:41 -0700)]
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>
11 years agoqa/workunits/rest/test.py: rbd pool ruleset is now 0 1007/head
Sage Weil [Sat, 28 Dec 2013 18:36:27 +0000 (10:36 -0800)]
qa/workunits/rest/test.py: rbd pool ruleset is now 0

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: retry EBUSY race checks
Sage Weil [Sat, 28 Dec 2013 18:34:56 +0000 (10:34 -0800)]
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>
11 years agolibcephfs: get osd location on -1 should return EINVAL
Sage Weil [Sat, 28 Dec 2013 18:25:00 +0000 (10:25 -0800)]
libcephfs: get osd location on -1 should return EINVAL

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoqa/workunits/mon/crush_ops.sh: fix in-use rule rm test
Sage Weil [Sat, 28 Dec 2013 18:22:18 +0000 (10:22 -0800)]
qa/workunits/mon/crush_ops.sh: fix in-use rule rm test

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocrush: fix get_full_location_ordered
Sage Weil [Sat, 28 Dec 2013 16:55:02 +0000 (08:55 -0800)]
crush: fix get_full_location_ordered

This should return -ENOENT when an id is not present.  Broken by
746069ee62c74ecf04ed45988029d5c3382a38d2.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoFix rbd bench-write improper behavior 1006/head
Haomai Wang [Sat, 28 Dec 2013 09:57:43 +0000 (17:57 +0800)]
Fix rbd bench-write improper behavior

"rbd bench-write" eject all write operations with the same offset at the same
time. It will result in non-objective performance result from this command.

fix #7066

Co-Author: Rongze Zhu <rongze@unitedstack.com>
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agoMerge pull request #1005 from ceph/wip-rgw-leak
Yehuda Sadeh [Sat, 28 Dec 2013 00:52:30 +0000 (16:52 -0800)]
Merge pull request #1005 from ceph/wip-rgw-leak

rgw: fix leak of RGWProcess

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: fix leak of RGWProcess 1005/head
Sage Weil [Sat, 28 Dec 2013 00:36:02 +0000 (16:36 -0800)]
rgw: fix leak of RGWProcess

Introduced by a3e50b09a1fa22b80dea014d4b7bd96c23904f22.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: preserve user_version in snaps/clones 1004/head
Sage Weil [Sat, 28 Dec 2013 00:29:11 +0000 (16:29 -0800)]
osd: preserve user_version in snaps/clones

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados: test read from snapshots
Sage Weil [Sat, 28 Dec 2013 00:28:58 +0000 (16:28 -0800)]
ceph_test_rados: test read from snapshots

This was disabled back in 2011, c54aa7db3bc6e4c763e3b08d2ae98f89afe5a246.
Whoops!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/OSDMap: observe 'osd crush chooseleaf type' option for initial rules
Sage Weil [Fri, 27 Dec 2013 21:45:34 +0000 (13:45 -0800)]
osd/OSDMap: observe 'osd crush chooseleaf type' option for initial rules

This option was dropped by 2a7fcc35b8ceeff1e07da28b10ced4a2a4ed09ec.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'rbd-map-options'
Josh Durgin [Fri, 27 Dec 2013 17:56:55 +0000 (09:56 -0800)]
Merge branch 'rbd-map-options'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: expose options available to rbd map
Ilya Dryomov [Fri, 27 Dec 2013 17:40:59 +0000 (19:40 +0200)]
rbd: expose options available to rbd map

Add a -o / --options option, which would allow users to specify
rbd-specific and generic ceph client and osd options available at
mapping time in a comma separated list (similar to mount(8) mount
options).

Exposed options are:

- fsid=%s
- ip=%s
- share
- noshare
- crc
- nocrc
- osdkeepalive=%d
- osd_idle_ttl=%d
- rw
- ro (equivalent to existing --read-only flag)

The rw/ro < 3.7 kernels compatibility kludge added in commit
fb0f1986449b is preserved.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agoMerge pull request #1001 from dachary/wip-forward-tid
Sage Weil [Fri, 27 Dec 2013 15:59:43 +0000 (07:59 -0800)]
Merge pull request #1001 from dachary/wip-forward-tid

messages: add tid to string form of MForward

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1002 from yuyuyu101/wip-7062
Loic Dachary [Fri, 27 Dec 2013 12:28:59 +0000 (04:28 -0800)]
Merge pull request #1002 from yuyuyu101/wip-7062

Lack of "start" member function declare in WBThrottle.h
make check runs ok

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoLack of "start" member function declare in WBThrottle.h 1002/head
Haomai Wang [Fri, 27 Dec 2013 10:11:09 +0000 (18:11 +0800)]
Lack of "start" member function declare in WBThrottle.h

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agomessages: add tid to string form of MForward 1001/head
Loic Dachary [Fri, 27 Dec 2013 06:30:04 +0000 (07:30 +0100)]
messages: add tid to string form of MForward

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #837 from ceph/port/fallocate
Sage Weil [Fri, 27 Dec 2013 05:33:39 +0000 (21:33 -0800)]
Merge pull request #837 from ceph/port/fallocate

FileJournal: zero-fill in-lieu of posix_fallocate

We may want to change that to a #warning later...

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #908 from ceph/wip-6940
Sage Weil [Fri, 27 Dec 2013 05:31:16 +0000 (21:31 -0800)]
Merge pull request #908 from ceph/wip-6940

rgw: fix reading bucket policy in RGWBucket::get_policy()

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #982 from dachary/wip-default-crush-rule
Sage Weil [Fri, 27 Dec 2013 05:29:36 +0000 (21:29 -0800)]
Merge pull request #982 from dachary/wip-default-crush-rule

osd: add default crush rule for erasure pools

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #974 from dachary/wip-build-depends
Sage Weil [Fri, 27 Dec 2013 05:26:02 +0000 (21:26 -0800)]
Merge pull request #974 from dachary/wip-build-depends

packaging: make check needs argparse and uuidgen

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #994 from yuyuyu101/wip-7062
Sage Weil [Fri, 27 Dec 2013 05:25:08 +0000 (21:25 -0800)]
Merge pull request #994 from yuyuyu101/wip-7062

Fix WBThrottle thread disappear problem

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agopackaging: make check needs argparse and uuidgen 974/head
Loic Dachary [Thu, 19 Dec 2013 14:48:46 +0000 (15:48 +0100)]
packaging: make check needs argparse and uuidgen

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1000 from ceph/wip-rbd-tinc-5426
Josh Durgin [Fri, 27 Dec 2013 02:53:02 +0000 (18:53 -0800)]
Merge pull request #1000 from ceph/wip-rbd-tinc-5426

fix #5426 race in librbd

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agolibrbd: call user completion after incrementing perfcounters 1000/head
Josh Durgin [Fri, 27 Dec 2013 01:38:52 +0000 (17:38 -0800)]
librbd: call user completion after incrementing perfcounters

The perfcounters (and the ictx) are only valid while the image is
still open.  If the librbd user gets the callback for its last I/O,
then closes the image, the ictx and its perfcounters will be
invalid. If the AioCompletion object is has not run the rest of its
complete() method yet, it will access these now-invalid addresses,
possibly leading to a crash.

The AioCompletion object is independent of the ictx and does not
access it again after incrementing perfcounters, so avoid this race by
calling the user's callback after this step. The AioCompletion object
will be cleaned up by the rest of complete_request(), independent of
the ImageCtx.

Fixes: #5426
Backport: dumpling, emperor
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoosd: create default ruleset for erasure pools 982/head
Loic Dachary [Thu, 26 Dec 2013 11:23:50 +0000 (12:23 +0100)]
osd: create default ruleset for erasure pools

The ruleset --osd_pool_default_crush_erasure_ruleset is created to be
suitable for erasure coded pools when OSDMap::build_simple is required
to build the default OSD map of a new cluster.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: implement --osd-pool-default-crush-erasure-ruleset
Loic Dachary [Thu, 26 Dec 2013 08:59:18 +0000 (09:59 +0100)]
mon: implement --osd-pool-default-crush-erasure-ruleset

It must be different from the replicated default.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: implement --osd-pool-default-crush-replicated-ruleset
Loic Dachary [Thu, 26 Dec 2013 11:03:57 +0000 (12:03 +0100)]
mon: implement --osd-pool-default-crush-replicated-ruleset

--osd-pool-default-crush-replicated-ruleset replaces
--osd-pool-default-crush-rule

If --osd-pool-default-crush-rule is set it takes precedence over
--osd-pool-default-crush-replicated-ruleset and a deprecation warning is
displayed.

The CrushWrapper::get_osd_pool_default_crush_replicated_ruleset helper is
used to implement this behaviour.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: use CrushWrapper::add_simple_ruleset
Loic Dachary [Thu, 26 Dec 2013 10:20:41 +0000 (11:20 +0100)]
osd: use CrushWrapper::add_simple_ruleset

Replace the manually crafted ruleset in OSDMap::build_simple_crush_map*
with calls to add_simple_ruleset. The generated ruleset do not have the
same behavior but that presumably do not cause any backward
compatibility problem because they are only created when a new cluster
is being initialized.

The prototypes of OSDMap::build_simple* are modified to allow for a
return code and display of a human readable error message.

The --osd-min-rep and --osd-max-rep configuration options are removed :
they were only used in the code that was removed.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: build_simple creates a single rule
Loic Dachary [Wed, 25 Dec 2013 12:19:56 +0000 (13:19 +0100)]
osd: build_simple creates a single rule

The three rules created by build_simple are identical. They are replaced
by a single rule named replicated_rule which is set to be used by the
data, rbd and metadata pools.

Instead of hardcoding the ruleset number to zero, it is read from
osd_pool_default_crush_ruleset which defaults to zero.

The CEPH_DEFAULT_CRUSH_REPLICATED_RULESET enum is moved from osd_type.h to
config.h because it may be needed when osd_type.h is not included.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocrush: set min_rep and max_rep depending on mode
Loic Dachary [Thu, 26 Dec 2013 23:10:55 +0000 (00:10 +0100)]
crush: set min_rep and max_rep depending on mode

Assuming firstn is for replica and indep is for erasure. This is a
strong constraint but it is unlikely to make the resulting ruleset unfit
to be used in most cases.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocrush: add rule_type argument to add_simple_ruleset
Loic Dachary [Thu, 26 Dec 2013 18:50:37 +0000 (19:50 +0100)]
crush: add rule_type argument to  add_simple_ruleset

Instead of hardcoded pg_pool_t::TYPE_REPLICATED

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agopartially rename rule to ruleset
Loic Dachary [Thu, 26 Dec 2013 08:49:02 +0000 (09:49 +0100)]
partially rename rule to ruleset

Where code is changed, get the opportunity to rename rule to ruleset to
improve naming consistency.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge branch 'leseb-doc-rbd-havana'
Josh Durgin [Thu, 26 Dec 2013 17:55:17 +0000 (09:55 -0800)]
Merge branch 'leseb-doc-rbd-havana'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agodoc: Add OpenStack Havana documentation
Sébastien Han [Fri, 6 Dec 2013 14:43:37 +0000 (15:43 +0100)]
doc: Add OpenStack Havana documentation

New features appeared during the Havana cycle.
This patch offers a general update of the doc.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
11 years agoosd: factorize build_simple and build_simple_from_conf
Loic Dachary [Wed, 25 Dec 2013 11:59:00 +0000 (12:59 +0100)]
osd: factorize build_simple and build_simple_from_conf

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoqa: remove osd pool create erasure tests
Loic Dachary [Thu, 26 Dec 2013 07:39:52 +0000 (08:39 +0100)]
qa: remove osd pool create erasure tests

Creating an erasure pool will crash the OSD because OSD::_make_pg
asserts if the type is not replicated. The tests related to erasure
coded pool creation are removed from qa/workunits/cephtool/test.sh.

The osd-create-pool.sh unit test covers the cases removed from test.sh
more extensively. The intent is to check the interactions with the MON
only, therefore it does not run an OSD and the absence of erasure code
placement group backend implementation is not an issue.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: osd-pool-create must not loop forever on kill
Loic Dachary [Wed, 25 Dec 2013 20:36:13 +0000 (21:36 +0100)]
mon: osd-pool-create must not loop forever on kill

Looping forever on kill does not serve any useful purpose.
Reduce the verbosity of the exit trap to help diagnose error
conditions.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoclient: SyntheticClient uses the first available pool
Loic Dachary [Wed, 25 Dec 2013 13:01:48 +0000 (14:01 +0100)]
client: SyntheticClient uses the first available pool

It is unrelated to CEPH_DATA_RULE which is replaced by
SYNCLIENT_FIRST_POOL.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: MDS data and metadata pool numbers are hardcoded
Loic Dachary [Wed, 25 Dec 2013 12:30:34 +0000 (13:30 +0100)]
mon: MDS data and metadata pool numbers are hardcoded

The MDS assumes pool 0 and 1 are suitable for data and metadata
respectively. Instead of relying on the CEPH_DATA_RULE and
CEPH_METADATA_RULE constants that only match by chance, set a hardcoded
value specific to MDS to reduce the fragility of the hardcoded
assumption.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoFix WBThrottle thread disappear problem 994/head
Haomai Wang [Thu, 26 Dec 2013 03:20:52 +0000 (11:20 +0800)]
Fix WBThrottle thread disappear problem

New ceph_osd.cc code did ObjectStore init work before global_init_daemonize(),
and WBThrottle thread is created when objectstore constructed. So after
daemon(), WBThrottle thread won't exist in new process. It will result in
deadlock.

When "cur_ios" which is member of WBThrottle hits hard limit, there exists two
ways to decrease "cur_ios". The first is WBThrottle thread which is dead if
deamonize, another is SyncThread. SyncThread will block at op_tp.pause()
because thread in op_tp(threadpool) block at
wbthrottle.throttle(FileStore::doop). So no thread will continue process jobs
in filestore layer and all threads is waiting.

Fix #7062 (http://tracker.ceph.com/issues/7062)

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agoMerge pull request #995 from dachary/wip-deprecated
Sage Weil [Thu, 26 Dec 2013 00:09:31 +0000 (16:09 -0800)]
Merge pull request #995 from dachary/wip-deprecated

rados: deprecated attribute has no argument

11 years agoceph_argparse: kill _daemon versions of argparse calls 996/head
Ilya Dryomov [Wed, 25 Dec 2013 19:41:16 +0000 (21:41 +0200)]
ceph_argparse: kill _daemon versions of argparse calls

Commit c76bbc2e6df1, which introduced _daemon versions of some of the
argparse calls, also changed the behaviour of non-_daemon versions.
The change resulted in incorrect error messages, e.g.

  $ ./rbd create b0 --size
  rbd: extraneous parameter --size

instead of what should have been

  $ ./rbd create b0 --size
  Option --size requires an argument.

The users of _daemon versions were added in commit be801f6c506d and
removed in commit f26bd55e57f1, so just kill the _daemon versions and
restore the old behaviour.  (This effectively reverts commit
c76bbc2e6df1.)

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agorados: deprecated attribute has no argument 995/head
Loic Dachary [Wed, 25 Dec 2013 09:44:07 +0000 (10:44 +0100)]
rados: deprecated attribute has no argument

The deprecated attribute argument was introduced in gcc 4.5
http://gcc.gnu.org/gcc-4.5/changes.html and centos6 has a lower version.

Signed-off-by: Loic Dachary <loic@dachary.org>