Update the --max-rows parameter description for nova-manage db archive_deleted_rows

Bug #1794994 reported by Surya Seetharaman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Surya Seetharaman

Bug Description

The nova-manage db archive_deleted_rows command from Queens started archiving instance_mappings and request_specs records when moving the soft_deleted instances records to the shadow tables. However since the api tables do not have the concept of soft deletion, the instance_mapping and request_spec tables are linked to instances table while doing the archival. Hence the --max_rows parameter that is specified does not count/include the count of instance_mapping and request_spec rows that are removed. So the --verbose output of the command may not look right when the number are really large.

We need to either update the documentation saying two more records per instance record will be archived or stop showing the output of the archived tables from the API db. I guess same applies for the recent patch where we archive instance_group_members.

Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Surya Seetharaman (tssurya) wrote :

Or what needs to be done is modify the count to include the ones being archived from API tables.

Revision history for this message
Surya Seetharaman (tssurya) wrote :

While we could calculate the number based on 1:1:1 for instances:mappings:specs; we can't do the same for instance_group_members.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/606995

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
assignee: Surya Seetharaman (tssurya) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Surya Seetharaman (tssurya)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/606995
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=660f717394f946a142bba101d8486fabce814241
Submitter: Zuul
Branch: master

commit 660f717394f946a142bba101d8486fabce814241
Author: Surya Seetharaman <email address hidden>
Date: Mon Oct 1 17:21:04 2018 +0200

    Update --max-rows parameter description for archive_deleted_rows

    Since API tables do not have the concept of soft-delete, we purge
    the instance_mappings, request_specs and instance_group_member records
    of deleted instances while they are archived. The ``nova-manage db
    archive_deleted_rows`` offers a ``max-rows`` parameter which actually
    means the batch size of the iteration for moving the soft-deleted
    records from table to their shadow-tables. So this patch clarifies
    that the batch size does not include the API table records that are
    purged so that the users are not confused by the ``--verbose`` output
    of the command giving more rows than specified.

    Change-Id: I652854c7192b996a33ed343a51a0fd8c7620e876
    Closes-Bug: #1794994

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.