Skip to content

Commit 5176463

Browse files
author
Sean Smith
authored
Merge pull request #86 from sean-smith/merge-master
Release 2.1.0
2 parents 89d36d9 + 946dba9 commit 5176463

File tree

5 files changed

+37
-10
lines changed

5 files changed

+37
-10
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ aws-parallelcluster-node CHANGELOG
33

44
This file is used to list changes made in each version of the aws-parallelcluster-node package.
55

6+
2.1.0
7+
-----
8+
9+
Bug Fixes:
10+
11+
- Don't schedule jobs on compute nodes that are terminating
12+
13+
2.0.2
14+
-----
15+
16+
- Align version to main ParallelCluster package
17+
618
2.0.0
719
-----
820

README.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
=========================
2-
aws-parallelcluster-node
3-
=========================
1+
========================
2+
AWS ParallelCluster Node
3+
========================
44

5-
.. image:: https://travis-ci.org/aws/aws-parallelcluster-node.png?branch=develop
6-
:target: https://travis-ci.org/aws/aws-parallelcluster-node
7-
:alt: Build Status
5+
|Build Status| |Version|
86

9-
aws-parallelcluster-node is the python package installed on the Amazon EC2 instances launched as part of AWS ParallelCluster.
7+
.. |Build Status| image:: https://travis-ci.org/aws/aws-parallelcluster-node.png?branch=develop
8+
:target: https://travis-ci.org/aws/aws-parallelcluster-node/
9+
:alt: Build Status
10+
.. |Version| image:: https://badge.fury.io/py/aws-parallelcluster-node.png
11+
:target: https://badge.fury.io/py/aws-parallelcluster-node
12+
13+
This repo contains the aws-parallelcluster-node package installed on the Amazon EC2 instances launched
14+
as part of AWS ParallelCluster.

nodewatcher/nodewatcher.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def stackCreationComplete(stack_name, region, proxy_config):
152152
log.info('Checking for status of the stack %s' % stack_name)
153153
cfn_client = boto3.client('cloudformation', region_name=region, config=proxy_config)
154154
stacks = cfn_client.describe_stacks(StackName=stack_name)
155-
return stacks['Stacks'][0]['StackStatus'] == 'CREATE_COMPLETE'
155+
return stacks['Stacks'][0]['StackStatus'] == 'CREATE_COMPLETE' or \
156+
stacks['Stacks'][0]['StackStatus'] == 'UPDATE_COMPLETE'
156157

157158

158159
def main():
@@ -183,7 +184,13 @@ def main():
183184
data = {_CURRENT_IDLETIME: 0}
184185

185186
stack_creation_complete = False
187+
termination_in_progress = False
186188
while True:
189+
# if this node is terminating sleep for a long time and wait for termination
190+
if termination_in_progress:
191+
time.sleep(300)
192+
log.info('%s is still terminating' % hostname)
193+
continue
187194
time.sleep(60)
188195
if not stack_creation_complete:
189196
stack_creation_complete = stackCreationComplete(stack_name, region, proxy_config)
@@ -217,6 +224,7 @@ def main():
217224
os.remove(_IDLETIME_FILE)
218225
try:
219226
selfTerminate(asg_name, asg_conn, instance_id)
227+
termination_in_progress = True
220228
except ClientError as ex:
221229
log.error('Failed to terminate instance: %s with exception %s' % (instance_id, ex))
222230
lockHost(s, hostname, unlock=True)

requirements26.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pycparser==2.18
2-
paramiko==2.3.3
2+
idna==2.6
3+
paramiko==2.3.3

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ def read(fname):
2525
console_scripts = ['sqswatcher = sqswatcher.sqswatcher:main',
2626
'nodewatcher = nodewatcher.nodewatcher:main',
2727
'jobwatcher = jobwatcher.jobwatcher:main']
28-
version = "2.0.0"
28+
version = "2.1.0"
2929
requires = ['boto3>=1.7.55', 'python-dateutil>=2.6.1']
3030

3131
if sys.version_info[:2] == (2, 6):
3232
# For python2.6 we have to require argparse since it
3333
# was not in stdlib until 2.7.
3434
requires.append('argparse>=1.4')
35+
requires.append('idna==2.6')
3536
requires.append('paramiko==2.3.3')
3637
requires.append('pycparser==2.18')
3738
else:

0 commit comments

Comments
 (0)