mirror of
https://github.com/wassname/ray.git
synced 2026-07-28 11:25:04 +08:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user