* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>