Skip to content

Commit 9b8a2d2

Browse files
committed
Fix a bug in 1.6.0 where cfncluster configure was broken
Signed-off-by: Balaji Sridharan <[email protected]>
1 parent 666c146 commit 9b8a2d2

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

Diff for: CHANGELOG.rst

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
CHANGELOG
33
=========
44

5+
1.6.1
6+
=====
7+
* Fix a bug in `cfncluster configure` introduced in 1.6.0
8+
59
1.6.0
610
=====
711
* Refactor scaling up to take into account the number of pending/requested jobs/slots and instance slots.

Diff for: cli/cfncluster/config_sanity.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def get_partition(region):
2525
return 'aws-us-gov'
2626
return 'aws'
2727

28+
2829
def check_resource(region, cluster_name, aws_access_key_id, aws_secret_access_key, resource_type,resource_value):
2930

3031
# Loop over all supported resource checks
@@ -56,11 +57,13 @@ def check_resource(region, cluster_name, aws_access_key_id, aws_secret_access_ke
5657
(['sqs:SendMessage', 'sqs:ReceiveMessage', 'sqs:ChangeMessageVisibility', 'sqs:DeleteMessage', 'sqs:GetQueueUrl'], "arn:%s:sqs:%s:%s:cfncluster-*" % (partition, region, accountid)),
5758
(['autoscaling:DescribeAutoScalingGroups', 'autoscaling:TerminateInstanceInAutoScalingGroup', 'autoscaling:SetDesiredCapacity', 'autoscaling:DescribeTags', 'autoScaling:UpdateAutoScalingGroup'], "*"),
5859
(['dynamodb:PutItem', 'dynamodb:Query', 'dynamodb:GetItem', 'dynamodb:DeleteItem', 'dynamodb:DescribeTable'], "arn:%s:dynamodb:%s:%s:table/cfncluster-*" % (partition, region, accountid)),
59-
(['cloudformation:DescribeStacks'], "arn:%s:cloudformation:%s:%s:stack/cfncluster-%s/*" % (partition, region, accountid, cluster_name)),
6060
(['s3:GetObject'], "arn:%s:s3:::%s-cfncluster/*" % (partition, region)),
6161
(['sqs:ListQueues'], "*"),
6262
(['logs:*'], "arn:%s:logs:*:*:*" % partition)]
6363

64+
if cluster_name is not None:
65+
iam_policy['cloudformation:DescribeStacks'] = "arn:%s:cloudformation:%s:%s:stack/cfncluster-%s/*" % (partition, region, accountid, cluster_name)
66+
6467
for actions, resource_arn in iam_policy:
6568
response = iam.simulate_principal_policy(PolicySourceArn=arn, ActionNames=actions, ResourceArns=[resource_arn])
6669
for decision in response.get("EvaluationResults"):

Diff for: cli/cfncluster/easyconfig.py

+3
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,8 @@ def configure(args):
177177
with open(config_file,'w') as cf:
178178
config.write(cf)
179179

180+
# Set cluster name to none, since it is needed by config sanity
181+
args.cluster_name = None
182+
180183
# Verify the configuration
181184
cfnconfig.CfnClusterConfig(args)

Diff for: cli/setup.py

+1-1
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 = "1.6.0"
23+
version = "1.6.1"
2424
requires = ['boto3>=1.7.33', 'awscli>=1.11.175', 'future>=0.16.0']
2525

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

Diff for: cloudformation/cfncluster.cfn.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@
17101710
},
17111711
"CfnClusterVersions": {
17121712
"default": {
1713-
"cfncluster": "cfncluster-1.6.0",
1713+
"cfncluster": "cfncluster-1.6.1",
17141714
"cookbook": "cfncluster-cookbook-1.6.0",
17151715
"chef": "14.2.0",
17161716
"ridley": "5.1.1",

Diff for: docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# The short X.Y version.
5353
version = '1.6'
5454
# The full version, including alpha/beta/rc tags.
55-
release = '1.6.0'
55+
release = '1.6.1'
5656

5757
# The language for content autogenerated by Sphinx. Refer to documentation
5858
# for a list of supported languages.

0 commit comments

Comments
 (0)