Commit Graph

30632 Commits

Author SHA1 Message Date
Loic Dachary
94854090fb 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>
2014-01-05 16:11:43 +01:00
Loic Dachary
87db534cea common: cosmetic inversion of tests arguments
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-05 16:11:43 +01:00
Loic Dachary
5bb1545eed common: multiple variable occurence expansion test
http://tracker.ceph.com/issues/7103 refs #7103

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-05 16:11:43 +01:00
Josh Durgin
6663a5eee3 Merge pull request #1038 from ceph/wip-objectcacher-backoff
osdc/ObjectCacher: back off less during flush

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-01-03 16:58:28 -08:00
John Wilkins
ab2b2bb0fd doc: Fixed typo.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-01-03 16:30:12 -08:00
Sage Weil
a231f22032 Merge pull request #1041 from dachary/wip-mon-test
mon: get rid of --keyring /dev/null hack
2014-01-03 16:05:39 -08:00
Sage Weil
81d71f9df2 Merge pull request #1042 from kdreyer-inktank/gitignore-autotools-test-logs
add autotools-generated files to .gitignore
2014-01-03 16:05:24 -08:00
Ken Dreyer
bb8b7503b0 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>
2014-01-03 16:47:23 -07:00
Loic Dachary
f2e33e8129 mon: get rid of --keyring /dev/null hack
No longer necessary when --auth-supported=none

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-04 00:34:45 +01:00
Dan Mick
3a42d4116d 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>
2014-01-03 15:00:49 -08:00
John Wilkins
d110c913c1 doc: Removed dash from --dmcrypt option.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-01-03 14:37:23 -08:00
Sage Weil
5de7e5622e Merge pull request #1040 from dachary/wip-ceph-disk-activate-data-dir
ceph-disk: fix false positive for gitbuilder
2014-01-03 14:00:57 -08:00
Loic Dachary
c772b6d148 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>
2014-01-03 22:52:55 +01:00
Sage Weil
e2ee52879e osdc/ObjectCacher: back off less during flush
In cce990efc8 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>
2014-01-03 12:51:15 -08:00
Sage Weil
312107876c 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>
2014-01-03 11:41:29 -08:00
David Moreau Simard
daefe8159f Be more explicit how to discover available API calls
Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
2014-01-03 13:23:35 -05:00
Loic Dachary
de8522fa6c ceph-disk: tests for the --data-dir code path
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:33:52 +01:00
Loic Dachary
a71025d336 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>
2014-01-03 16:30:41 +01:00
Loic Dachary
ca713f48ae 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>
2014-01-03 16:30:41 +01:00
Loic Dachary
51ee3c0477 ceph-disk: add copyright notice
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:41 +01:00
Loic Dachary
306b099ab0 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>
2014-01-03 16:30:41 +01:00
Loic Dachary
0fcc081858 ceph-disk: run ceph-osd when --mark-init=none
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Loic Dachary
e773b68f4c 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>
2014-01-03 16:30:40 +01:00
Loic Dachary
b65eb377f5 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>
2014-01-03 16:30:40 +01:00
Loic Dachary
97f516a1dd ceph-disk: use CalledProcessError.returncode
CalledProcessError has no errno data member

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Loic Dachary
d09af0fa50 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>
2014-01-03 16:30:40 +01:00
Loic Dachary
2b935bbf60 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>
2014-01-03 16:30:40 +01:00
Loic Dachary
ad6b4b4b08 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>
2014-01-03 16:30:40 +01:00
Loic Dachary
908348b804 ceph-disk: make exception handling terse in main_activate_journal
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Loic Dachary
55ca7bb2da ceph-disk: do not hide main_activate() exceptions
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Loic Dachary
324804a81c ceph-disk: fix activate() indent
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Loic Dachary
de0050596b ceph-disk: remove noop try:
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Loic Dachary
b82ccfbfa7 ceph-disk: fix Error() messages formatting
Mainly using % instead of ,

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-03 16:30:40 +01:00
Sage Weil
6b8d4188db 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>
2014-01-02 16:52:14 -08:00
Sage Weil
806c0cb3b2 Merge pull request #1012 from dachary/wip-mon-mkfs
unit tests for ceph-mon --mkfs
2014-01-02 14:09:51 -08:00
Sage Weil
53a4a88f95 Merge pull request #1029 from ceph/wip-6914
Wip 6914

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-02 14:07:55 -08:00
Sage Weil
1f47a5b12e Merge pull request #1035 from ceph/port/bitsandints
endianess and integer types

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-02 13:52:40 -08:00
Sage Weil
4843f89e40 Merge pull request #1036 from dachary/wip-7085
ceph-disk: cannot run unit tests
2014-01-02 13:49:19 -08:00
Loic Dachary
2ba6930d62 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>
2014-01-02 22:45:28 +01:00
Sage Weil
24417f9999 test/cli-integration/rbd: silence stderr
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-02 13:35:18 -08:00
Noah Watkins
8220549315 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>
2014-01-02 11:03:48 -08:00
Noah Watkins
8f91cace8f 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>
2014-01-02 11:03:39 -08:00
Sage Weil
46a5674b14 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>
2014-01-02 08:36:47 -08:00
Loic Dachary
f6bbcf4367 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>
2014-01-02 10:21:32 +01:00
Sage Weil
40018fcc84 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>
2014-01-01 18:48:33 -08:00
Sage Weil
4fe0b1bbe7 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>
2014-01-01 18:47:57 -08:00
Sage Weil
e74ab284c6 Merge pull request #1031 from dachary/wip-parse-args
CEPH_ARGS should trim whitespaces

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-01 18:04:31 -08:00
Sage Weil
af27f07086 Merge pull request #1030 from dachary/wip-crush-location
osdc: = is not a delimiter in --crush-location

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-01 18:03:13 -08:00
Sage Weil
906f973e26 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>
2014-01-01 18:00:43 -08:00
Sage Weil
41987db876 doc/release-notes: v0.74
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-01 17:58:30 -08:00