Skip to content

Commit bd6ef10

Browse files
author
Dougal Ballantyne
committed
Merge branch 'master' of github.com:awslabs/cfncluster
2 parents 36bf746 + e8e4721 commit bd6ef10

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
CHANGELOG
33
=========
44

5+
0.0.13
6+
======
7+
* bugfix:``cli``: Fixed missing AvailabilityZone for "update" command
8+
59
0.0.12
610
======
711

812
* updates:``cli``: Simplfied VPC config and removed multi-AZ
913

10-
1114
0.0.11
1215
======
1316

1417
* updates:``ami``: Pulled latest CentOS errata
1518
* updates:``ami``: Removed DKMS Lustre; replaced with Intel Lustre Client
1619

17-
1820
0.0.10
1921
======
2022

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.12. 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.13. 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

cli/cfncluster/cfncluster.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ def update(args):
105105
desired_capacity = asgconn.get_all_groups(names=[asg])[0].desired_capacity
106106
config.parameters.append(('InitialQueueSize', desired_capacity))
107107

108+
# Get the MasterSubnetId and use it to determine AvailabilityZone
109+
try:
110+
i = [p[0] for p in config.parameters].index('MasterSubnetId')
111+
master_subnet_id = config.parameters[i][1]
112+
try:
113+
vpcconn = boto.vpc.connect_to_region(config.region,aws_access_key_id=config.aws_access_key_id,
114+
aws_secret_access_key=config.aws_secret_access_key)
115+
availability_zone = str(vpcconn.get_all_subnets(subnet_ids=master_subnet_id)[0].availability_zone)
116+
except boto.exception.BotoServerError as e:
117+
print e.message
118+
sys.exit(1)
119+
config.parameters.append(('AvailabilityZone', availability_zone))
120+
except ValueError:
121+
pass
122+
108123
try:
109124
logger.debug((config.template_url, config.parameters))
110125
stack = cfnconn.update_stack(stack_name,template_url=config.template_url,

cli/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def read(fname):
2020
return open(os.path.join(os.path.dirname(__file__), fname)).read()
2121

2222
console_scripts = ['cfncluster = cfncluster.cli:main']
23-
version = "0.0.12"
23+
version = "0.0.13"
2424
requires = ['boto>=2.32.1', 'botocore']
2525

2626
if sys.version_info[:2] == (2, 6):

0 commit comments

Comments
 (0)