Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
594eed31
Commit
594eed31
authored
12 years ago
by
Josh Rosen
Browse files
Options
Downloads
Patches
Plain Diff
Fix check for existing instances during EC2 launch.
parent
590e4aa9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ec2/spark_ec2.py
+6
-10
6 additions, 10 deletions
ec2/spark_ec2.py
with
6 additions
and
10 deletions
ec2/spark_ec2.py
+
6
−
10
View file @
594eed31
...
@@ -180,16 +180,12 @@ def launch_cluster(conn, opts, cluster_name):
...
@@ -180,16 +180,12 @@ def launch_cluster(conn, opts, cluster_name):
zoo_group
.
authorize
(
'
tcp
'
,
3888
,
3888
,
'
0.0.0.0/0
'
)
zoo_group
.
authorize
(
'
tcp
'
,
3888
,
3888
,
'
0.0.0.0/0
'
)
# Check if instances are already running in our groups
# Check if instances are already running in our groups
print
"
Checking for running cluster...
"
active_nodes
=
get_existing_cluster
(
conn
,
opts
,
cluster_name
,
reservations
=
conn
.
get_all_instances
()
die_on_error
=
False
)
for
res
in
reservations
:
if
any
(
active_nodes
):
group_names
=
[
g
.
id
for
g
in
res
.
groups
]
print
>>
stderr
,
(
"
ERROR: There are already instances running in
"
+
if
master_group
.
name
in
group_names
or
slave_group
.
name
in
group_names
or
zoo_group
.
name
in
group_names
:
"
group %s, %s or %s
"
%
(
master_group
.
name
,
slave_group
.
name
,
zoo_group
.
name
))
active
=
[
i
for
i
in
res
.
instances
if
is_active
(
i
)]
sys
.
exit
(
1
)
if
len
(
active
)
>
0
:
print
>>
stderr
,
(
"
ERROR: There are already instances running in
"
+
"
group %s, %s or %s
"
%
(
master_group
.
name
,
slave_group
.
name
,
zoo_group
.
name
))
sys
.
exit
(
1
)
# Figure out the latest AMI from our static URL
# Figure out the latest AMI from our static URL
if
opts
.
ami
==
"
latest
"
:
if
opts
.
ami
==
"
latest
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment