Rally 0.3.3
Steps t reproduce:
1- Add a deployment 2- run a task 3- delete a deployment
it will fail with following trace:
webv2_1 | api.Deployment.destroy(uuid) webv2_1 | File "/usr/local/lib/python2.7/site-packages/rally/api.py", line 93, in destroy webv2_1 | deployment.delete() webv2_1 | File "/usr/local/lib/python2.7/site-packages/rally/common/objects/deploy.py", line 94, in delete webv2_1 | db.deployment_delete(self.deployment["uuid"]) webv2_1 | File "/usr/local/lib/python2.7/site-packages/rally/common/db/api.py", line 234, in deployment_delete webv2_1 | return get_impl().deployment_delete(uuid) webv2_1 | File "/usr/local/lib/python2.7/site-packages/rally/common/db/sqlalchemy/api.py", line 310, in deployment_delete webv2_1 | filter_by(uuid=uuid).delete(synchronize_session=False)) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3048, in delete webv2_1 | delete_op.exec_() webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_ webv2_1 | self._do_exec() webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1311, in _do_exec webv2_1 | mapper=self.mapper) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1034, in execute webv2_1 | bind, close_with_result=True).execute(clause, params or {}) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute webv2_1 | return meth(self, multiparams, params) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection webv2_1 | return connection._execute_clauseelement(self, multiparams, params) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement webv2_1 | compiled_sql, distilled_params webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context webv2_1 | context) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception webv2_1 | util.raise_from_cause(newraise, exc_info) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause webv2_1 | reraise(type(exception), exception, tb=exc_tb, cause=cause) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context webv2_1 | context) webv2_1 | File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute webv2_1 | cursor.execute(statement, parameters) webv2_1 | File "/usr/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute webv2_1 | self.errorhandler(self, exc, value) webv2_1 | File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler webv2_1 | raise errorclass, errorvalue webv2_1 | DBReferenceError: (_mysql_exceptions.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`rally`.`tasks`, CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`deployment_uuid`) REFERENCES `deployments` (`uuid`))') [SQL: u'DELETE FROM deployments WHERE deployments.uuid = %s'] [parameters: ('e41071a8-5d75-4709-ad0a-f1ca00cf9026',)]
Rally 0.3.3
Steps t reproduce:
1- Add a deployment
2- run a task
3- delete a deployment
it will fail with following trace:
webv2_1 | api.Deployment. destroy( uuid) lib/python2. 7/site- packages/ rally/api. py", line 93, in destroy lib/python2. 7/site- packages/ rally/common/ objects/ deploy. py", line 94, in delete delete( self.deployment ["uuid" ]) lib/python2. 7/site- packages/ rally/common/ db/api. py", line 234, in deployment_delete ).deployment_ delete( uuid) lib/python2. 7/site- packages/ rally/common/ db/sqlalchemy/ api.py" , line 310, in deployment_delete by(uuid= uuid).delete( synchronize_ session= False)) lib/python2. 7/site- packages/ sqlalchemy/ orm/query. py", line 3048, in delete lib/python2. 7/site- packages/ sqlalchemy/ orm/persistence .py", line 1127, in exec_ lib/python2. 7/site- packages/ sqlalchemy/ orm/persistence .py", line 1311, in _do_exec lib/python2. 7/site- packages/ sqlalchemy/ orm/session. py", line 1034, in execute result= True).execute( clause, params or {}) lib/python2. 7/site- packages/ sqlalchemy/ engine/ base.py" , line 914, in execute lib/python2. 7/site- packages/ sqlalchemy/ sql/elements. py", line 323, in _execute_ on_connection _execute_ clauseelement( self, multiparams, params) lib/python2. 7/site- packages/ sqlalchemy/ engine/ base.py" , line 1010, in _execute_ clauseelement lib/python2. 7/site- packages/ sqlalchemy/ engine/ base.py" , line 1146, in _execute_context lib/python2. 7/site- packages/ sqlalchemy/ engine/ base.py" , line 1337, in _handle_ dbapi_exception from_cause( newraise, exc_info) lib/python2. 7/site- packages/ sqlalchemy/ util/compat. py", line 200, in raise_from_cause type(exception) , exception, tb=exc_tb, cause=cause) lib/python2. 7/site- packages/ sqlalchemy/ engine/ base.py" , line 1139, in _execute_context lib/python2. 7/site- packages/ sqlalchemy/ engine/ default. py", line 450, in do_execute execute( statement, parameters) lib/python2. 7/site- packages/ MySQLdb/ cursors. py", line 205, in execute er(self, exc, value) lib/python2. 7/site- packages/ MySQLdb/ connections. py", line 36, in defaulterrorhandler exceptions. IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`rally`.`tasks`, CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`deployment_uuid`) REFERENCES `deployments` (`uuid`))') [SQL: u'DELETE FROM deployments WHERE deployments.uuid = %s'] [parameters: ('e41071a8- 5d75-4709- ad0a-f1ca00cf90 26',)]
webv2_1 | File "/usr/local/
webv2_1 | deployment.delete()
webv2_1 | File "/usr/local/
webv2_1 | db.deployment_
webv2_1 | File "/usr/local/
webv2_1 | return get_impl(
webv2_1 | File "/usr/local/
webv2_1 | filter_
webv2_1 | File "/usr/local/
webv2_1 | delete_op.exec_()
webv2_1 | File "/usr/local/
webv2_1 | self._do_exec()
webv2_1 | File "/usr/local/
webv2_1 | mapper=self.mapper)
webv2_1 | File "/usr/local/
webv2_1 | bind, close_with_
webv2_1 | File "/usr/local/
webv2_1 | return meth(self, multiparams, params)
webv2_1 | File "/usr/local/
webv2_1 | return connection.
webv2_1 | File "/usr/local/
webv2_1 | compiled_sql, distilled_params
webv2_1 | File "/usr/local/
webv2_1 | context)
webv2_1 | File "/usr/local/
webv2_1 | util.raise_
webv2_1 | File "/usr/local/
webv2_1 | reraise(
webv2_1 | File "/usr/local/
webv2_1 | context)
webv2_1 | File "/usr/local/
webv2_1 | cursor.
webv2_1 | File "/usr/local/
webv2_1 | self.errorhandl
webv2_1 | File "/usr/local/
webv2_1 | raise errorclass, errorvalue
webv2_1 | DBReferenceError: (_mysql_