Deadlock occurs in the process of deletion cluster during deployment.
nailgun/test/integration/test_charset_issues.py:74: in test_deletion_during_deployment
headers=self.default_headers
.tox/py26/lib/python2.6/site-packages/webtest/app.py:312: in delete
content_type=content_type)
.tox/py26/lib/python2.6/site-packages/webtest/app.py:626: in _gen_request
expect_errors=expect_errors)
.tox/py26/lib/python2.6/site-packages/webtest/app.py:521: in do_request
self._check_status(status, res)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <webtest.app.TestApp object at 0x774c8d0>, status = None
res = <400 Bad Request text/html body='{"message... []}'/719>
def _check_status(self, status, res):
if status == '*':
return
res_status = res.status
if (isinstance(status, string_types) and '*' in status):
if re.match(fnmatch.translate(status), res_status, re.I):
return
if isinstance(status, (list, tuple)):
if res.status_int not in status:
raise AppError(
"Bad response: %s (not one of %s for %s)\n%s",
res_status, ', '.join(map(str, status)),
res.request.url, res)
return
if status is None:
if res.status_int >= 200 and res.status_int < 400:
return
raise AppError(
"Bad response: %s (not 200 OK or 3xx redirect for %s)\n%s",
res_status, res.request.url,
> res)
E AppError: Bad response: 400 Bad Request (not 200 OK or 3xx redirect for http://localhost/api/clusters/28/)
E '{"message": "(TransactionRollbackError) deadlock detected\\nDETAIL: Process 25782 waits for ShareLock on transaction 307254; blocked by process 25808.\\nProcess 25808 waits for ShareLock on transaction 307256; blocked by process 25782.\\nHINT: See server log for query details.\\n \'SELECT tasks.id AS tasks_id, tasks.cluster_id AS tasks_cluster_id, tasks.uuid AS tasks_uuid, tasks.name AS tasks_name, tasks.message AS tasks_message, tasks.status AS tasks_status, tasks.progress AS tasks_progress, tasks.result AS tasks_result, tasks.parent_id AS tasks_parent_id, tasks.weight AS tasks_weight \\\\nFROM tasks \\\\nWHERE tasks.cluster_id = %(cluster_id_1)s ORDER BY tasks.id ASC FOR UPDATE\' {\'cluster_id_1\': 28}", "errors": []}'
Fix proposed to branch: master /review. openstack. org/165355
Review: https:/