mirror of
https://github.com/wassname/ray.git
synced 2026-08-08 11:25:28 +08:00
[AWS] Fill-in AMI if not provided (#13808)
* fill in default ami if not provided * lint fix * quick test * Update python/ray/tests/aws/test_autoscaler_aws.py * Update python/ray/tests/aws/test_autoscaler_aws.py * fix test * fix tests * fix lint * remove bad test Co-authored-by: Ameer Haj Ali <ameerh@berkeley.edu>
This commit is contained in:
co-authored by
Ameer Haj Ali
parent
55566bc797
commit
1ee5d5faff
@@ -496,11 +496,13 @@ def _check_ami(config):
|
||||
# If we do not provide a default AMI for the given region, noop.
|
||||
return
|
||||
|
||||
if config["head_node"].get("ImageId", "").lower() == "latest_dlami":
|
||||
head_ami = config["head_node"].get("ImageId", "").lower()
|
||||
if head_ami in ["", "latest_dlami"]:
|
||||
config["head_node"]["ImageId"] = default_ami
|
||||
_set_config_info(head_ami_src="dlami")
|
||||
|
||||
if config["worker_nodes"].get("ImageId", "").lower() == "latest_dlami":
|
||||
worker_ami = config["worker_nodes"].get("ImageId", "").lower()
|
||||
if worker_ami in ["", "latest_dlami"]:
|
||||
config["worker_nodes"]["ImageId"] = default_ami
|
||||
_set_config_info(workers_ami_src="dlami")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user