Commit Graph

30586 Commits

Author SHA1 Message Date
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
Loic Dachary
43465d479f 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>
2014-01-01 17:03:44 -08:00
Loic Dachary
229740f422 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>
2014-01-01 21:23:55 +01:00
Loic Dachary
07f5399408 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>
2014-01-01 21:23:18 +01:00
Sage Weil
b729ed64fc 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>
2014-01-01 11:41:05 -08:00
Loic Dachary
40059e12af Merge pull request #1025 from pyKun/fix_typos
Fix typos in erasure code documents

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-01-01 07:18:40 -08:00
Loic Dachary
2b848a91d9 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>
2014-01-01 15:32:35 +01:00
Loic Dachary
7dfe550ce1 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>
2014-01-01 11:48:24 +01:00
Loic Dachary
4c8a313443 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>
2014-01-01 11:07:42 +01:00
Loic Dachary
ab6203f3f6 mon: fix indentation
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-01 11:07:42 +01:00
Loic Dachary
e946df139e 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>
2014-01-01 11:07:42 +01:00
Gary Lowell
fe3fd5fb4a Merge branch 'next' 2014-01-01 07:53:37 +00:00
Sage Weil
cae663af40 osd/ReplicatedPG: improve debug output from check_local
This will help with #6685

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-31 17:21:49 -08:00
Loic Dachary
ac15f1ad25 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>
2013-12-31 17:12:39 -08:00
Josh Durgin
ac547a5b7d 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>
2013-12-31 17:02:28 -08:00
Josh Durgin
e91fb91065 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>
2013-12-31 16:26:07 -08:00
Josh Durgin
7d27793f4f Merge pull request #1022 from ceph/wip-listomapvals
fix rados listomapvals for >512 keys

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-31 12:21:51 -08:00
Sage Weil
e1d20d1495 Merge pull request #1009 from dachary/wip-mon-idempotent
make ceph-mon --mkfs idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-31 11:32:32 -08:00
Loic Dachary
eeba294f03 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>
2013-12-31 18:58:25 +01:00
Loic Dachary
1eafe8dc45 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>
2013-12-31 18:58:25 +01:00
Loic Dachary
f0ae4abd0d 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>
2013-12-31 18:58:25 +01:00
Sage Weil
d77101ccf8 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>
2013-12-31 08:18:15 -08:00
Sage Weil
49a96d13f0 Merge pull request #1024 from jdurgin/wip-7067
osd_types: add missing osd op flags

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-31 08:17:14 -08:00
Loic Dachary
d443841094 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>
2013-12-31 13:47:44 +01:00
Loic Dachary
403f777b24 mon: fix indentation
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-31 13:46:38 +01:00
Loic Dachary
a1945135ac mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-31 13:46:38 +01:00
Loic Dachary
10aa220a55 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>
2013-12-31 13:46:38 +01:00
Kun Huang
e0bae95240 Fix typos in erasure code documents
Signed-off-by: Kun Huang <academicgareth@gmail.com>
2013-12-31 06:17:52 -05:00
Sage Weil
34e50364f4 Merge pull request #1023 from ceph/port/misc
misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-30 21:04:45 -08:00
Josh Durgin
2b0a435920 osd_types: add missing osd op flags
These were accidentally removed in:
85282319ee

Fixes: #7067
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 20:34:24 -08:00
Xihui He
f8e413f9c7 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
2013-12-31 10:57:57 +08:00
Josh Durgin
ece8b7702c Merge pull request #1006 from yuyuyu101/wip-7066
Fix rbd bench-write improper behavior

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 14:52:40 -08:00
Josh Durgin
8fcfc9114f qa: test rados listomapvals with >512 keys
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-30 13:36:37 -08:00
Bjørnar Ness
be5afa2e66 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>
2013-12-30 13:36:31 -08:00
Gary Lowell
c165483bc7 v0.74 2013-12-30 21:03:17 +00:00
Noah Watkins
b4fc16c70e 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>
2013-12-30 12:58:37 -08:00
Noah Watkins
9d41fd2c85 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>
2013-12-30 12:58:37 -08:00
Noah Watkins
fdd85625c7 test_cls_rbd: avoid shift overflow
warning: signed shift result (0x500000000) requires 36 bits to represent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
ce8b26e89d erasure: add dummy symbol to avoid warnings
Empty object files generate warning.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Noah Watkins
5b77533404 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>
2013-12-30 12:58:37 -08:00
Noah Watkins
8c8be16df7 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>
2013-12-30 12:58:37 -08:00
Noah Watkins
da5a082ec5 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>
2013-12-30 12:58:37 -08:00
Noah Watkins
f7a66d6bbe 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>
2013-12-30 12:58:37 -08:00
Rutger ter Borg
87db89ea8f 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>
2013-12-30 11:10:26 -08:00