Bug 1693815

Summary: [OSP13.z]nova-manage db archive_deleted_rows does not cleanup table instance_id_mappings
Product: Red Hat OpenStack Reporter: jhardee
Component: openstack-novaAssignee: Lee Yarwood <lyarwood>
Status: CLOSED ERRATA QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: dhill, jhakimra, kchamart, lyarwood, mbooth, sbauza, sgordon, vromanso
Target Milestone: asyncKeywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-nova-17.0.9-10.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1696757 (view as bug list) Environment:
Last Closed: 2019-07-10 13:01:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1696757    

Description jhardee 2019-03-28 17:02:06 UTC
Description of problem:

After running nova-manage delete_archive_logs all tables are cleaned up except instance_id_mappings.


Version-Release number of selected component (if applicable):

Openstack 10


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

Running nova-manage delete_archive_logs all tables are cleaned up except instance_id_mappings.


Expected results:

All tables are cleaned.


Additional info:

https://bugs.launchpad.net/nova/+bug/1786298
https://review.openstack.org/#/c/604373/

Comment 12 Matthew Booth 2019-07-05 12:05:56 UTC
*** Bug 1726256 has been marked as a duplicate of this bug. ***

Comment 13 Matthew Booth 2019-07-05 12:14:18 UTC
We still need a workaround to handle existing instance_id_mappings which weren't deleted with their instance. Something like:

=== WARNING, NOT TESTED! ===
update instance_id_mappings set deleted = id where uuid not in (select uuid from instances where deleted = 0);
=== WARNING, NOT TESTED! ===

Comment 15 errata-xmlrpc 2019-07-10 13:01:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1740