Update stack fails because of unresolved parameters were used

Bug #1292495 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Sergey Kraynev

Bug Description

I have stack is described next template:

HeatTemplateFormatVersion: '2012-12-12'
Description: |
  Template which tests neutron load balancing resources
Parameters:
  key_name:
    Type: String
    flavor:
    Type: String
  image:
    Type: String
  private_subnet_id:
    Type: String
  external_network_id:
    Type: String
Resources:
  TestHealthMonitor:
    Type: OS::Neutron::HealthMonitor
    Properties:
      delay: 3
      type: HTTP
      timeout: 3
      max_retries: 3
  TestHealthMonitor2:
    Type: OS::Neutron::HealthMonitor
    Properties:
      delay: 3
      type: HTTP
      timeout: 3
      max_retries: 3
  TestPool:
    Type: OS::Neutron::Pool
    Properties:
      lb_method: ROUND_ROBIN
      protocol: HTTP
      subnet_id: {Ref: private_subnet_id}
      vip:
        protocol_port: 80
      monitors:
      - {Ref: TestHealthMonitor}
      - {Ref: TestHealthMonitor2}

Then I remove one of the references ( -{Ref: TestHealthMonitor2} ), and try update my stack.
As result I have got error next trace back: http://paste.openstack.org/show/73489/

Revision history for this message
Sergey Kraynev (skraynev) wrote :

The problem is connected with unresolved properties. The old template stored values, which were parsed using resolve_static_data : https://github.com/openstack/heat/blob/master/heat/engine/resources/neutron/loadbalancer.py#L386

So instead resolved monitors id we have only built-in functions.
In my vision, we should use self.properties for getting required properties.

Changed in heat:
assignee: nobody → Sergey Kraynev (skraynev)
Thomas Herve (therve)
Changed in heat:
milestone: none → icehouse-rc1
importance: Undecided → Medium
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/80569

Changed in heat:
status: New → In Progress
Changed in heat:
assignee: Sergey Kraynev (skraynev) → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in heat:
assignee: Pavlo Shchelokovskyy (pshchelo) → Sergey Kraynev (skraynev)
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

Depends on bug 1291411

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

Reviewed: https://review.openstack.org/80569
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=61b804a861d27bb10bc14c778ad7d489ed42f24d
Submitter: Jenkins
Branch: master

commit 61b804a861d27bb10bc14c778ad7d489ed42f24d
Author: Sergey Kraynev <email address hidden>
Date: Fri Mar 14 09:33:12 2014 -0400

    Using resolving properties for update

    For definition reference in template we should use built-in functions.
    So template after parsing with resolve_static_data will contain
    references on these functions instead resolve values.
    If we want get some information about previous state of stack during
    update, we should use self.properties instead of self.t['Properties'].
    Also default=[] was added to avoid error when we try to do set([]).

    Closes-bug: #1292495
    Change-Id: I0cc44a0a541913cca665caec1a7f3a2a1a6cebc9

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-rc1 → 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.