Bug 1540637

Summary: [Nova] [Doc patch] - Guidance for db purge prior to major version and Fast Forward Upgrade
Product: Red Hat OpenStack Reporter: Carlos Camacho <ccamacho>
Component: openstack-novaAssignee: Eoghan Glynn <eglynn>
Status: CLOSED DUPLICATE QA Contact: Joe H. Rahme <jhakimra>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: berrange, ccamacho, dasmith, eglynn, kchamart, ltamagno, mbooth, sbauza, sferdjao, sgordon, srevivo, vromanso
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: 14.0 (Rocky)Flags: ccamacho: needinfo-
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-09 14:50:22 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: 1541693    

Description Carlos Camacho 2018-01-31 15:17:47 UTC
Description of problem:

There is an information gap when running the DB's cleanup for Nova services before running a Major Upgrade on production environments.

Currently the command we run is:
   nova-manage db archive_deleted_rows --max_rows 100 --until-complete

Still, the archived rows are stored in shadow tables so we still have a big DB, also there is some specs to remove them but nothing landed/usable.

This spec shows basically the problem:

https://blueprints.launchpad.net/nova/+spec/purge-deleted-instances-cmd


- Can you clarify the process of cleaning and maintain Nova databases?

Comment 1 Matthew Booth 2018-02-01 18:08:31 UTC
(In reply to Carlos Camacho from comment #0)
> - Can you clarify the process of cleaning and maintain Nova databases?

I'm going to interpret this as a request to implement purge-deleted-instances, because if you just want information you're better asking for it on a mailing list.

Comment 2 Carlos Camacho 2018-02-02 13:24:57 UTC
Hi Matthew,

Yeah, well we will like first to know what to check before asking for the purge-delete-instances implementation.


Let's keep this BZ to track all the effort to document/implement this and I'll send an email to the mailing list.


Thanks,
Carlos.

Comment 3 Carlos Camacho 2018-02-04 15:39:30 UTC
Ok,

This is the mail thread in the mailing list[1]. Even though would be nice if you can give us information about it or reply to the thread.


[1]: http://lists.openstack.org/pipermail/openstack-dev/2018-February/126914.html


Thanks,
Carlos.

Comment 4 Dan Smith 2018-02-08 18:27:02 UTC
This has nothing to do with fast-forward upgrade that I know of, other than potentially pre-purging the database to make schema changes faster.

The general process here is to archive the db per the command you mentioned, followed by a purge of the shadow tables, which currently is only doable in SQL:

 DELETE FROM shadow_instances;

for example.

I do think we should make this an RFE and implement it though, for what its worth.

Comment 8 Dan Smith 2018-03-09 14:50:22 UTC
I'm closing this as a dupe of bz1154875, which is new DB purging functionality merged in master and to be released in OSP14.

*** This bug has been marked as a duplicate of bug 1154875 ***