From 19449775228d79583467f31e0398a6424ac6b787 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Fri, 31 Mar 2023 01:05:32 +0530 Subject: [PATCH] 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 --- qa/tasks/ceph_manager.py | 3 +-- qa/tasks/cephfs/xfstests_dev.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 8db8bda6086d..9a706a25e32f 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -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 diff --git a/qa/tasks/cephfs/xfstests_dev.py b/qa/tasks/cephfs/xfstests_dev.py index 566b2ec3f0a9..f4b0adf8ebc1 100644 --- a/qa/tasks/cephfs/xfstests_dev.py +++ b/qa/tasks/cephfs/xfstests_dev.py @@ -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}') -- 2.47.3