Activity log for bug #1185530

Date Who What changed Old value New value Message
2013-05-29 17:41:34 Zane Bitter bug added bug
2013-05-29 17:42:21 Zane Bitter description Take the following template: { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "Just a WaitCondition.", "Parameters" : { "KeyName" : {"Type" : "String", "Default": "mine" }, }, "Resources" : { "WH" : { "Type" : "AWS::CloudFormation::WaitConditionHandle" }, "S1": { "Type": "AWS::EC2::Instance", "Properties": { "ImageId" : "a", "InstanceType" : "m1.large", "KeyName" : { "Ref" : "KeyName" }, "UserData" : { "Fn::Join" : [ "", [ "#!/bin/bash -v\n", "echo ", { "Ref" : "WH" }, "\n" ] ] } } }, "WC" : { "Type" : "AWS::CloudFormation::WaitCondition", "DependsOn": "S1", "Properties" : { "Handle" : {"Ref" : "WH"}, "Timeout" : "5" } }, "S2": { "Type": "AWS::EC2::Instance", "DependsOn": "WC", "Metadata" : { "test" : {"Fn::GetAtt": ["WC", "Data"]} }, "Properties": { "ImageId" : "a", "InstanceType" : "m1.large", "KeyName" : { "Ref" : "KeyName" }, "UserData" : "#!/bin/bash -v\n" } } } } This implements what you'd imagine to be a fairly common pattern - it starts up one server, which posts some result of its software configuration to a WaitCondition, and said result is used in the Metadata of a second server. This causes an exception, because it attempts to refresh the metadata of the second server (actually of all resources, but it is a NOP for everything except Instances and WaitConditionHandles) and this fails because the second server has not been created yet, and therefore is not stored in the database. Note that the issue here is not that "S2" references "WC" in its metadata, simply that its creation has not started at the time that "S1" starts posting data to the WaitConditionHandle. Take the following template: {   "AWSTemplateFormatVersion" : "2010-09-09",   "Description" : "Just a WaitCondition.",   "Parameters" : {     "KeyName" : {"Type" : "String", "Default": "mine" },   },   "Resources" : {     "WH" : {       "Type" : "AWS::CloudFormation::WaitConditionHandle"     },     "S1": {       "Type": "AWS::EC2::Instance",       "Properties": {         "ImageId" : "a",         "InstanceType" : "m1.large",         "KeyName" : { "Ref" : "KeyName" },         "UserData" : { "Fn::Join" : [ "", [ "#!/bin/bash -v\n",                                                 "echo ",                                                 { "Ref" : "WH" },                                                 "\n" ] ] }       }     },     "WC" : {       "Type" : "AWS::CloudFormation::WaitCondition",       "DependsOn": "S1",       "Properties" : {         "Handle" : {"Ref" : "WH"},         "Timeout" : "5"       }     },     "S2": {       "Type": "AWS::EC2::Instance",       "DependsOn": "WC",       "Metadata" : {         "test" : {"Fn::GetAtt": ["WC", "Data"]}       },       "Properties": {         "ImageId" : "a",         "InstanceType" : "m1.large",         "KeyName" : { "Ref" : "KeyName" },         "UserData" : "#!/bin/bash -v\n"       }     }   } } This implements what you'd imagine to be a fairly common pattern - it starts up one server, which posts some result of its software configuration to a WaitCondition, and said result is used in the Metadata of a second server. Posting to the WaitConditionHandle causes an exception, because it attempts to refresh the metadata of the second server (actually of all resources, but it is a NOP for everything except Instances and WaitConditionHandles) and this fails because the second server has not been created yet, and therefore is not stored in the database. Note that the issue here is not that "S2" references "WC" in its metadata, simply that its creation has not started at the time that "S1" starts posting data to the WaitConditionHandle.
2013-05-31 10:37:11 Zane Bitter heat: assignee Zane Bitter (zaneb)
2013-05-31 10:37:16 Zane Bitter heat: importance Undecided Medium
2013-05-31 10:37:21 Zane Bitter heat: status New In Progress
2013-06-03 18:31:14 OpenStack Infra heat: status In Progress Fix Committed
2013-07-17 11:10:20 Thierry Carrez heat: status Fix Committed Fix Released
2013-07-17 11:10:20 Thierry Carrez heat: milestone havana-2
2013-10-17 10:00:55 Thierry Carrez heat: milestone havana-2 2013.2