[Logging] Log rotation on all components (#12101)

* In Progress.

* Done.

* Fix the issue.

* Add wait for condition because logs are not written right away now.

* debug string.

* lint.

* Fix flaky test.

* Fix issues.

* Fix test.

* lint.
This commit is contained in:
SangBin Cho
2020-11-30 19:03:55 -08:00
committed by GitHub
parent 2708b3abbc
commit 8223a33bff
10 changed files with 162 additions and 56 deletions
+3
View File
@@ -1784,6 +1784,7 @@ def start_worker(node_ip_address,
def start_monitor(redis_address,
logs_dir,
stdout_file=None,
stderr_file=None,
autoscaling_config=None,
@@ -1793,6 +1794,7 @@ def start_monitor(redis_address,
Args:
redis_address (str): The address that the Redis server is listening on.
logs_dir(str): The path to the log directory.
stdout_file: A file handle opened for writing to redirect stdout to. If
no redirection should happen, then this should be None.
stderr_file: A file handle opened for writing to redirect stderr to. If
@@ -1808,6 +1810,7 @@ def start_monitor(redis_address,
sys.executable,
"-u",
monitor_path,
f"--logs-dir={logs_dir}",
"--redis-address=" + str(redis_address),
]
if autoscaling_config: