Comment 4 for bug 1671354

Revision history for this message
Christoph Fiehe (fiehe) wrote :

Yes, it fails with the same error. The script always outputs:

$ cinder-manage db purge 1
Purge command failed, check cinder-manage logs for more details.
$ cinder-manage db purge 1
Purge command failed, check cinder-manage logs for more details.
$ cinder-manage db purge 1
Purge command failed, check cinder-manage logs for more details.

cinder-manage.log:
2017-03-27 09:34:42.849 19936 ERROR cinder.db.sqlalchemy.api [req-e2add18d-a771-4ad8-a94d-e1fad2d7f65c - - - - -] DBError detected when purging from volumes: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`cinder`.`volume_admin_metadata`, CONSTRAINT `volume_admin_metadata_ibfk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`))') [SQL: u'DELETE FROM volumes WHERE volumes.deleted_at < %(deleted_at_1)s'] [parameters: {u'deleted_at_1': datetime.datetime(2017, 3, 26, 7, 34, 42, 760396)}].
2017-03-27 09:36:32.461 20388 ERROR cinder.db.sqlalchemy.api [req-b75547eb-42cc-4d86-9e22-3d071e236318 - - - - -] DBError detected when purging from volumes: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`cinder`.`volume_admin_metadata`, CONSTRAINT `volume_admin_metadata_ibfk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`))') [SQL: u'DELETE FROM volumes WHERE volumes.deleted_at < %(deleted_at_1)s'] [parameters: {u'deleted_at_1': datetime.datetime(2017, 3, 26, 7, 36, 32, 430066)}].
2017-03-27 09:36:37.376 20413 ERROR cinder.db.sqlalchemy.api [req-75dfee8e-48f7-44a2-b660-0b9e3137dd59 - - - - -] DBError detected when purging from volumes: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`cinder`.`volume_admin_metadata`, CONSTRAINT `volume_admin_metadata_ibfk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`))') [SQL: u'DELETE FROM volumes WHERE volumes.deleted_at < %(deleted_at_1)s'] [parameters: {u'deleted_at_1': datetime.datetime(2017, 3, 26, 7, 36, 37, 305832)}].