Introduce file_mounts_sync_continuously cluster option (#9544)

* Separate out file_mounts contents hashing into its own separate hash

Add an option to continuously sync file_mounts from head node to worker nodes:
monitor.py will re-sync file mounts whenver contents change but will only run setup_commands if the config also changes

* add test and default value for file_mounts_sync_continuously

* format code

* Update comments

* Add param to skip setup commands when only file_mounts content changed during monitor.py's update tick

Fixed so setup commands run when ray up is run and file_mounts content changes

* Refactor so that runtime_hash retains previous behavior

runtime_hash is almost identical as before this PR. It is used to determine if setup_commands need to run
file_mounts_contents_hash is an additional hash of the file_mounts content that is used to detect when only file syncing has to occur.

Note: runtime_hash value will have changed from before the PR because we hash the hash of the contents of the file_mounts as a performance optimization

* fix issue with hashing a hash

* fix bug where trying to set contents hash when it wasn't generated

* Fix lint error

Fix bug in command_runner where check_output was no longer returning the output of the command

* clear out provider between tests to get rid of flakyness

* reduce chance of race condition from node_launcher launching a node in the middle of an autoscaler.update call
This commit is contained in:
Alan Guo
2020-07-28 00:02:08 -07:00
committed by GitHub
parent c290c308fe
commit 5831737287
13 changed files with 296 additions and 68 deletions
+2 -2
View File
@@ -403,9 +403,9 @@ class SSHCommandRunner(CommandRunnerInterface):
if cli_logger.verbosity > 0:
with cli_logger.indented():
start_process()
return start_process()
else:
start_process()
return start_process()
def run_rsync_up(self, source, target):
self._set_ssh_ip_if_required()