Bug 1721068
| Summary: | allocations database is not properly cleaned | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Eduard Barrera <ebarrera> |
| Component: | openstack-nova | Assignee: | Sylvain Bauza <sbauza> |
| Status: | CLOSED ERRATA | QA Contact: | Paras Babbar <pbabbar> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 13.0 (Queens) | CC: | akaris, bbowen, cgaynor, chrisbro, dasmith, eglynn, igarciam, jhakimra, jhardee, jthomas, kchamart, lyarwood, mbooth, pbabbar, rdiwakar, rsunog, sbauza, sgordon, stephenfin, tvainio, vcojot |
| Target Milestone: | z13 | Keywords: | Triaged, ZStream |
| Target Release: | 13.0 (Queens) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openstack-nova-17.0.13-16.el7ost | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-10-28 18:32:07 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: | |||
|
Description
Eduard Barrera
2019-06-17 09:08:09 UTC
There are multiple concerns in this RFE, all of them relating to the Placement DB. I'll try to summarize : 1/ the 'request_specs' DB record related to an instance UUID is not deleted when the instance is itself deleted. That's a known behaviour and discussed with the community where some operators wanted to keep the original request even if the instance is deleted. That said, starting with Queens (and backported to Pike), archiving instances is now deleting corresponding instance_mapping and request_spec records [1]. For your case, just run the "nova-manage db archive_deleted_rows" command (since OSP13 == Queens) and you should see corresponding request_specs records be deleted. 2/ the 'consumers' DB record related to an instance UUID is not deleted when the instance is itself deleted. That's not really how it works. Consumer records are deleted when there are no left allocations against them. That's done by [2] but this is only Rocky code and newer releases. Fixing this would require both a backport to Queens/OSP13 and some SQL call for only deleting 'consumers' records not related to existing allocations. 3/ the 'allocations DB records (there are many per instance) related to an instance UUID are not deleted when a instance is deleted. That sounds a bug to me but there could be many possibilities why it doesn't work. Could you please reply to me with some private comment about telling me whether those existing allocations are against instance UUIDs *or* migration UUIDs (ie. from the 'migrations' table records with the UUID field) ? Ideally, I'd also see some allocations records, please. We could possibly have a problem that is actually fixed by [3] but even if this change was recently merged, it's neither in a release nor packaged yet. 1/ and 2/ aren't root cause of the capacity issue you mention and can be purged anytime you want. 3/ requires some help hence the NEEDINFO. Thanks. -Sylvain [1] https://review.opendev.org/#/c/515034/ [2] https://review.opendev.org/#/c/581086/ [3] https://review.opendev.org/#/c/661349/ *** Bug 1749077 has been marked as a duplicate of this bug. *** The patch [1] is currently waiting for reviews with already one acception (+2). I already asked other core folks to look at my change, some of them told me they will do it for this week. [1] https://review.opendev.org/#/c/670112/ > Customer's question ss how do I correlate between a provider allocation and an instance (by uuid, name or any other unique key )? If I can't do that I'll have no way of knowing which allocations can be deleted. Take into account that I > have hundreds of VMs running with probably thousands of allocations in place. Yeah, by looking at the customer_uuid indeed for each allocation. 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 (openstack-nova bug fix 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-2020:4393 |