]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/ceph_manager: preserve newline char at EOF in keyring 50876/head
authorRishabh Dave <ridave@redhat.com>
Thu, 30 Mar 2023 19:35:32 +0000 (01:05 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 11 Apr 2023 10:39:21 +0000 (16:09 +0530)
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>
qa/tasks/ceph_manager.py
qa/tasks/cephfs/xfstests_dev.py

index 8db8bda6086df45e5fff40b7faa3f63073f98a59..9a706a25e32f4a3ac52478e4b37ec4f9400521ec 100644 (file)
@@ -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
index 566b2ec3f0a9371fe9290fd28fd5027a8a385045..f4b0adf8ebc10083dc3e03f4fed10cbae010df86 100644 (file)
@@ -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}')