]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoosd: Implement multiple backfill target handling 931/head
David Zafman [Mon, 13 Jan 2014 19:38:48 +0000 (11:38 -0800)]
osd: Implement multiple backfill target handling

Fixes: #5858
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Interim backfill changes
David Zafman [Thu, 21 Nov 2013 23:21:53 +0000 (15:21 -0800)]
osd: Interim backfill changes

Make peer_backfill_info a map which holds a
BackfillInterval for all backfill targets.
Initially see if recover_backfill() can just backfill
the first one and mark them all finished.

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Change waiting_on_backfill to a set<int>
David Zafman [Sat, 16 Nov 2013 01:25:54 +0000 (17:25 -0800)]
osd: Change waiting_on_backfill to a set<int>

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Interim working version with backfill reserve state changes
David Zafman [Fri, 8 Nov 2013 03:45:46 +0000 (19:45 -0800)]
osd: Interim working version with backfill reserve state changes

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Recovery reservations need to include backfill peers
David Zafman [Tue, 17 Dec 2013 20:39:31 +0000 (12:39 -0800)]
osd: Recovery reservations need to include backfill peers

Caused by 86e4fd4f7a9848511e1bf9ae433fcd3a35a0818f

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agomessages, os, osd: Clean-up g/hobject_t MAX handling
David Zafman [Tue, 17 Dec 2013 02:50:57 +0000 (18:50 -0800)]
messages, os, osd: Clean-up g/hobject_t MAX handling

Add check of is_max() before updating an unset pool
Use efficient is_max() instead of compare with hobject::get_max()

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Return false for func that returns bool
David Zafman [Sat, 16 Nov 2013 01:23:21 +0000 (17:23 -0800)]
osd: Return false for func that returns bool

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Fix problems in ReplicatedPG::do_op() logic
David Zafman [Wed, 11 Dec 2013 01:29:48 +0000 (17:29 -0800)]
osd: Fix problems in ReplicatedPG::do_op() logic

Fix assert(is_degraded_object(soid)) in ReplicatedPG::wait_for_degraded_object()
  Use last_backfill_started as the backfill line
  Handle uncommon case of multi op source after backfill line and target before
  backfill line and !is_degraded_object().
  Include backfill line itself for before_backfill (<= instead of <)

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Determine if compatibility is required due to back level OSDs
David Zafman [Fri, 20 Dec 2013 22:35:56 +0000 (14:35 -0800)]
osd: Determine if compatibility is required due to back level OSDs

fixes: #7039

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Config OSD when CEPH_FEATURE_OSD_ERASURE_CODES feature first seen
David Zafman [Thu, 19 Dec 2013 21:47:28 +0000 (13:47 -0800)]
osd: Config OSD when CEPH_FEATURE_OSD_ERASURE_CODES feature first seen

Set the OSD superblock CEPH_OSD_FEATURE_INCOMPAT_SHARDS and
notify the filestore through set_allow_sharded_objects() in that order.

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Remove redundant incompat feature
David Zafman [Thu, 19 Dec 2013 18:35:39 +0000 (10:35 -0800)]
osd: Remove redundant incompat feature

We can remove this CompatSet bit without worry because the only
way it could have been set is if an erasure coded pool was create.
This isn't supported as of yet.

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Correction to #6690 change
David Zafman [Thu, 2 Jan 2014 23:04:59 +0000 (15:04 -0800)]
osd: Correction to #6690 change

Reorder sequence so min_size check is right
Remove redundant resize of backfill

Correction to 19cff890eb6083eefdb7b709773313b2c8acbcea

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agodoc/release-notes: fix bobtail version
Sage Weil [Thu, 2 Jan 2014 16:36:35 +0000 (08:36 -0800)]
doc/release-notes: fix bobtail version

The tunables were mostly supported by later argonaut point releases,
but not officially.  Let's stick with bobtail though!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1027 from jdurgin/wip-unprotect-error
Sage Weil [Thu, 2 Jan 2014 02:48:33 +0000 (18:48 -0800)]
Merge pull request #1027 from jdurgin/wip-unprotect-error

librbd: better error when unprotect fails on unprotected snap

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1010 from dachary/wip-mon-keyring
Sage Weil [Thu, 2 Jan 2014 02:47:57 +0000 (18:47 -0800)]
Merge pull request #1010 from dachary/wip-mon-keyring

implement --key as an alternative to --keyring when ceph-mon --mkfs

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1031 from dachary/wip-parse-args
Sage Weil [Thu, 2 Jan 2014 02:04:31 +0000 (18:04 -0800)]
Merge pull request #1031 from dachary/wip-parse-args

CEPH_ARGS should trim whitespaces

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1030 from dachary/wip-crush-location
Sage Weil [Thu, 2 Jan 2014 02:03:13 +0000 (18:03 -0800)]
Merge pull request #1030 from dachary/wip-crush-location

osdc: = is not a delimiter in --crush-location

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1020 from dachary/wip-ceph-disk-override
Sage Weil [Thu, 2 Jan 2014 02:00:43 +0000 (18:00 -0800)]
Merge pull request #1020 from dachary/wip-ceph-disk-override

ceph-disk: prepare --data-dir must not override files

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: v0.74
Sage Weil [Thu, 2 Jan 2014 01:58:30 +0000 (17:58 -0800)]
doc/release-notes: v0.74

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #950 from ceph/wip-pg-stat
Loic Dachary [Thu, 2 Jan 2014 01:03:44 +0000 (17:03 -0800)]
Merge pull request #950 from ceph/wip-pg-stat

update pg stats when they are queried; share peer_info on query too

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoceph-conf: display arguments when an option cannot be parsed 1031/head
Loic Dachary [Wed, 1 Jan 2014 20:23:55 +0000 (21:23 +0100)]
ceph-conf: display arguments when an option cannot be parsed

   unable to parse option: ''

Is difficult to figure out. It is much better if shown in the context in
which it was found:

   ceph-conf --help ''
   unable to parse option: ''
   args: '--help' ''

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: CEPH_ARGS should trim whitespaces
Loic Dachary [Wed, 1 Jan 2014 20:23:18 +0000 (21:23 +0100)]
common: CEPH_ARGS should trim whitespaces

CEPH_ARGS when parsed by env_to_vec did not trim trailing and leading
whitespaces: they would unexpectedly be parsed as empty arguments and
lead to confusing errors such as :

    CEPH_ARGS=' --id 3' ceph-conf --lookup mon-data
    unable to parse option: ''

The parsing code is replaced with str_vec(). It also resolves the
problem of the hard limit to 1000 characters imposed by the static
buffer that would silently truncate any CEPH_ARGS content.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1028 from ceph/wip-empty-rbd-ls
Sage Weil [Wed, 1 Jan 2014 19:41:05 +0000 (11:41 -0800)]
Merge pull request #1028 from ceph/wip-empty-rbd-ls

rbd: return 0 and an empty list when pool is entirely empty

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1025 from pyKun/fix_typos
Loic Dachary [Wed, 1 Jan 2014 15:18:40 +0000 (07:18 -0800)]
Merge pull request #1025 from pyKun/fix_typos

Fix typos in erasure code documents

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoosdc: = is not a delimiter in --crush-location 1030/head
Loic Dachary [Wed, 1 Jan 2014 13:57:52 +0000 (14:57 +0100)]
osdc: = is not a delimiter in --crush-location

When parsing the crush location

     --crush-location 'root=default host=hostA'

it must create the vector

     [ 'root=default', 'host=hostA' ]

but the default list of separators of get_str_vec includes = which will
create

     [ 'root', 'default', 'host', 'hostA' ]

instead. Set the list of delimiters to exclude = instead.

Signed-off-by: Loic Dachary <loic@dachary.org>
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 agomon: implement --key for --mkfs 1010/head
Loic Dachary [Sun, 29 Dec 2013 11:57:45 +0000 (12:57 +0100)]
mon: implement --key for --mkfs

Allow --key to be used as an alternative to --keyring when ceph-mon
--mkfs runs. The key is wrapped inline into

     [mon.]
key = AQDUS79S0AF9FRAA2cgRLFscVce0gROn/s9WMg==
caps mon = "allow *"

and parsed with KeyRing::decode_plaintext which is made public.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: fix indentation
Loic Dachary [Sun, 29 Dec 2013 11:52:28 +0000 (12:52 +0100)]
mon: fix indentation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: do not use the keyring if auth = none
Loic Dachary [Sun, 29 Dec 2013 11:40:05 +0000 (12:40 +0100)]
mon: do not use the keyring if auth = none

The Monitor::is_keyring_required() predicate is defined to be used in
the mkfs code path and not require the keyring to be set unless it is
actually going to be used.

If authentication is turned on later on existing monitors, the keyring
files will have to be set by an external tool in the mon data directory
and the mon restarted.

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 agorbd: return 0 and an empty list when pool is entirely empty 1028/head
Josh Durgin [Wed, 1 Jan 2014 01:00:06 +0000 (17:00 -0800)]
rbd: return 0 and an empty list when pool is entirely empty

rbd_list will return -ENOENT when no rbd_directory object
exists. Handle this in the cli tool and interpret it as success with
an empty list.

Add this to the release notes since it changes command line behavior.

Fixes: #6693
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibrbd: better error when unprotect fails on unprotected snap 1027/head
Josh Durgin [Wed, 1 Jan 2014 00:26:04 +0000 (16:26 -0800)]
librbd: better error when unprotect fails on unprotected snap

This will show up on the command line and logs, making it more
clear than EINVAL.

Fixes #6851 and #4045
Signed-off-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 agoFix typos in erasure code documents 1025/head
Kun Huang [Tue, 31 Dec 2013 06:54:13 +0000 (01:54 -0500)]
Fix typos in erasure code documents

Signed-off-by: Kun Huang <academicgareth@gmail.com>
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>