mirror of
https://github.com/ceph/ceph
synced 2025-01-29 06:24:03 +00:00
qa/ceph_manager: preserve newline char at EOF in keyring
Lack of newline character at the end of keyring file makes CephFS mount command end with error. Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit is contained in:
parent
ef6b9ae3c7
commit
1944977522
@ -1607,8 +1607,7 @@ class CephManager:
|
||||
client_id = client_id.replace('client.', '')
|
||||
|
||||
keyring = self.run_cluster_cmd(args=f'auth get client.{client_id}',
|
||||
stdout=StringIO()).\
|
||||
stdout.getvalue().strip()
|
||||
stdout=StringIO()).stdout.getvalue()
|
||||
|
||||
assert isinstance(keyring, str) and keyring != ''
|
||||
return keyring
|
||||
|
@ -287,7 +287,7 @@ class XFSTestsDev(CephFSTestCase):
|
||||
ceph_fuse_bin_path = join(os_getcwd(), 'bin', 'ceph-fuse')
|
||||
|
||||
keyring_path = self.mount_a.client_remote.mktemp(
|
||||
data=self.fs.mon_manager.get_keyring('client.admin')+'\n')
|
||||
data=self.fs.mon_manager.get_keyring('client.admin'))
|
||||
|
||||
lastline = (f'export CEPHFS_MOUNT_OPTIONS="-m {mon_sock} -k '
|
||||
f'{keyring_path} --client_mountpoint /{self.test_dirname}')
|
||||
|
Loading…
Reference in New Issue
Block a user