SQL syntax error using heat stack-delete

Bug #1274306 reported by Aaron Weitekamp
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Expired
Undecided
Unassigned

Bug Description

6-node heat template failing to delete. SQL syntax error:

2014-01-29 16:32:11.945 3169 INFO heat.engine.service [-] deleting stack ose
2014-01-29 16:32:12.334 3169 INFO heat.engine.resource [-] deleting WaitCondition "node_wait_condition"
2014-01-29 16:32:12.361 3169 INFO heat.engine.resource [-] deleting Server "node1_instance"
2014-01-29 16:32:12.377 3169 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.16.138.90
2014-01-29 16:32:12.461 3169 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.16.138.90
2014-01-29 16:32:12.788 3169 INFO heat.engine.resource [-] deleting LoadBalancer "mylb"
2014-01-29 16:32:12.813 3169 ERROR heat.engine.resource [-] Delete LoadBalancer "mylb"
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource Traceback (most recent call last):
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resource.py", line 559, in delete
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource handle_data = self.handle_delete()
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resources/neutron/loadbalancer.py", line 365, in handle_delete
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource member_id = db_api.resource_data_get(self, member)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/db/sqlalchemy/api.py", line 122, in resource_data_get
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource key)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/db/sqlalchemy/api.py", line 145, in resource_data_get_by_key
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource .filter_by(key=key).first())
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2156, in first
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource ret = list(self[0:1])
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2023, in __getitem__
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource return list(res)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2227, in __iter__
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource return self._execute_and_instances(context)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource result = conn.execute(querycontext.statement, self._params)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1449, in execute
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource params)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource compiled_sql, distilled_params
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1698, in _execute_context
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource context)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource context)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource cursor.execute(statement, parameters)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource self.errorhandler(self, exc, value)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource raise errorclass, errorvalue
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource ProgrammingError: (ProgrammingError) (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \': "\'broker1_instance\'"} \n LIMIT 1\' at line 3') 'SELECT resource_data.created_at AS resource_data_created_at, resource_data.updated_at AS resource_data_updated_at, resource_data.id AS resource_data_id, resource_data.`key` AS resource_data_key, resource_data.value AS resource_data_value, resource_data.redact AS resource_data_redact, resource_data.resource_id AS resource_data_resource_id \nFROM resource_data \nWHERE resource_data.resource_id = %s AND resource_data.`key` = %s \n LIMIT %s' ('4fb040d7-262e-4358-97dd-c0be71db50d8', {u'get_resource': u'broker1_instance'}, 1)
2014-01-29 16:32:12.813 3169 TRACE heat.engine.resource

Revision history for this message
Aaron Weitekamp (aweiteka) wrote :

Havana
python-heatclient-0.2.6-3.el6ost.noarch
openstack-heat-api-cfn-2013.2.1-4.el6ost.noarch
openstack-heat-common-2013.2.1-4.el6ost.noarch
openstack-heat-api-2013.2.1-4.el6ost.noarch
openstack-heat-api-cloudwatch-2013.2.1-4.el6ost.noarch
openstack-heat-engine-2013.2.1-4.el6ost.noarch

Wei T (nuaafe)
Changed in heat-templates:
assignee: nobody → Wei Tie (nuaafe)
Revision history for this message
Wei T (nuaafe) wrote :

Hey Aaron, would you like share your heat template, especially the load balancer part ? As I found {u'get_resource': u'broker1_instance'} is not be transformed correctly.

Wei T (nuaafe)
Changed in heat-templates:
assignee: Wei T (nuaafe) → nobody
Changed in heat-templates:
assignee: nobody → Sharmistha (prasad-sharmistha)
Revision history for this message
Zane Bitter (zaneb) wrote :

I'm quite confident this has long since been fixed :)

Changed in heat-templates:
status: New → Incomplete
affects: heat-templates → heat
Changed in heat:
assignee: Sharmistha (prasad-sharmistha) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Heat because there has been no activity for 60 days.]

Changed in heat:
status: Incomplete → Expired
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.