Skip to content

Commit e0acae2

Browse files
committed
Merge pull request #20 from awslabs/develop
Release 0.0.17
2 parents f8eff73 + 9975aa4 commit e0acae2

31 files changed

+288
-115
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
*#
66
dist/
77
build/
8-
cfncluster.egg-info/
9-
.idea/
8+
*.egg-info/
9+
.idea/

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
CHANGELOG
33
=========
44

5+
0.0.17
6+
======
7+
* updates:``ami``: Pulled latest CentOS errata. Now CentOS 6.6.
8+
* updates:``ami``: Updated SGE to 8.1.6
9+
* updates:``ami``: Updates openlava to latest pull from GitHub
10+
* bugfix:``ami``: Fixed handling of HTTP(S) proxies
11+
* feature:``ami``: Moved sqswatcher and nodewatcher into Python package cfncluster-node
12+
513
0.0.16
614
======
715
* feature:``cfncluster``: Support for GovCloud region

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ everything is done using CloudFormation or resources within AWS.
88

99
### Installation
1010

11-
The current working version is cfncluster-0.0.16. The CLI is written in python and uses BOTO for AWS actions. You can install the CLI with the following command:
11+
The current working version is cfncluster-0.0.17. The CLI is written in python and uses BOTO for AWS actions. You can install the CLI with the following command:
1212

1313
#### Linux/OSX
1414

amis.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
us-west-2 ami-ef632ddf
2-
eu-central-1 ami-1c132501
3-
sa-east-1 ami-d3d364ce
4-
ap-northeast-1 ami-2188bb20
5-
eu-west-1 ami-3470d943
6-
us-east-1 ami-f4ea6b9c
7-
us-west-1 ami-c30e1a86
8-
ap-southeast-2 ami-537e1269
9-
ap-southeast-1 ami-0c70505e
10-
us-gov-west-1 ami-8f1573ac
1+
us-west-2 ami-2b095a1b
2+
eu-central-1 ami-b03606ad
3+
sa-east-1 ami-f18635ec
4+
ap-northeast-1 ami-f2171ff3
5+
eu-west-1 ami-c215adb5
6+
us-east-1 ami-0e274866
7+
us-west-1 ami-abddc0ee
8+
ap-southeast-2 ami-a5701b9f
9+
ap-southeast-1 ami-839bb4d1
10+
us-gov-west-1 ami-9196f0b2

bootstrap/src/scripts/boot_as_compute

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ set -x
1919
# Source functions
2020
. /opt/cfncluster/scripts/functions.shlib
2121

22-
# Check DNS
23-
check_dns || error_exit "DNS checks failed."
22+
# Check basic DNS
23+
check_dns_ns || error_exit "Basic DNS checks failed."
2424

2525
# Run preinstall script if defined
2626
run_preinstall

bootstrap/src/scripts/boot_as_master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ set -x
1919
# Source functions
2020
. /opt/cfncluster/scripts/functions.shlib
2121

22-
# Check DNS
23-
check_dns || error_exit "DNS checks failed."
22+
# Check basic DNS
23+
check_dns_ns || error_exit "Basic DNS checks failed."
2424

2525
# Run preinstall script if defined
2626
run_preinstall

bootstrap/src/scripts/functions.shlib

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,25 @@ function error_exit () {
1515
exit 1
1616
}
1717

18+
# Basic DNS check, using dnsdomain and checking for NS record
19+
function check_dns_ns () {
20+
TRY=0
21+
domain=$(dnsdomainname)
22+
while [ $TRY -lt 3 ]; do
23+
host -t ns $domain >/dev/null
24+
check_ns=$?
25+
if [ $check_ns -eq 0 ]; then
26+
break
27+
else
28+
sleep 10
29+
TRY=$(( $TRY + 1 ))
30+
fi
31+
done
32+
return $check_ns
33+
}
34+
1835
# Check DNS is working, as it is required for correct operation
19-
function check_dns () {
36+
function check_dns_fqdn () {
2037
TRY=0
2138
while [ $TRY -lt 3 ]; do
2239
hostname -f >/dev/null

bootstrap/src/scripts/sge/boot_as_compute

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@ set -x
1515

1616
. /opt/cfncluster/cfnconfig
1717

18+
# Source functions
19+
. ../functions.shlib
20+
1821
function error_exit () {
1922
script=`basename $0`
2023
echo "cfncluster: $script - $1"
2124
logger -t cfncluster "$script - $1"
2225
exit 1
2326
}
2427

28+
# Check FQDN dns
29+
check_dns_fqdn || error_exit "FQDN DNS checks failed."
30+
31+
2532
if [ "x$cfn_master" == "x" ]; then
2633
error_exit 'No master server specified.'
2734
usage

bootstrap/src/scripts/sge/boot_as_master

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ set -x
1616
# Source cfncluster config
1717
. /opt/cfncluster/cfnconfig
1818

19+
# Source functions
20+
. ../functions.shlib
21+
1922
function error_exit () {
2023
script=`basename $0`
2124
echo "cfncluster: $script - $1"
2225
logger -t cfncluster "$script - $1"
2326
exit 1
2427
}
2528

29+
# Check FQDN dns
30+
check_dns_fqdn || error_exit "FQDN DNS checks failed."
31+
2632
myhostname=$(hostname -s)
2733
if [ $? != 0 ]; then
2834
error_exit 'Failed to determine local hostname'

cli/cfncluster/cfncluster.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def status(args):
261261
sys.stdout.flush()
262262
if not args.nowait:
263263
while ((status != 'CREATE_COMPLETE') and (status != 'UPDATE_COMPLETE')
264-
and (status != 'ROLLBACK_COMPLETE') and (status != 'CREATE_FAILED')):
264+
and (status != 'ROLLBACK_COMPLETE') and (status != 'CREATE_FAILED') and (status != 'DELETE_FAILED')):
265265
time.sleep(5)
266266
status = cfnconn.describe_stacks(stack)[0].stack_status
267267
events = cfnconn.describe_stack_events(stack)[0]
@@ -274,11 +274,12 @@ def status(args):
274274
outputs = cfnconn.describe_stacks(stack)[0].outputs
275275
for output in outputs:
276276
print output
277-
elif ((status == 'ROLLBACK_COMPLETE') or (status == 'CREATE_FAILED')):
277+
elif ((status == 'ROLLBACK_COMPLETE') or (status == 'CREATE_FAILED') or (status == 'DELETE_FAILED')):
278278
events = cfnconn.describe_stack_events(stack)
279279
for event in events:
280-
if event.resource_status == 'CREATE_FAILED':
281-
print event.timestamp, event.resource_status, event.resource_type, event.logical_resource_id, event.resource_status_reason
280+
if ((event.resource_status == 'CREATE_FAILED') or (event.resource_status == 'DELETE_FAILED')):
281+
print event.timestamp, event.resource_status, event.resource_type, event.logical_resource_id, \
282+
event.resource_status_reason
282283
else:
283284
sys.stdout.write('\n')
284285
sys.stdout.flush()
@@ -304,6 +305,7 @@ def delete(args):
304305
aws_secret_access_key=config.aws_secret_access_key)
305306
try:
306307
cfnconn.delete_stack(stack)
308+
time.sleep(5)
307309
status = cfnconn.describe_stacks(stack)[0].stack_status
308310
sys.stdout.write('\rStatus: %s' % status)
309311
sys.stdout.flush()

0 commit comments

Comments
 (0)