Skip to content

Commit

Permalink
ceph-disk: Use stdin for 'config-key put' command
Browse files Browse the repository at this point in the history
The 'osd new' command is not available in jewel so backport support for
stdin '-i -' and use it for the 'config-key put' command in order to
not log the dmcrypt key.

Fixes: http://tracker.ceph.com/issues/21059

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
  • Loading branch information
badone committed Aug 22, 2017
1 parent 28cfb01 commit 1415ecb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ceph-disk/ceph_disk/main.py
Expand Up @@ -2362,17 +2362,18 @@ def create_key(self):
cluster = self.args.cluster
bootstrap = self.args.prepare_key_template.format(cluster=cluster,
statedir=STATEDIR)
command_check_call(
command_with_stdin(
[
'ceph',
'--cluster', cluster,
'--name', 'client.bootstrap-osd',
'--keyring', bootstrap,
'-i', '-',
'config-key',
'put',
'dm-crypt/osd/' + self.args.osd_uuid + '/luks',
base64_key,
],
base64_key
)
keyring, stderr, ret = command(
[
Expand Down

0 comments on commit 1415ecb

Please sign in to comment.