]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/config: intercept "keyfile", translate into "key"
authorSage Weil <sage@redhat.com>
Wed, 28 Feb 2018 21:59:25 +0000 (15:59 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:50 +0000 (14:44 -0600)
commit91e8da14312b62f07d68b3aebca3bfb00a9cfc6e
tree9b94b2029990f5bb04805096f5ab7eede852480f
parent9aeced33eeb2fe2ce94b9295e073469170bd675a
common/config: intercept "keyfile", translate into "key"

The keyfile arg might be - (stdin), which we can only read once.  Ensure
that we consume it once by intercepting the CLI value early and inserting
the value into the 'key' option.

This robs future code of the knowledge that the key came from --keyfile
and not --key, but avoids the issue of multiple users (notably, KeyRing.cc
and the OSD mkfs code).

Remove the - special case from OSD at the same time, since it can no
longer be reached (unless something other than the CLI specified '-', but
neither ceph.conf nor the mon config make sense here).

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config.cc
src/osd/OSD.cc
src/test/daemon_config.cc
src/test/libcephfs_config.cc
src/test/librados/librados_config.cc