Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
*#
dist/
build/
cfncluster.egg-info/
.idea/
*.egg-info/
.idea/
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
CHANGELOG
=========

0.0.17
======
* updates:``ami``: Pulled latest CentOS errata. Now CentOS 6.6.
* updates:``ami``: Updated SGE to 8.1.6
* updates:``ami``: Updates openlava to latest pull from GitHub
* bugfix:``ami``: Fixed handling of HTTP(S) proxies
* feature:``ami``: Moved sqswatcher and nodewatcher into Python package cfncluster-node

0.0.16
======
* feature:``cfncluster``: Support for GovCloud region
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ everything is done using CloudFormation or resources within AWS.

### Installation

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:
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:

#### Linux/OSX

Expand Down
20 changes: 10 additions & 10 deletions amis.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
us-west-2 ami-ef632ddf
eu-central-1 ami-1c132501
sa-east-1 ami-d3d364ce
ap-northeast-1 ami-2188bb20
eu-west-1 ami-3470d943
us-east-1 ami-f4ea6b9c
us-west-1 ami-c30e1a86
ap-southeast-2 ami-537e1269
ap-southeast-1 ami-0c70505e
us-gov-west-1 ami-8f1573ac
us-west-2 ami-2b095a1b
eu-central-1 ami-b03606ad
sa-east-1 ami-f18635ec
ap-northeast-1 ami-f2171ff3
eu-west-1 ami-c215adb5
us-east-1 ami-0e274866
us-west-1 ami-abddc0ee
ap-southeast-2 ami-a5701b9f
ap-southeast-1 ami-839bb4d1
us-gov-west-1 ami-9196f0b2
4 changes: 2 additions & 2 deletions bootstrap/src/scripts/boot_as_compute
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set -x
# Source functions
. /opt/cfncluster/scripts/functions.shlib

# Check DNS
check_dns || error_exit "DNS checks failed."
# Check basic DNS
check_dns_ns || error_exit "Basic DNS checks failed."

# Run preinstall script if defined
run_preinstall
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/src/scripts/boot_as_master
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set -x
# Source functions
. /opt/cfncluster/scripts/functions.shlib

# Check DNS
check_dns || error_exit "DNS checks failed."
# Check basic DNS
check_dns_ns || error_exit "Basic DNS checks failed."

# Run preinstall script if defined
run_preinstall
Expand Down
19 changes: 18 additions & 1 deletion bootstrap/src/scripts/functions.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,25 @@ function error_exit () {
exit 1
}

# Basic DNS check, using dnsdomain and checking for NS record
function check_dns_ns () {
TRY=0
domain=$(dnsdomainname)
while [ $TRY -lt 3 ]; do
host -t ns $domain >/dev/null
check_ns=$?
if [ $check_ns -eq 0 ]; then
break
else
sleep 10
TRY=$(( $TRY + 1 ))
fi
done
return $check_ns
}

# Check DNS is working, as it is required for correct operation
function check_dns () {
function check_dns_fqdn () {
TRY=0
while [ $TRY -lt 3 ]; do
hostname -f >/dev/null
Expand Down
7 changes: 7 additions & 0 deletions bootstrap/src/scripts/sge/boot_as_compute
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ set -x

. /opt/cfncluster/cfnconfig

# Source functions
. ../functions.shlib

function error_exit () {
script=`basename $0`
echo "cfncluster: $script - $1"
logger -t cfncluster "$script - $1"
exit 1
}

# Check FQDN dns
check_dns_fqdn || error_exit "FQDN DNS checks failed."


if [ "x$cfn_master" == "x" ]; then
error_exit 'No master server specified.'
usage
Expand Down
6 changes: 6 additions & 0 deletions bootstrap/src/scripts/sge/boot_as_master
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ set -x
# Source cfncluster config
. /opt/cfncluster/cfnconfig

# Source functions
. ../functions.shlib

function error_exit () {
script=`basename $0`
echo "cfncluster: $script - $1"
logger -t cfncluster "$script - $1"
exit 1
}

# Check FQDN dns
check_dns_fqdn || error_exit "FQDN DNS checks failed."

myhostname=$(hostname -s)
if [ $? != 0 ]; then
error_exit 'Failed to determine local hostname'
Expand Down
10 changes: 6 additions & 4 deletions cli/cfncluster/cfncluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def status(args):
sys.stdout.flush()
if not args.nowait:
while ((status != 'CREATE_COMPLETE') and (status != 'UPDATE_COMPLETE')
and (status != 'ROLLBACK_COMPLETE') and (status != 'CREATE_FAILED')):
and (status != 'ROLLBACK_COMPLETE') and (status != 'CREATE_FAILED') and (status != 'DELETE_FAILED')):
time.sleep(5)
status = cfnconn.describe_stacks(stack)[0].stack_status
events = cfnconn.describe_stack_events(stack)[0]
Expand All @@ -274,11 +274,12 @@ def status(args):
outputs = cfnconn.describe_stacks(stack)[0].outputs
for output in outputs:
print output
elif ((status == 'ROLLBACK_COMPLETE') or (status == 'CREATE_FAILED')):
elif ((status == 'ROLLBACK_COMPLETE') or (status == 'CREATE_FAILED') or (status == 'DELETE_FAILED')):
events = cfnconn.describe_stack_events(stack)
for event in events:
if event.resource_status == 'CREATE_FAILED':
print event.timestamp, event.resource_status, event.resource_type, event.logical_resource_id, event.resource_status_reason
if ((event.resource_status == 'CREATE_FAILED') or (event.resource_status == 'DELETE_FAILED')):
print event.timestamp, event.resource_status, event.resource_type, event.logical_resource_id, \
event.resource_status_reason
else:
sys.stdout.write('\n')
sys.stdout.flush()
Expand All @@ -304,6 +305,7 @@ def delete(args):
aws_secret_access_key=config.aws_secret_access_key)
try:
cfnconn.delete_stack(stack)
time.sleep(5)
status = cfnconn.describe_stacks(stack)[0].stack_status
sys.stdout.write('\rStatus: %s' % status)
sys.stdout.flush()
Expand Down
1 change: 1 addition & 0 deletions cli/cfncluster/cfnconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(self, args):
except AttributeError:
self.__cluster_template = __config.get('global', 'cluster_template')
self.__cluster_section = ('cluster %s' % self.__cluster_template)
self.parameters.append(('CLITemplate',self.__cluster_template))

# Check if package updates should be checked
try:
Expand Down
2 changes: 1 addition & 1 deletion cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

console_scripts = ['cfncluster = cfncluster.cli:main']
version = "0.0.16"
version = "0.0.17"
requires = ['boto>=2.34']

if sys.version_info[:2] == (2, 6):
Expand Down
Loading