[autoscaling] increase connect timeout, boto retries, and check subnet conf (#1422)

* some autoscaling config tweaks

* Sun Jan 14 13:56:55 PST 2018

* Mon Jan 15 14:21:09 PST 2018

* increase backoff

* Mon Jan 15 14:40:47 PST 2018

* check boto version
This commit is contained in:
Eric Liang
2018-01-16 16:11:09 -08:00
committed by GitHub
parent eac11c252c
commit b8811cbe34
5 changed files with 41 additions and 16 deletions
+5 -1
View File
@@ -3,15 +3,19 @@ from __future__ import division
from __future__ import print_function
import boto3
from botocore.config import Config
from ray.autoscaler.node_provider import NodeProvider
from ray.autoscaler.tags import TAG_RAY_CLUSTER_NAME
from ray.ray_constants import BOTO_MAX_RETRIES
class AWSNodeProvider(NodeProvider):
def __init__(self, provider_config, cluster_name):
NodeProvider.__init__(self, provider_config, cluster_name)
self.ec2 = boto3.resource("ec2", region_name=provider_config["region"])
config = Config(retries=dict(max_attempts=BOTO_MAX_RETRIES))
self.ec2 = boto3.resource(
"ec2", region_name=provider_config["region"], config=config)
# Cache of node objects from the last nodes() call. This avoids
# excessive DescribeInstances requests.