Metadata update fails when an Instance has not yet been created
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Zane Bitter |
Bug Description
Take the following template:
{
"AWSTemplateF
"Description" : "Just a WaitCondition.",
"Parameters" : {
"KeyName" : {"Type" : "String", "Default": "mine" },
},
"Resources" : {
"WH" : {
"Type" : "AWS::CloudForm
},
"S1": {
"Type": "AWS::EC2:
"Properties": {
"ImageId" : "a",
"KeyName" : { "Ref" : "KeyName" },
"UserData" : { "Fn::Join" : [ "", [ "#!/bin/bash -v\n",
}
},
"WC" : {
"Type" : "AWS::CloudForm
"DependsOn": "S1",
"Properties" : {
"Handle" : {"Ref" : "WH"},
"Timeout" : "5"
}
},
"S2": {
"Type": "AWS::EC2:
"DependsOn": "WC",
"Metadata" : {
"test" : {"Fn::GetAtt": ["WC", "Data"]}
},
"Properties": {
"ImageId" : "a",
"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 WaitConditionHa
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 WaitConditionHa
description: | updated |
Changed in heat: | |
assignee: | nobody → Zane Bitter (zaneb) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in heat: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | havana-2 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/31183
Review: https:/