ProgrammingError: "You have an error in your SQL syntax"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Rabi Mishra |
Bug Description
Hi colleagues,
I hit easily reproducible bug in Heat + Neutron. Using the following template:
heat_template_
resources:
lan-net:
type: OS::Neutron::Net
properties:
name: jt-net
dm-subnet:
type: OS::Neutron::Subnet
properties:
name: dm-subnet
network: { get_resource: lan-net }
enable_dhcp: False
cidr: 10.0.1.0/24
rPort:
type: OS::Neutron::Port
properties:
name: rPort
network: { get_resource: lan-net }
fixed_ips:
- { subnet: { get_resource: dm-subnet } }
stack creation is ok. UPDATING stack with commented out 'fixed_ips' section in rPort definition:
rPort:
type: OS::Neutron::Port
properties:
name: rPort
network: { get_resource: lan-net }
# fixed_ips:
# - { subnet: { get_resource: dm-subnet } }
causes fail with the message "Resource UPDATE failed: InternalServerE
and the following message in the neutron-server.log:
2017-08-15 08:33:38.302 5764 DEBUG neutron.api.v2.base [req-3f9baf42-
2017-08-15 08:33:38.500 5764 ERROR oslo_db.
(full log attached)
On the other hand, CREATION of stack using the same template (one, which caused update to fail, with commented lines) finishes successfully without errors:
doka@lagavulin(
+------
| Field | Value |
+------
| id | cfd0148f-
| stack_name | port |
| description | No description |
| creation_time | 2017-08-
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+------
doka@lagavulin(
+------
| ID | Stack Name | Stack Status | Creation Time | Updated Time |
+------
| cfd0148... | port | CREATE_COMPLETE | 2017-08-
+------
Seems, something wrong with UPDATE procedure.
Thank you.
Changed in heat: | |
status: | New → In Progress |
Changed in heat: | |
milestone: | none → pike-rc2 |
Changed in heat: | |
milestone: | pike-rc2 → queens-1 |
The current behaviour is to keep the already assigned fixed_ips during update[1]. As that is the only thing that's changed in the template above, we're sending an empty dict '{}' and neutron throws an error in that case.
[1] https:/ /github. com/openstack/ heat/blob/ master/ heat/engine/ resources/ openstack/ neutron/ port.py# L462