[Openstack-operators] Database cleanup scripts?

Kostiantyn.Volenbovskyi at swisscom.com Kostiantyn.Volenbovskyi at swisscom.com
Tue Sep 20 13:11:25 UTC 2016

> >
> If someone can backport that to stable/mitaka I'll +2 it. It's not a clean backport
> to mitaka.
> There are also archive scripts in the osops repo here:
> http://git.openstack.org/cgit/openstack/osops-tools-
> generic/tree/nova/openstack_db_archive.sh
> I haven't used ^ personally, but I know it was written because the archive scripts
> in nova-manage were broken until a couple of releases back where we fixed the
> FKey issue.
> We're still working on getting a purge instances nova-manage command in
> ocata (don't archive, straight up delete).
Hi Matt,everyone

I think you mean [1] and [2]. But could you comment on comment of Sergii Rizvan (srizvan) in [3] ("archiving tables like 'instances' still fails'):
"The patches from upstream [1], [2] provide only partial fix of the original issue. Before applying patches the command "nova-manage db archive_deleted_rows" doesn't move the entries to the shadow tables at all because of foreign key constraint issue. After applying patch [1] nova-manage firstly process tables that don't have foreign keys. Patch [2] fixes issue with archiving instance_actions and instance_actions_event. And after applying those two patches we are able to archive some tables, but archiving tables with foreign key constraint issue, like 'instances', still fails."

[1] https://review.openstack.org/#/c/246635/

[2] https://review.openstack.org/#/c/326730/

[3] https://bugs.launchpad.net/mos/+bug/1562863/comments/6 



> --
> Thanks,
> Matt Riedemann
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

More information about the OpenStack-operators mailing list