]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat engine : loadbalancer resource template, refer to StackId
authorSteven Hardy <shardy@redhat.com>
Tue, 26 Feb 2013 14:20:00 +0000 (14:20 +0000)
committerSteven Hardy <shardy@redhat.com>
Wed, 27 Feb 2013 16:17:30 +0000 (16:17 +0000)
Use the new AWS::StackId pseudo parameter to refer to the stack for
cfn-hup etc, otherwise the stack lookup by name will fail - using
the AWS::StackId parameter means we'll refer to the stack via the
full ARN and the CFN API will be able to lookup the nested stack.

ref bug 1131666

Change-Id: Ieac738df766ae1f1039e743d465cd080b2090473

heat/engine/resources/loadbalancer.py

index 5be550fa68b96160fb492d5d3898931784819b2e..d4c41d275ab4636227dbc3c8b6e4001dc1b0079b 100644 (file)
@@ -87,7 +87,7 @@ lb_template = r'''
               "/etc/cfn/cfn-hup.conf" : {
                 "content" : { "Fn::Join" : ["", [
                   "[main]\n",
-                  "stack=", { "Ref" : "AWS::StackName" }, "\n",
+                  "stack=", { "Ref" : "AWS::StackId" }, "\n",
                   "credential-file=/etc/cfn/cfn-credentials\n",
                   "region=", { "Ref" : "AWS::Region" }, "\n",
                   "interval=60\n"
@@ -102,7 +102,7 @@ lb_template = r'''
                   "triggers=post.update\n",
                   "path=Resources.LB_instance.Metadata\n",
                   "action=/opt/aws/bin/cfn-init -s ",
-                  { "Ref": "AWS::StackName" },
+                  { "Ref": "AWS::StackId" },
                   "    -r LB_instance ",
                   "    --region ", { "Ref": "AWS::Region" }, "\n",
                   "runas=root\n",
@@ -154,7 +154,7 @@ lb_template = r'''
           "}\n",
 
           "/opt/aws/bin/cfn-init -s ",
-          { "Ref": "AWS::StackName" },
+          { "Ref": "AWS::StackId" },
           "    -r LB_instance ",
           "    --region ", { "Ref": "AWS::Region" }, "\n",
           "# install cfn-hup crontab\n",