]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoerasure-code: use uintptr_t instead of long long 1076/head
Loic Dachary [Mon, 13 Jan 2014 17:16:09 +0000 (18:16 +0100)]
erasure-code: use uintptr_t instead of long long

Checking the pointer alignment using a cast to long long raises a
warning when --Wpointer-to-int-cast is given.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #998 from ceph/wip-omapdirfrag2
Yan, Zheng [Fri, 10 Jan 2014 23:48:05 +0000 (15:48 -0800)]
Merge pull request #998 from ceph/wip-omapdirfrag2

use OMAP to store dirfrags

11 years agomds: require CEPH_FEATURE_OSD_TMAP2OMAP 998/head
Sage Weil [Sat, 28 Dec 2013 20:23:22 +0000 (12:23 -0800)]
mds: require CEPH_FEATURE_OSD_TMAP2OMAP

Require that all OSDs support TMAP2OMAP before starting the MDS.  This
avoids doing some work and then crashing with EOPNOTSUPP, and gives us
a more informative message in the logs.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/OSDMap: get_up_osd_features()
Sage Weil [Sat, 28 Dec 2013 20:16:39 +0000 (12:16 -0800)]
osd/OSDMap: get_up_osd_features()

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomds: use OMAP to store dirfrags
Yan, Zheng [Tue, 24 Dec 2013 00:56:55 +0000 (08:56 +0800)]
mds: use OMAP to store dirfrags

MDS can fetch dirfrags from both TMAP and OMAP. When committing a
dirfrags that is stored in TMAP, MDS first uses OSD_OP_TMAP2OMAP
to convert corresponding TMAP to OMAP, then updates the resulting
OMAP.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoosd: introduce TMAP->OMAP conversion operation
Yan, Zheng [Tue, 24 Dec 2013 01:34:34 +0000 (09:34 +0800)]
osd: introduce TMAP->OMAP conversion operation

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1074 from ceph/wip-7135
athanatos [Fri, 10 Jan 2014 22:28:01 +0000 (14:28 -0800)]
Merge pull request #1074 from ceph/wip-7135

Fixes: #7135
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agosrc/test/ObjectMap: test clear_keys_header() call 1074/head
Samuel Just [Fri, 10 Jan 2014 21:25:33 +0000 (13:25 -0800)]
src/test/ObjectMap: test clear_keys_header() call

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agosrc/test/librados/misc.cc: verify that omap_clear doesn't blast xattr
Samuel Just [Fri, 10 Jan 2014 21:24:05 +0000 (13:24 -0800)]
src/test/librados/misc.cc: verify that omap_clear doesn't blast xattr

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoos/DBObjectMap, FileStore: omap_clear should not remove xattrs
Samuel Just [Fri, 10 Jan 2014 21:23:32 +0000 (13:23 -0800)]
os/DBObjectMap, FileStore: omap_clear should not remove xattrs

Prevously, FileStore::_omap_clear() used ObjectMap::clear(), which
incorrectly also blasts any stored xattrs.  Instead, add
ObjectMap::clear_keys_header() to handle this case efficiently.

Fixes: #7065
Fixes: #7135
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1073 from dachary/wip-mailmap
Sage Weil [Fri, 10 Jan 2014 21:58:33 +0000 (13:58 -0800)]
Merge pull request #1073 from dachary/wip-mailmap

mailmap updates

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Fri, 10 Jan 2014 21:57:04 +0000 (13:57 -0800)]
Merge remote-tracking branch 'gh/next'

11 years agomailmap: fix typo in Alexandre Maragone 1073/head
Loic Dachary [Fri, 10 Jan 2014 19:48:30 +0000 (20:48 +0100)]
mailmap: fix typo in Alexandre Maragone

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoorganizationmap: joe.buck@inktank.com is Inktank
Loic Dachary [Fri, 10 Jan 2014 18:07:50 +0000 (19:07 +0100)]
organizationmap: joe.buck@inktank.com is Inktank

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1062 from ceph/wip-7110
Sage Weil [Fri, 10 Jan 2014 17:51:20 +0000 (09:51 -0800)]
Merge pull request #1062 from ceph/wip-7110

rgw: convert bucket info if needed

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1070 from dachary/wip-organizationmap
Loic Dachary [Fri, 10 Jan 2014 17:45:23 +0000 (09:45 -0800)]
Merge pull request #1070 from dachary/wip-organizationmap

organizationmap: match authors with organizations

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoorganizationmap: match authors with organizations 1070/head
Loic Dachary [Fri, 10 Jan 2014 16:49:21 +0000 (17:49 +0100)]
organizationmap: match authors with organizations

Using the same format as .mailmap, match author names with the
organization sponsoring them, if any. It can be used from the command
line to display git log statistics with results aggregated by company
names.

The git-check-mailmap command that was introduced in git 1.8.4 can be
used to use .mailmap first and then .organizationmap using the
normalized author names. For instance:

    git log --pretty='%aN <%aE>' | \
    git -c mailmap.file=.organizationmap check-mailmap --stdin

This file is also meant to be a source of information for the maintainers of
http://metrics.ceph.com/

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomongoose: fix warning
Sage Weil [Fri, 10 Jan 2014 00:16:36 +0000 (16:16 -0800)]
mongoose: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1069 from dachary/wip-mailmap
Sage Weil [Fri, 10 Jan 2014 16:53:55 +0000 (08:53 -0800)]
Merge pull request #1069 from dachary/wip-mailmap

mailmap updates

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Roald J. van Loon <roald@roaldvanloon.nl>
Reviewed-by: David Moreau Simard <dmsimard@iweb.com>
11 years agomailmap: make roald@roaldvanloon.nl primary 1069/head
Loic Dachary [Fri, 10 Jan 2014 09:47:02 +0000 (10:47 +0100)]
mailmap: make roald@roaldvanloon.nl primary

It seems more appropriate than @gmail.com

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: remove company name from Pascal de Bruijn name
Loic Dachary [Fri, 10 Jan 2014 09:46:16 +0000 (10:46 +0100)]
mailmap: remove company name from Pascal de Bruijn name

It is in the email address anyway.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Andrew Leung, Carlos Maltzahn and Esteban Molina-Estolano
Loic Dachary [Fri, 10 Jan 2014 09:10:19 +0000 (10:10 +0100)]
mailmap: add Andrew Leung, Carlos Maltzahn and Esteban Molina-Estolano

Although the commit aliases are cryptic, the timeframe and account names
seem to match.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add David Moreau Simard alias
Loic Dachary [Fri, 10 Jan 2014 09:09:32 +0000 (10:09 +0100)]
mailmap: add David Moreau Simard alias

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1060 from dachary/wip-mailmap
Loic Dachary [Fri, 10 Jan 2014 09:05:05 +0000 (01:05 -0800)]
Merge pull request #1060 from dachary/wip-mailmap

mailmap updates for reviewed-by

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: João Eduardo Luís <joao.luis@inktank.com>
Reviewed-by: Noah Watkins <noah.watkins@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoFileStore: detect XFS properly
Greg Farnum [Thu, 9 Jan 2014 22:03:12 +0000 (14:03 -0800)]
FileStore: detect XFS properly

We were only setting m_fs_type = FS_TYPE_XFS if
m_filestore_replica_fadvise was also set -- presumably
the bug fix accidentally blocked off too much of the code type. This
resulted in our xattr counts always being set too low: the store
is mounted (and thus does _detectfs) twice; once in as part of the
not-as-conditional-as-it-looks convertfs in ceph_osd.cc, and once
as part of OSD::init().

Reported-by: Sushma Gurram <Sushma.Gurram@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: set next commit in mon command replies
Sage Weil [Thu, 9 Jan 2014 22:44:49 +0000 (14:44 -0800)]
mon: set next commit in mon command replies

The mon command acks include a version that is used by the client to
determine which version of the map they need to get or wait for in order
to see the effects of their command.  Current we are returning
get_last_committed() everywhere, but we are about to commit something (and
waiting for it), which will increase that value by one.  As a result,
clients are always getting epoch/version-1 instead of epoch.

This manifested by a LibRadosTier.Promote test that failed becaues the
OSD had the OSDMap updates adding the tier and overlay but not the final
map change that set the cache-mode to writeback.  I suspect this is also
the cause of of spurious errors in the past where we've seen misdirected
request errors that made no sense.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao@inktank.com>
11 years agoMerge pull request #1061 from kdreyer-inktank/rm-execute-bit-src
Sage Weil [Thu, 9 Jan 2014 20:31:12 +0000 (12:31 -0800)]
Merge pull request #1061 from kdreyer-inktank/rm-execute-bit-src

remove spurious executable permissions on source code files

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc: Removed extraneous comment from snapshot text.
John Wilkins [Thu, 9 Jan 2014 18:26:28 +0000 (10:26 -0800)]
doc: Removed extraneous comment from snapshot text.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Thu, 9 Jan 2014 18:15:41 +0000 (10:15 -0800)]
Merge branch 'master' of https://github.com/ceph/ceph

11 years agoMerge pull request #1063 from ceph/install-erasure-headers
Loic Dachary [Thu, 9 Jan 2014 17:31:35 +0000 (09:31 -0800)]
Merge pull request #1063 from ceph/install-erasure-headers

osd: add missing header to install list

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoosd: add missing header to install list 1063/head
Noah Watkins [Thu, 9 Jan 2014 17:15:47 +0000 (09:15 -0800)]
osd: add missing header to install list

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agorgw: convert bucket info if needed 1062/head
Yehuda Sadeh [Tue, 7 Jan 2014 02:32:42 +0000 (18:32 -0800)]
rgw: convert bucket info if needed

Fixes: #7110
In dumpling, the bucket info was separated into bucket entry point and
bucket instance objects. When setting bucket attrs we only ended up
updating the bucket instance object. However, pre-dumpling buckets still
keep everything at the entry-point object, so acl changes didn't affect
anything (because we never updated the entry point). This change just
converts the bucket info into the new format.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoremove spurious executable permissions on files 1061/head
Ken Dreyer [Thu, 9 Jan 2014 15:55:28 +0000 (08:55 -0700)]
remove spurious executable permissions on files

Fedora's rpmlint complains that some of the source code files in the
tree happen to be executable. Remove the execute bits from these files
to resolve the rpmlint warning.

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
11 years agomailmap: add Yan Zheng fixes for Reviewed-by: 1060/head
Loic Dachary [Thu, 9 Jan 2014 12:48:44 +0000 (13:48 +0100)]
mailmap: add Yan Zheng fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Loic Dachary fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:48:18 +0000 (13:48 +0100)]
mailmap: add Loic Dachary fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Gary Lowell fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:47:56 +0000 (13:47 +0100)]
mailmap: add Gary Lowell fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Noah Watkins fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:47:02 +0000 (13:47 +0100)]
mailmap: add Noah Watkins fixes for Reviewed-by:

Also acknowledge noah.watkins@inktank.com as the primary email.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add João Eduardo Luís fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:46:02 +0000 (13:46 +0100)]
mailmap: add João Eduardo Luís fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Dan Mick fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:45:26 +0000 (13:45 +0100)]
mailmap: add Dan Mick fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Samuel Just fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:44:57 +0000 (13:44 +0100)]
mailmap: add Samuel Just fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Greg Farnum fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:43:57 +0000 (13:43 +0100)]
mailmap: add Greg Farnum fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Yehuda Sadeh fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:43:15 +0000 (13:43 +0100)]
mailmap: add Yehuda Sadeh fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: add Sage Weil fixes for Reviewed-by:
Loic Dachary [Thu, 9 Jan 2014 12:41:54 +0000 (13:41 +0100)]
mailmap: add Sage Weil fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1056 from apeters1971/wip-jerasure-vectorop
Loic Dachary [Thu, 9 Jan 2014 09:08:30 +0000 (01:08 -0800)]
Merge pull request #1056 from apeters1971/wip-jerasure-vectorop

EC-JERASURE: rewrite region-xor function using vector operations

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1057 from dachary/wip-buffer-aligned
Loic Dachary [Thu, 9 Jan 2014 09:06:32 +0000 (01:06 -0800)]
Merge pull request #1057 from dachary/wip-buffer-aligned

erasure-code: ensure that coding chunks are page aligned

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
11 years agoMerge pull request #1045 from ceph/wip-7093
Sage Weil [Thu, 9 Jan 2014 01:05:46 +0000 (17:05 -0800)]
Merge pull request #1045 from ceph/wip-7093

fix for #7093

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agodoc: Updated for hostname -s and resolving to non-loopback IP address.
John Wilkins [Wed, 8 Jan 2014 22:38:13 +0000 (14:38 -0800)]
doc: Updated for hostname -s and resolving to non-loopback IP address.

fixes: #6234

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Fixed hyperlink.
John Wilkins [Wed, 8 Jan 2014 22:37:20 +0000 (14:37 -0800)]
doc: Fixed hyperlink.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoerasure-code: relax zero copy requirements in tests 1057/head
Loic Dachary [Wed, 8 Jan 2014 19:14:52 +0000 (20:14 +0100)]
erasure-code: relax zero copy requirements in tests

The input buffer is copied when padding is required. Remove the tests
that ensured the input buffer was not copied entirely when padding was
added.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: ensure that coding chunks are page aligned
Loic Dachary [Wed, 8 Jan 2014 19:13:37 +0000 (20:13 +0100)]
erasure-code: ensure that coding chunks are page aligned

When coding chunks are allocated for jerasure, their address must be
aligned to page boundaries. The requirement is actually to be aligned on
a long long boundary but bufferlist do not allow for fine tuning of the
alignment.

If padding is necessary because the total size of the data to be encoded
is not a multiple of the alignment requirements as returned by
get_alignment(), the buffer is not only padded but also rebuilt using
rebuild_page_aligned() to preserve the page alignment that is expected
of the input buffer.

The overhead of rebuilding the whole input buffer when padding is
necessary could be reduced by only reallocating one buffer for the last
data chunk, therefore reducing the amount of data being copied. However,
this optimization is not going to be used if the caller takes care of
the padding, which is likely to be the case most of the time.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoEC-JERASURE: rewrite region-xor function using vector operations to get ~ x1.5 speedu... 1056/head
Andreas Peters [Wed, 18 Dec 2013 13:47:58 +0000 (14:47 +0100)]
EC-JERASURE: rewrite region-xor function using vector operations to get ~ x1.5 speedups for erasure code and guarantee proper 64-bit/128-bit buffer alignment

11 years agoMerge pull request #1055 from kri5/master
Loic Dachary [Wed, 8 Jan 2014 11:13:20 +0000 (03:13 -0800)]
Merge pull request #1055 from kri5/master

mailmap: Adds Christophe Courtaut

    git shortlog -nes

shows only one Christophe Courtaut proof that the .mailmap addition is working.

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Adds Christophe Courtaut 1055/head
Christophe Courtaut [Wed, 8 Jan 2014 10:46:24 +0000 (11:46 +0100)]
mailmap: Adds Christophe Courtaut

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoMerge pull request #1052 from dachary/wip-large-output-daemon-config
Kri5 [Wed, 8 Jan 2014 10:26:03 +0000 (02:26 -0800)]
Merge pull request #1052 from dachary/wip-large-output-daemon-config

common: fix large output in unittest_daemon_config

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoMerge pull request #1044 from ceph/port/onexit
Sage Weil [Wed, 8 Jan 2014 07:57:08 +0000 (23:57 -0800)]
Merge pull request #1044 from ceph/port/onexit

create on_exit replacement

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1050 from ceph/wip-7083
Josh Durgin [Tue, 7 Jan 2014 19:23:58 +0000 (11:23 -0800)]
Merge pull request #1050 from ceph/wip-7083

radosgw-admin: fix object policy read op

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoon_exit: remove side effects from asserts 1044/head
Noah Watkins [Tue, 7 Jan 2014 19:14:42 +0000 (11:14 -0800)]
on_exit: remove side effects from asserts

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agocommon: fix large output in unittest_daemon_config 1052/head
Loic Dachary [Tue, 7 Jan 2014 15:49:44 +0000 (16:49 +0100)]
common: fix large output in unittest_daemon_config

All tests in daemon_config use the global g_ceph_context
object. Introducing an expansion loop in it will impact all tests and
generate a very large output.

Remove the SubstitutionLoop test case which is also covered in
test/common/test_config.cc.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1043 from ceph/port/misc
Sage Weil [Tue, 7 Jan 2014 07:00:05 +0000 (23:00 -0800)]
Merge pull request #1043 from ceph/port/misc

misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1051 from kdreyer-inktank/automake-1.12
Sage Weil [Tue, 7 Jan 2014 06:29:03 +0000 (22:29 -0800)]
Merge pull request #1051 from kdreyer-inktank/automake-1.12

configure: support Automake 1.12

11 years agoMerge pull request #1046 from dachary/wip-7103
Sage Weil [Tue, 7 Jan 2014 05:30:18 +0000 (21:30 -0800)]
Merge pull request #1046 from dachary/wip-7103

common: recursive implementation of config::expand_meta …

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoconfigure: support Automake 1.12 1051/head
Jonathan Dieter [Tue, 7 Jan 2014 05:24:50 +0000 (22:24 -0700)]
configure: support Automake 1.12

Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
11 years agoMerge pull request #1047 from dachary/wip-duplicated-headers
Sage Weil [Tue, 7 Jan 2014 04:02:17 +0000 (20:02 -0800)]
Merge pull request #1047 from dachary/wip-duplicated-headers

autoconf: trim duplicated headers

11 years agoradosgw-admin: fix object policy read op 1050/head
Yehuda Sadeh [Mon, 6 Jan 2014 20:53:58 +0000 (12:53 -0800)]
radosgw-admin: fix object policy read op

Fixes: #7083
This was broken when we fixed #6940. We use the same function to both
read the bucket policy and the object policy. However, each needed to be
treated differently. Restore old behavior for objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocommon: unit tests for config::expand_meta 1046/head
Loic Dachary [Sun, 5 Jan 2014 14:49:57 +0000 (15:49 +0100)]
common: unit tests for config::expand_meta

Part of the config.cc tests are in test/confutils.cc but they do not
cover meta variable expansion. Create unittest_config for config.{h,cc}
specific tests.

The test_md_config_t is made a friend of md_config_t to allow testing
private and protected methods.

test/cli/ceph-conf/show-config-value.t is used to check that the human
readable message message shows as expected when there is an expansion
loop.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: recursive implementation of config::expand_meta
Loic Dachary [Sun, 5 Jan 2014 14:38:55 +0000 (15:38 +0100)]
common: recursive implementation of config::expand_meta

Using a recursive implementation of variable expansions make it easier
to protect against loops and provide human readable messages when they
happen.

It also enables one variable to be substituted multiple times in the
same configuration option instead of just once because it is confused
with a variable expansion loop.

http://tracker.ceph.com/issues/7103 fixes: #7103

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: cosmetic inversion of tests arguments
Loic Dachary [Sun, 5 Jan 2014 13:14:17 +0000 (14:14 +0100)]
common: cosmetic inversion of tests arguments

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: multiple variable occurence expansion test
Loic Dachary [Sat, 4 Jan 2014 10:03:18 +0000 (11:03 +0100)]
common: multiple variable occurence expansion test

http://tracker.ceph.com/issues/7103 refs #7103

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: only send messages to current OSDs 1045/head
Sage Weil [Sun, 5 Jan 2014 06:43:26 +0000 (22:43 -0800)]
mon: only send messages to current OSDs

When choosing a random OSD to send a message to, verify not only that
the OSD id is up but that the session is for the same instance of that OSD
by checking that the address matches.

Fixes: #7093
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: ignore OSDMap messages while we are initializing
Sage Weil [Sun, 5 Jan 2014 06:40:43 +0000 (22:40 -0800)]
osd: ignore OSDMap messages while we are initializing

The mon may occasionally send OSDMap messages to random OSDs, but is not
very descriminating in that we may not have authenticated yet.  Ignore any
messages if that is the case; we will reqeust whatever we need during the
BOOTING state.

Fixes: #7093
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: do not send peering messages during init
Sage Weil [Sun, 5 Jan 2014 06:39:35 +0000 (22:39 -0800)]
osd: do not send peering messages during init

Do not send any peering messages while we are still working our way
through init().

Fixes: #7093
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolog: use on exit manager to flush logs on exit
Noah Watkins [Sat, 4 Jan 2014 20:18:25 +0000 (12:18 -0800)]
log: use on exit manager to flush logs on exit

on_exit is not portable, and atexit doesn't allow parameters to be
passed to callbacks.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoonexit: add an on exit callback utility
Noah Watkins [Sat, 4 Jan 2014 19:32:51 +0000 (11:32 -0800)]
onexit: add an on exit callback utility

Adds a class that executes registered callbacks in its destructor. Since
static duration objects have their destructors called when returning
from main or calling exit then this can be used as a replacement for
on_exit.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: disable cross process sem tests on non-Linux 1043/head
Noah Watkins [Sun, 29 Sep 2013 19:19:00 +0000 (12:19 -0700)]
test: disable cross process sem tests on non-Linux

How to make this portable:

- MAP_ANONYMOUS -> MAP_ANON (OSX)

- sem_init (anonymous semaphore) needs to be replaced by named
semaphores using sem_open/sem_close. Use a memory address of the sem_t
variable to hack anonymous semaphore behavior.

- sem_getvalue isn't supported on OSX. it is used here to do
sem_wait/sem_post to bring a semaphore back to a specific value. to get
around this we may need to restructure the test so that the semaphore
can be destroyed and re-initialized rather than inspected as its
currently being done.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agopipe: handle missing MSG_MORE and MSG_NOSIGNAL
Noah Watkins [Mon, 22 Jul 2013 00:08:53 +0000 (17:08 -0700)]
pipe: handle missing MSG_MORE and MSG_NOSIGNAL

On OSX (and currently any platform missing the MSG_MORE
macro) the MSG_MORE optimization is disabled. The MSG_NOSIGNAL flag is
available on OSX but is called SO_NOSIGPIPE and must be set via
setsockopt.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoipaddr: use IN6_ARE_ADDR_EQUAL for comparison
Noah Watkins [Fri, 3 Jan 2014 17:48:03 +0000 (09:48 -0800)]
ipaddr: use IN6_ARE_ADDR_EQUAL for comparison

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agokeyutils: handle non-linux platform
Noah Watkins [Sat, 21 Sep 2013 19:50:28 +0000 (12:50 -0700)]
keyutils: handle non-linux platform

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #1038 from ceph/wip-objectcacher-backoff
Josh Durgin [Sat, 4 Jan 2014 00:58:28 +0000 (16:58 -0800)]
Merge pull request #1038 from ceph/wip-objectcacher-backoff

osdc/ObjectCacher: back off less during flush

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agodoc: Fixed typo.
John Wilkins [Sat, 4 Jan 2014 00:30:12 +0000 (16:30 -0800)]
doc: Fixed typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1041 from dachary/wip-mon-test
Sage Weil [Sat, 4 Jan 2014 00:05:39 +0000 (16:05 -0800)]
Merge pull request #1041 from dachary/wip-mon-test

mon: get rid of --keyring /dev/null hack

11 years agoMerge pull request #1042 from kdreyer-inktank/gitignore-autotools-test-logs
Sage Weil [Sat, 4 Jan 2014 00:05:24 +0000 (16:05 -0800)]
Merge pull request #1042 from kdreyer-inktank/gitignore-autotools-test-logs

add autotools-generated files to .gitignore

11 years agoadd autotools-generated files to .gitignore 1042/head
Ken Dreyer [Fri, 3 Jan 2014 23:38:25 +0000 (16:38 -0700)]
add autotools-generated files to .gitignore

When running "make check", Automake generates test-suite.log, along with
various *.log and *.trs files in the tree. Add these files to
.gitignore.

(It looks like this feature arrived in Automake 1.13.)

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
11 years agomon: get rid of --keyring /dev/null hack 1041/head
Loic Dachary [Fri, 3 Jan 2014 23:34:45 +0000 (00:34 +0100)]
mon: get rid of --keyring /dev/null hack

No longer necessary when --auth-supported=none

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1026 from dmsimard/ceph_rest_api_discovery
Dan Mick [Fri, 3 Jan 2014 23:00:49 +0000 (15:00 -0800)]
Merge pull request #1026 from dmsimard/ceph_rest_api_discovery

Be more explicit how to discover available API calls

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agodoc: Removed dash from --dmcrypt option.
John Wilkins [Fri, 3 Jan 2014 22:37:23 +0000 (14:37 -0800)]
doc: Removed dash from --dmcrypt option.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1040 from dachary/wip-ceph-disk-activate-data-dir
Sage Weil [Fri, 3 Jan 2014 22:00:57 +0000 (14:00 -0800)]
Merge pull request #1040 from dachary/wip-ceph-disk-activate-data-dir

ceph-disk: fix false positive for gitbuilder

11 years agoceph-disk: fix false positive for gitbuilder 1040/head
Loic Dachary [Fri, 3 Jan 2014 21:52:55 +0000 (22:52 +0100)]
ceph-disk: fix false positive for gitbuilder

The output of test/ceph-disk.sh is very verbose which is good for
debugging errors. However it sometime contains strings that match
/error:/i which is picked by gitbuilder as a sign that the test fail,
even when the exit code is zero.

Remove from the output the three strings triggering false positive in
gitbuilder.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosdc/ObjectCacher: back off less during flush 1038/head
Sage Weil [Fri, 3 Jan 2014 20:51:15 +0000 (12:51 -0800)]
osdc/ObjectCacher: back off less during flush

In cce990efc8f2a58c8d0fa11c234ddf2242b1b856 we added a limit to avoid
holding the lock for too long.  However, if we back off, we currently
wait for a full second, which is probably a bit much--we really just want
to give other threads a chance.

Backport: emperor
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1032 from dachary/wip-ceph-disk-activate-data-dir
Sage Weil [Fri, 3 Jan 2014 19:41:29 +0000 (11:41 -0800)]
Merge pull request #1032 from dachary/wip-ceph-disk-activate-data-dir

ceph-disk : fixes and improvements for the --data-dir code path and associated tests

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoBe more explicit how to discover available API calls 1026/head
David Moreau Simard [Fri, 3 Jan 2014 18:23:35 +0000 (13:23 -0500)]
Be more explicit how to discover available API calls

Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
11 years agoceph-disk: tests for the --data-dir code path 1032/head
Loic Dachary [Wed, 1 Jan 2014 21:22:34 +0000 (22:22 +0100)]
ceph-disk: tests for the --data-dir code path

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: implement --sysconfdir as /etc/ceph
Loic Dachary [Fri, 3 Jan 2014 15:06:55 +0000 (16:06 +0100)]
ceph-disk: implement --sysconfdir as /etc/ceph

Replace hardcoded /etc/ceph with the SYSCONFDIR global variable and
implement the --sysconfdir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: implement --statedir as /var/lib/ceph
Loic Dachary [Fri, 3 Jan 2014 15:03:09 +0000 (16:03 +0100)]
ceph-disk: implement --statedir as /var/lib/ceph

Replace hardcoded /var/lib/ceph with the STATEDIR global variable and
implement the --statedir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: add copyright notice
Loic Dachary [Wed, 1 Jan 2014 21:05:03 +0000 (22:05 +0100)]
ceph-disk: add copyright notice

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: create the data directory if it does not exist
Loic Dachary [Wed, 1 Jan 2014 21:11:30 +0000 (22:11 +0100)]
ceph-disk: create the data directory if it does not exist

Instead of failing if the OSD data directory does not exist, create
it. Only do so if the data directory is not enforced to be a device via
the use of the --data-dev flag. The directory is not recursively created.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: run ceph-osd when --mark-init=none
Loic Dachary [Mon, 30 Dec 2013 23:03:42 +0000 (00:03 +0100)]
ceph-disk: run ceph-osd when --mark-init=none

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: implement --mark-init=none
Loic Dachary [Mon, 30 Dec 2013 22:57:39 +0000 (23:57 +0100)]
ceph-disk: implement --mark-init=none

It is meant to be used when preparing and activating a directory that is
not to be used with init. No file is created to identify the init
system, no symbolic link is made to the directory in /var/lib/ceph
and the init scripts are not called.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: fsid is a known configuration option
Loic Dachary [Wed, 1 Jan 2014 21:07:57 +0000 (22:07 +0100)]
ceph-disk: fsid is a known configuration option

Use get_conf_with_default instead of get_conf because fsid is a known
ceph configuration option. It allows overriding via CEPH_ARGS which is
convenient for testing. Only options that are not found in config_opts.h
are fetch via get_conf.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: use CalledProcessError.returncode
Loic Dachary [Wed, 1 Jan 2014 21:06:29 +0000 (22:06 +0100)]
ceph-disk: use CalledProcessError.returncode

CalledProcessError has no errno data member

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: display the command output on OSD creation failure
Loic Dachary [Wed, 1 Jan 2014 21:13:15 +0000 (22:13 +0100)]
ceph-disk: display the command output on OSD creation failure

The string form of a CalledProcessError instance does not include the
output datamember. Add it to the Error exception for debug purposes.

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