Skip to content

Commit

Permalink
Merge pull request #86 from sean-smith/merge-master
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
sean-smith authored Dec 18, 2018
2 parents 89d36d9 + 946dba9 commit 5176463
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ aws-parallelcluster-node CHANGELOG

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

2.1.0
-----

Bug Fixes:

- Don't schedule jobs on compute nodes that are terminating

2.0.2
-----

- Align version to main ParallelCluster package

2.0.0
-----

Expand Down
19 changes: 12 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
=========================
aws-parallelcluster-node
=========================
========================
AWS ParallelCluster Node
========================

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

aws-parallelcluster-node is the python package installed on the Amazon EC2 instances launched as part of AWS ParallelCluster.
.. |Build Status| image:: https://travis-ci.org/aws/aws-parallelcluster-node.png?branch=develop
:target: https://travis-ci.org/aws/aws-parallelcluster-node/
:alt: Build Status
.. |Version| image:: https://badge.fury.io/py/aws-parallelcluster-node.png
:target: https://badge.fury.io/py/aws-parallelcluster-node

This repo contains the aws-parallelcluster-node package installed on the Amazon EC2 instances launched
as part of AWS ParallelCluster.
10 changes: 9 additions & 1 deletion nodewatcher/nodewatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def stackCreationComplete(stack_name, region, proxy_config):
log.info('Checking for status of the stack %s' % stack_name)
cfn_client = boto3.client('cloudformation', region_name=region, config=proxy_config)
stacks = cfn_client.describe_stacks(StackName=stack_name)
return stacks['Stacks'][0]['StackStatus'] == 'CREATE_COMPLETE'
return stacks['Stacks'][0]['StackStatus'] == 'CREATE_COMPLETE' or \
stacks['Stacks'][0]['StackStatus'] == 'UPDATE_COMPLETE'


def main():
Expand Down Expand Up @@ -183,7 +184,13 @@ def main():
data = {_CURRENT_IDLETIME: 0}

stack_creation_complete = False
termination_in_progress = False
while True:
# if this node is terminating sleep for a long time and wait for termination
if termination_in_progress:
time.sleep(300)
log.info('%s is still terminating' % hostname)
continue
time.sleep(60)
if not stack_creation_complete:
stack_creation_complete = stackCreationComplete(stack_name, region, proxy_config)
Expand Down Expand Up @@ -217,6 +224,7 @@ def main():
os.remove(_IDLETIME_FILE)
try:
selfTerminate(asg_name, asg_conn, instance_id)
termination_in_progress = True
except ClientError as ex:
log.error('Failed to terminate instance: %s with exception %s' % (instance_id, ex))
lockHost(s, hostname, unlock=True)
Expand Down
3 changes: 2 additions & 1 deletion requirements26.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pycparser==2.18
paramiko==2.3.3
idna==2.6
paramiko==2.3.3
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ def read(fname):
console_scripts = ['sqswatcher = sqswatcher.sqswatcher:main',
'nodewatcher = nodewatcher.nodewatcher:main',
'jobwatcher = jobwatcher.jobwatcher:main']
version = "2.0.0"
version = "2.1.0"
requires = ['boto3>=1.7.55', 'python-dateutil>=2.6.1']

if sys.version_info[:2] == (2, 6):
# For python2.6 we have to require argparse since it
# was not in stdlib until 2.7.
requires.append('argparse>=1.4')
requires.append('idna==2.6')
requires.append('paramiko==2.3.3')
requires.append('pycparser==2.18')
else:
Expand Down

0 comments on commit 5176463

Please sign in to comment.