]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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 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>
11 years agoceph-disk: which() uses PATH first
Loic Dachary [Mon, 30 Dec 2013 22:07:27 +0000 (23:07 +0100)]
ceph-disk: which() uses PATH first

Instead of relying on a hardcoded set of if paths. Although this has the
potential of changing the location of the binary being used by ceph-disk
on an existing installation, it is currently only used for sgdisk. It
could be disruptive for someone using a modified version of sgdisk but
the odds of this happening are very low.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: add --prepend-to-path to control execution
Loic Dachary [Mon, 30 Dec 2013 21:48:46 +0000 (22:48 +0100)]
ceph-disk: add --prepend-to-path to control execution

/usr/bin is hardcoded in front of some ceph programs which makes it
impossible to control where they are located via the PATH.

The hardcoded path cannot be removed altogether because it will most
likely lead to unexpected and difficult to diagnose problems for
existing installations where the PATH finds the program elsewhere.

The --prepend-to-path flag is added and defaults to /usr/bin : it prepends
to the PATH environment variable. The hardcoded path is removed
and the PATH will be used: since /usr/bin is searched first, the
legacy behavior will not change.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: make exception handling terse in main_activate_journal
Loic Dachary [Mon, 30 Dec 2013 16:15:29 +0000 (17:15 +0100)]
ceph-disk: make exception handling terse in main_activate_journal

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: do not hide main_activate() exceptions
Loic Dachary [Mon, 30 Dec 2013 16:13:47 +0000 (17:13 +0100)]
ceph-disk: do not hide main_activate() exceptions

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: fix activate() indent
Loic Dachary [Mon, 30 Dec 2013 16:11:30 +0000 (17:11 +0100)]
ceph-disk: fix activate() indent

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: remove noop try:
Loic Dachary [Mon, 30 Dec 2013 16:09:35 +0000 (17:09 +0100)]
ceph-disk: remove noop try:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: fix Error() messages formatting
Loic Dachary [Mon, 30 Dec 2013 15:57:36 +0000 (16:57 +0100)]
ceph-disk: fix Error() messages formatting

Mainly using % instead of ,

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoinit-ceph: pass config file path when adjust crush position
Sage Weil [Mon, 21 Oct 2013 16:53:14 +0000 (09:53 -0700)]
init-ceph: pass config file path when adjust crush position

Fixes: #6591
Reported-by: Sean Noonan <sean.noonan@twosigma.com>
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1012 from dachary/wip-mon-mkfs
Sage Weil [Thu, 2 Jan 2014 22:09:51 +0000 (14:09 -0800)]
Merge pull request #1012 from dachary/wip-mon-mkfs

unit tests for ceph-mon --mkfs

11 years agoMerge pull request #1029 from ceph/wip-6914
Sage Weil [Thu, 2 Jan 2014 22:07:55 +0000 (14:07 -0800)]
Merge pull request #1029 from ceph/wip-6914

Wip 6914

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1035 from ceph/port/bitsandints
Sage Weil [Thu, 2 Jan 2014 21:52:40 +0000 (13:52 -0800)]
Merge pull request #1035 from ceph/port/bitsandints

endianess and integer types

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1036 from dachary/wip-7085
Sage Weil [Thu, 2 Jan 2014 21:49:19 +0000 (13:49 -0800)]
Merge pull request #1036 from dachary/wip-7085

ceph-disk: cannot run unit tests

11 years agoceph-disk: cannot run unit tests 1036/head
Loic Dachary [Thu, 2 Jan 2014 21:42:17 +0000 (22:42 +0100)]
ceph-disk: cannot run unit tests

Because ceph-disk relies on hardcoded paths. The corresponding test will
be added back when ceph-disk can run from sources.

Fixes: #7085
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agotest/cli-integration/rbd: silence stderr
Sage Weil [Thu, 2 Jan 2014 21:35:18 +0000 (13:35 -0800)]
test/cli-integration/rbd: silence stderr

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agointtypes: detect and define missing integer types 1035/head
Noah Watkins [Sun, 21 Jul 2013 01:41:40 +0000 (18:41 -0700)]
inttypes: detect and define missing integer types

Working around missing integer types is pretty easy. For example, the
__u32 family are Linux-specific types, and using these in Ceph
internally is fine because we can typedef them.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoendian: check byte order on OSX
Noah Watkins [Thu, 2 Jan 2014 18:45:41 +0000 (10:45 -0800)]
endian: check byte order on OSX

Defines CEPH_[BIG|LITTLE]_ENDIAN to use, as BYTE_ORDER etc macros may be
different names on different platforms.

Signed-off-by: Noah Watkins <noahwatkins@gmail.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 agomon: tests for ceph-mon --mkfs 1012/head
Loic Dachary [Sun, 29 Dec 2013 12:21:02 +0000 (13:21 +0100)]
mon: tests for ceph-mon --mkfs

* auth none must not require a keyring
* --key can be used as an alternative to --keyring
* --mkfs is idempotent
* the --mon-data directory is created if it does not exist
* auth ceph requires --keyring

Signed-off-by: Loic Dachary <loic@dachary.org>
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 agomds: don't allow changing layout for non-regular file 1029/head
Yan, Zheng [Wed, 1 Jan 2014 01:51:41 +0000 (09:51 +0800)]
mds: don't allow changing layout for non-regular file

layout is meaningless for non-regular file. using non-default layout
may make backtrace less efficiency.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: always store backtrace xattr in the default pool
Yan, Zheng [Wed, 1 Jan 2014 00:58:42 +0000 (08:58 +0800)]
mds: always store backtrace xattr in the default pool

when creating file in non-default pool, we need to store a backtrace
in the default pool in addition to the specified pool. Otherwise the
'lookup-by-ino' function will consider backtrace for file is missing.

Fixes: #6914
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
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 agoBe more explicit how to discover available API calls
David Moreau Simard [Tue, 31 Dec 2013 21:48:55 +0000 (16:48 -0500)]
Be more explicit how to discover available API calls

I believe it cannot hurt to be slightly more explicit about how
to retrieve API calls and provide examples.

Signed-off-by: David Moreau Simard <dmsimard@iweb.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>