[Openstack-operators] Database cleanup scripts?

Arne Wiebalck Arne.Wiebalck at cern.ch
Fri Sep 2 15:20:22 UTC 2016

On 02 Sep 2016, at 17:08, Matt Fischer <matt at mattfischer.com<mailto:matt at mattfischer.com>> wrote:

On Fri, Sep 2, 2016 at 8:57 AM, Abel Lopez <alopgeek at gmail.com<mailto:alopgeek at gmail.com>> wrote:
For cinder, since kilo, we've had 'cinder-manage db purge-deleted'

This is the issue we see with this tool in Liberty, I think this might be fixed in M.

# cinder-manage db purge 365
.... (some stuff works here)

2016-09-02 15:07:02.196 203924 ERROR cinder DBReferenceError: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`cinder`.`volume_glance_metadata`, CONSTRAINT `volume_glance_metadata_ibfk_2` FOREIGN KEY (`snapshot_id`) REFERENCES `snapshots` (`id`))') [SQL: u'DELETE FROM snapshots WHERE snapshots.deleted_at < %s'] [parameters: (datetime.datetime(2015, 9, 3, 15, 7, 2, 189701),)]

I think this is fixed here: https://review.openstack.org/#/c/338228/
(which comes with Newton only).


Arne Wiebalck

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20160902/06b08b4e/attachment.html>

More information about the OpenStack-operators mailing list