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