From: Rishabh Dave Date: Thu, 30 Mar 2023 19:35:32 +0000 (+0530) Subject: qa/ceph_manager: preserve newline char at EOF in keyring X-Git-Tag: v19.0.0~1133^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19449775228d79583467f31e0398a6424ac6b787;p=ceph.git 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 --- diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 8db8bda6086..9a706a25e32 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 566b2ec3f0a..f4b0adf8ebc 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}')