template with autoscaling group gets stuck and never completes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Miguel Grinberg |
Bug Description
The following template creates an autoscaling group plus a separate server. It assigns the "current_size" attribute of the asg to the other server as metadata. When running the template, the autoscaling group completes, but the other server never starts. The same template without the metadata variable runs through completion just fine.
Here is the template:
heat_
parameters:
image:
type: string
label: Image name or ID
default: cirros
flavor:
type: string
label: Flavor
default: m1.tiny
network:
type: string
label: Network
default: private
resources:
asg:
type: OS::Heat:
properties:
min_size: 1
max_size: 5
resource:
type: OS::Nova::Server
image: { get_param: image }
flavor: { get_param: flavor }
- network: { get_param: network }
lb:
type: OS::Nova::Server
properties:
image: { get_param: image }
flavor: { get_param: flavor }
networks:
- network: { get_param: network }
metadata:
sz: { get_attr: [asg, current_size] }
Changed in heat: | |
assignee: | nobody → Miguel Grinberg (miguelgrinberg) |
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → next |
tags: | added: kilo-rc-potential |
Changed in heat: | |
status: | Triaged → In Progress |
Changed in heat: | |
milestone: | next → kilo-rc1 |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | kilo-rc1 → 2015.1.0 |
Further investigation revealed that the stack gets stuck when an exception is raised when evaluating attributes. Testing on latest Kilo release i was unable to reproduce the problem with the template shown above, but I can reproduce when I replace the last line with an invalid attribute, for example:
sz: { get_attr: [asg, bad_attr] }
I was working with Juno last week when I found this bug. I'm thinking that maybe I mistyped "current_size" and that is why it hung for me on that property.