-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceph-volume: do not use --key during mkfs #19260
Conversation
Also, don't print the raw key to the log. Signed-off-by: Sage Weil <sage@redhat.com>
91c6527
to
b75f8b0
Compare
base_command.extend(['--key', keyring]) | ||
import tempfile | ||
temp = tempfile.NamedTemporaryFile() | ||
os.chmod(f.name, 0600) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is f here? are you meaning temp.name?
@@ -205,7 +205,12 @@ def osd_mkfs_bluestore(osd_id, fsid, keyring=None, wal=False, db=False): | |||
] | |||
|
|||
if keyring is not None: | |||
base_command.extend(['--key', keyring]) | |||
import tempfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imports at top?
b75f8b0
to
672083c
Compare
@liewegas can you push this to ceph-ci so that we can trigger our functional tests? |
@@ -221,7 +226,7 @@ def osd_mkfs_bluestore(osd_id, fsid, keyring=None, wal=False, db=False): | |||
|
|||
command = base_command + supplementary_command | |||
|
|||
process.run(command, obfuscate='--key') | |||
process.run(command, obfuscate='--keyfile') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the temp
file is never closed it will not be removed. Are we OK with the file being around? If we want to remove it we would need to check if temp
was created, and if so, then close it after process.run
here
We do not want the key to show up on the command line (it may appear in the process list or sudo log file). Fixes: http://tracker.ceph.com/issues/22283 Signed-off-by: Sage Weil <sage@redhat.com>
672083c
to
41973ee
Compare
updated! better?
|
jenkins test ceph-volume lvm xenial-bluestore-create |
jenkins test ceph-volume lvm centos7-bluestore-create |
@liewegas valid failures from the bluestore side of things:
From: |
http://tracker.ceph.com/issues/22283