diff options
author | gvit <gvit@ydb.tech> | 2023-10-25 08:36:55 +0300 |
---|---|---|
committer | gvit <gvit@ydb.tech> | 2023-10-25 09:07:38 +0300 |
commit | 01216eb22028efa53b8d26d3c9a84be78cef40ba (patch) | |
tree | 31b660f83d29024cdeed006309c0f1e3d7ad556c | |
parent | 9dd46bd6e77688a6e4aefd95c214901c7e26cd40 (diff) | |
download | ydb-01216eb22028efa53b8d26d3c9a84be78cef40ba.tar.gz |
improve debugging abilities of recipe KIKIMR-19752
-rw-r--r-- | ydb/public/tools/lib/cmds/__init__.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ydb/public/tools/lib/cmds/__init__.py b/ydb/public/tools/lib/cmds/__init__.py index 7f7d768347..81289eb069 100644 --- a/ydb/public/tools/lib/cmds/__init__.py +++ b/ydb/public/tools/lib/cmds/__init__.py @@ -7,6 +7,7 @@ import json import random import string import typing # noqa: F401 +import sys from ydb.tests.library.common import yatest_common from ydb.tests.library.harness.kikimr_cluster import kikimr_cluster_factory @@ -377,7 +378,12 @@ def _stop_instances(arguments): recipe = Recipe(arguments) if not os.path.exists(recipe.metafile_path()): return - info = recipe.read_metafile() + try: + info = recipe.read_metafile() + except Exception: + sys.stderr.write("Metafile not found for ydb recipe ...") + return + for node_id, node_meta in info['nodes'].items(): pid = node_meta['pid'] try: @@ -385,6 +391,13 @@ def _stop_instances(arguments): except OSError: pass + try: + with open(node_meta['stderr_file'], "r") as r: + sys.stderr.write(r.read()) + + except Exception as e: + sys.stderr.write(str(e)) + def cleanup_working_dir(arguments): if arguments.ydb_working_dir: |