From 965e6884a6048efbc041663db1336759264ce170 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 23 Aug 2024 13:33:31 -0700 Subject: [PATCH] fix Signed-off-by: Sayali Gaikawad --- src/validation_workflow/tar/validation_tar.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/validation_workflow/tar/validation_tar.py b/src/validation_workflow/tar/validation_tar.py index 069151c071..54bbfa501d 100644 --- a/src/validation_workflow/tar/validation_tar.py +++ b/src/validation_workflow/tar/validation_tar.py @@ -37,7 +37,7 @@ def installation(self) -> bool: def start_cluster(self) -> bool: try: - self.os_process.start(f'export OPENSEARCH_INITIAL_ADMIN_PASSWORD={get_password(str(self.args.version))} && ./opensearch-tar-install.sh', os.path.join(self.tmp_dir.path, "opensearch")) + self.os_process.start(f'export OPENSEARCH_INITIAL_ADMIN_PASSWORD={get_password(str(self.args.version))} && ./opensearch-tar-install.sh >> install.log', os.path.join(self.tmp_dir.path, "opensearch")) if ("opensearch-dashboards" in self.args.projects): self.osd_process.start(os.path.join(str(self.tmp_dir.path), "opensearch-dashboards", "bin", "opensearch-dashboards"), ".") logging.info('Started cluster') @@ -53,10 +53,12 @@ def validation(self) -> bool: logging.info(f'All tests Pass : {counter}') return True else: - shutil.copy(os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), os.path.join('/tmp', 'opensearch.log')) + execute('cat ' + os.path.join(self.tmp_dir.path, 'opensearch', 'install.log'), ".") + # shutil.copy(os.path.join(self.tmp_dir.path, 'opensearch', 'install.log'), os.path.join('/tmp', 'opensearch.log')) self.cleanup() raise Exception(f'Not all tests Pass : {counter}') else: + execute('cat ' + os.path.join(self.tmp_dir.path, 'opensearch', 'install.log'), ".") shutil.copy(os.path.join(self.tmp_dir.path, 'opensearch', 'logs', 'opensearch.log'), os.path.join('/tmp', 'opensearch.log')) self.cleanup() raise Exception("Cluster is not ready for API test")