Outputs not resolved for adopted stack

Bug #1299173 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Steven Hardy

Bug Description

When you abandon and adopt a stack, the outputs aren't resolved correctly, even though it looks like the associated resource has the correct resource_data, not sure if this is a general problem or an issue specific to OS::Heat::RandomString yet:

$ sh -x reproducer.sh
+ heat stack-create r1 -f random.yaml
+--------------------------------------+------------+-----------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+-----------------+----------------------+
| 7899b522-7a35-47fe-bbee-91d55a16eea5 | r1 | CREATE_COMPLETE | 2014-03-28T19:22:01Z |
+--------------------------------------+------------+-----------------+----------------------+
+ heat stack-show r1
+ grep value
| | "output_value": "FSnNpirfiUovg7l4LMDPE4xAJsG2TA1W", |
+ heat stack-abandon r1
+ tee abandon_data.json
{
  "status": "COMPLETE",
  "name": "r1",
  "template": {
    "outputs": {
      "name": {
        "description": "name",
        "value": {
          "get_attr": [
            "random",
            "value"
          ]
        }
      }
    },
    "heat_template_version": "2013-05-23",
    "resources": {
      "random": {
        "type": "OS::Heat::RandomString"
      }
    }
  },
  "action": "CREATE",
  "id": "7899b522-7a35-47fe-bbee-91d55a16eea5",
  "resources": {
    "random": {
      "status": "COMPLETE",
      "name": "random",
      "resource_data": {
        "value": "FSnNpirfiUovg7l4LMDPE4xAJsG2TA1W"
      },
      "resource_id": "FSnNpirfiUovg7l4LMDPE4xAJsG2TA1W",
      "action": "CREATE",
      "type": "OS::Heat::RandomString",
      "metadata": {}
    }
  }
}
+ heat stack-adopt r2 -f random.yaml -a abandon_data.json
+--------------------------------------+------------+----------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+----------------+----------------------+
| c6db9b44-b874-4c21-8344-c5d98e143015 | r2 | ADOPT_COMPLETE | 2014-03-28T19:22:03Z |
+--------------------------------------+------------+----------------+----------------------+
+ heat stack-show r2
+ grep value
| | "output_value": null, |

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

$ cat reproducer.sh
heat stack-create r1 -f random.yaml
heat stack-show r1 | grep value
heat stack-abandon r1 | tee abandon_data.json
heat stack-adopt r2 -f random.yaml -a abandon_data.json
heat stack-show r2 | grep value

-bash-4.2$ cat random.yaml
heat_template_version: 2013-05-23

resources:
    random:
        type: OS::Heat::RandomString

outputs:
  name:
    description: name
    value: { get_attr: ['random', 'value'] }

Changed in heat:
status: New → Triaged
importance: Undecided → Medium
milestone: none → juno-1
Steven Hardy (shardy)
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
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/85764

Changed in heat:
status: Triaged → In Progress
Changed in heat:
milestone: juno-1 → icehouse-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/85764
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=1b5b5398b1a488223e65b238b0194153dc06ed75
Submitter: Jenkins
Branch: master

commit 1b5b5398b1a488223e65b238b0194153dc06ed75
Author: Steven Hardy <email address hidden>
Date: Mon Apr 7 18:33:24 2014 +0100

    Ensure outputs are resolved for adopted stacks

    The resolution of outputs is only performed for stacks in certain
    states, so we need to add ADOPT to the valid list of actions,
    as after a stack is ADOPT COMPLETE, it should be possible to resolve
    the outputs in the same way as after create.

    Change-Id: Iec7c9fe7cf48d7c87a5466b351ff04328d567e60
    Closes-Bug: #1299173

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/85904

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/86460

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (milestone-proposed)

Reviewed: https://review.openstack.org/86460
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4521e0347d4d0f12772178d54f66498e26dccb5a
Submitter: Jenkins
Branch: milestone-proposed

commit 4521e0347d4d0f12772178d54f66498e26dccb5a
Author: Steven Hardy <email address hidden>
Date: Mon Apr 7 18:33:24 2014 +0100

    Ensure outputs are resolved for adopted stacks

    The resolution of outputs is only performed for stacks in certain
    states, so we need to add ADOPT to the valid list of actions,
    as after a stack is ADOPT COMPLETE, it should be possible to resolve
    the outputs in the same way as after create.

    Change-Id: I52d710e5fb23b21848133b9845b2eba3ce76c4cb
    Closes-Bug: #1299173

Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-rc2 → 2014.1
Zane Bitter (zaneb)
tags: added: abandon-adopt
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.