[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
+5 -8
View File
@@ -602,13 +602,11 @@ class Node:
def start_log_monitor(self):
"""Start the log monitor."""
stdout_file, stderr_file = self.get_log_file_handles(
"log_monitor", unique=True)
process_info = ray._private.services.start_log_monitor(
self.redis_address,
self._logs_dir,
stdout_file=stdout_file,
stderr_file=stderr_file,
stdout_file=subprocess.DEVNULL,
stderr_file=subprocess.DEVNULL,
redis_password=self._ray_params.redis_password,
fate_share=self.kernel_fate_share)
assert ray_constants.PROCESS_TYPE_LOG_MONITOR not in self.all_processes
@@ -742,12 +740,11 @@ class Node:
def start_monitor(self):
"""Start the monitor."""
stdout_file, stderr_file = self.get_log_file_handles(
"monitor", unique=True)
process_info = ray._private.services.start_monitor(
self._redis_address,
stdout_file=stdout_file,
stderr_file=stderr_file,
self._logs_dir,
stdout_file=subprocess.DEVNULL,
stderr_file=subprocess.DEVNULL,
autoscaling_config=self._ray_params.autoscaling_config,
redis_password=self._ray_params.redis_password,
fate_share=self.kernel_fate_share)