Resources created during update get invalid AWS::StackId value

Bug #1240888 reported by Simon Pasquier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Alexander Chudnovets

Bug Description

When a resource is created during an update process, the AWS::StackId value is not correct.

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "",
  "Mappings": {},
  "Outputs": {
  },
  "Parameters": {
    "KeyName": {
      "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
      "Type": "String"
    }
  },
  "Resources": {

    "EC2": {
      "Metadata": {
        "stackid": {"Ref":"AWS::StackId"},
        "stackname": {"Ref":"AWS::StackName"}
      },
      "Properties": {
        "ImageId": "cirros-0.3.1-x86_64-uec",
        "InstanceType": "m1.nano",
        "KeyName": {"Ref": "KeyName"}
     },
     "Type":"AWS::EC2::Instance"
  }
 }
}

$ heat stack-create -f <template> -P "KeyName=test" my-stack
...
$ heat resource-metadata my-stack EC2
{
  "stackid": "arn:openstack:heat::2bc5532bfd3e4263a949d810e6fc4e65:stacks/stack1/13caf13c-504a-4189-9c4a-9442ea58006d",
  "stackname": "stack1"
}
$ heat stack-update -f simple.json -P "KeyName=test2" stack1
...
$ heat resource-metadata stack1 EC2
{
  "stackid": "arn:openstack:heat::2bc5532bfd3e4263a949d810e6fc4e65:stacks/stack1/None",
  "stackname": "stack1"
}

This is blocking when you want to use the stack id in the instance metadata (eg configuration files of Heat CFN tools).

Revision history for this message
Steven Hardy (shardy) wrote :

Ouch.

Changed in heat:
milestone: none → icehouse-1
importance: Undecided → High
Changed in heat:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
Changed in heat:
assignee: Vijendar Komalla (vijendar-komalla) → nobody
Changed in heat:
assignee: nobody → Alexander Chudnovets (achudnovets)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58301

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/58301
Committed: http://github.com/openstack/heat/commit/c4f0be36648d94bec439761399fbaeedab4e131e
Submitter: Jenkins
Branch: master

commit c4f0be36648d94bec439761399fbaeedab4e131e
Author: Alexander Chudnovets <email address hidden>
Date: Mon Nov 25 16:42:51 2013 +0200

    Fix not correct AWS::StackId value

    Add call of method _set_param_stackid() to method update_task() in class
    parser.Stack. This ensures that an updated stack still has the right
    AWS::StackId param.
    Add a unit test for this case.

    Change-Id: I0d28346631546577a85735292a24c2512476d4b4
    Closes-Bug: #1240888

Changed in heat:
status: In Progress → Fix Committed
information type: Public → Public Security
Revision history for this message
Simon Pasquier (simon-pasquier) wrote :

Why is it marked as Public Security bug?

information type: Public Security → Private Security
information type: Private Security → Public
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Alexander Chudnovets (achudnovets) wrote :

Sorry, just wrong click when accessed from android :)

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.