You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/09/06 08:39:32 UTC
[incubator-dlab] branch DLAB-terraform updated: fixed issue with
EMR cluster;
This is an automated email from the ASF dual-hosted git repository.
omartushevskyi pushed a commit to branch DLAB-terraform
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-terraform by this push:
new 4bce5ea fixed issue with EMR cluster;
4bce5ea is described below
commit 4bce5ea2351337e72bf5a3445918af061206546e
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Fri Sep 6 11:39:23 2019 +0300
fixed issue with EMR cluster;
---
.../src/general/lib/aws/meta_lib.py | 2 +-
.../general/scripts/aws/dataengine-service_prepare.py | 16 ++++++++++------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/aws/meta_lib.py b/infrastructure-provisioning/src/general/lib/aws/meta_lib.py
index 54786bc..c852ffc 100644
--- a/infrastructure-provisioning/src/general/lib/aws/meta_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/meta_lib.py
@@ -682,7 +682,7 @@ def emr_waiter(tag_name, tag_value):
with hide('stderr', 'running', 'warnings'):
local("echo 'Some EMR cluster is still being created/terminated, waiting..'")
time.sleep(60)
- emr_waiter(tag_name)
+ emr_waiter(tag_name, tag_value)
else:
return True
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py
index dca132f..b6bb8bd 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py
@@ -125,6 +125,14 @@ if __name__ == "__main__":
.format(emr_conf['service_base_name'], os.environ['project_name'])
emr_conf['vpc_id'] = os.environ['aws_vpc_id']
emr_conf['vpc2_id'] = os.environ['aws_notebook_vpc_id']
+ emr_conf['provision_instance_ip'] = None
+ try:
+ emr_conf['provision_instance_ip'] = get_instance_ip_address(
+ emr_conf['tag_name'], '{0}-{1}-endpoint'.format(emr_conf['service_base_name'],
+ os.environ['endpoint_name'])).get('Private') + "/32"
+ except:
+ emr_conf['provision_instance_ip'] = get_instance_ip_address(emr_conf['tag_name'], '{0}-ssn'.format(
+ emr_conf['service_base_name'])).get('Private') + "/32"
if os.environ['emr_slave_instance_spot'] == 'True':
ondemand_price = float(get_ec2_price(emr_conf['slave_instance_type'], emr_conf['region']))
emr_conf['slave_bid_price'] = (ondemand_price * int(os.environ['emr_slave_instance_spot_pct_price'])) / 100
@@ -179,9 +187,7 @@ if __name__ == "__main__":
},
{
"IpProtocol": "-1",
- "IpRanges": [{"CidrIp": get_instance_ip_address(
- emr_conf['tag_name'], '{0}-{1}-endpoint'.format(
- emr_conf['service_base_name'], os.environ['endpoint_name'])).get('Private') + "/32"}],
+ "IpRanges": [{"CidrIp": emr_conf['provision_instance_ip']}],
"UserIdGroupPairs": [],
"PrefixListIds": []
}
@@ -195,9 +201,7 @@ if __name__ == "__main__":
},
{
"IpProtocol": "-1",
- "IpRanges": [{"CidrIp": get_instance_ip_address(
- emr_conf['tag_name'], '{0}-{1}-endpoint'.format(
- emr_conf['service_base_name'], os.environ['endpoint_name'])).get('Private') + "/32"}],
+ "IpRanges": [{"CidrIp": emr_conf['provision_instance_ip']}],
"UserIdGroupPairs": [],
"PrefixListIds": [],
},
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org