Error in db archiver

Bug #1790750 reported by Sam Morrison
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Sam Morrison
Ocata
Fix Committed
Medium
Sam Morrison
Pike
Fix Committed
Medium
Sam Morrison
Queens
Fix Committed
Medium
Sam Morrison
Rocky
Fix Committed
Medium
Sam Morrison

Bug Description

Getting the following error when running the db archiver:

An error has occurred:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nova/cmd/manage.py", line 1691, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/cmd/manage.py", line 704, in archive_deleted_rows
    run = db.archive_deleted_rows(max_rows, before=before_date)
  File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 2049, in archive_deleted_rows
    return IMPL.archive_deleted_rows(max_rows=max_rows, before=before)
  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 6577, in archive_deleted_rows
    before=before)
  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 6541, in _archive_deleted_rows_for_table
    conn, limit, before)
  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 6436, in _archive_if_instance_deleted
    {'table': table.__tablename__,
AttributeError: 'Table' object has no attribute '__tablename__'

Tags: db nova-manage
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/599878

Changed in nova:
assignee: nobody → Sam Morrison (sorrison)
status: New → In Progress
Matt Riedemann (mriedem)
tags: added: db nova-manage
Revision history for this message
Sam Morrison (sorrison) wrote :

No sqlalchamy expert but using table.name produced the correct name and worked.

Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/599881

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/599882

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/599883

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/599885

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

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

commit d0657f4acf30f77ae978bf95a9d7ce76fe97a56c
Author: Sam Morrison <email address hidden>
Date: Wed Sep 5 11:03:48 2018 +1000

    Fix DB archiver AttributeError due to wrong table name attribute used

    Change-Id: I658a12b3672eb8b1e97522259e9a212b3e6ab161
    Closes-bug: #1790750

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/rocky)

Reviewed: https://review.openstack.org/599881
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c09190996923449f4a64905d696c5b7e92841d3b
Submitter: Zuul
Branch: stable/rocky

commit c09190996923449f4a64905d696c5b7e92841d3b
Author: Sam Morrison <email address hidden>
Date: Wed Sep 5 11:03:48 2018 +1000

    Fix DB archiver AttributeError due to wrong table name attribute used

    Change-Id: I658a12b3672eb8b1e97522259e9a212b3e6ab161
    Closes-bug: #1790750
    (cherry picked from commit d0657f4acf30f77ae978bf95a9d7ce76fe97a56c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.openstack.org/599882
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c6960e8acc6892c75811625091ce4cdf4024c464
Submitter: Zuul
Branch: stable/queens

commit c6960e8acc6892c75811625091ce4cdf4024c464
Author: Sam Morrison <email address hidden>
Date: Wed Sep 5 11:03:48 2018 +1000

    Fix DB archiver AttributeError due to wrong table name attribute used

    Change-Id: I658a12b3672eb8b1e97522259e9a212b3e6ab161
    Closes-bug: #1790750
    (cherry picked from commit d0657f4acf30f77ae978bf95a9d7ce76fe97a56c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/pike)

Reviewed: https://review.openstack.org/599883
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=37722c7f4f6df433489a62a19c318dceb4739d08
Submitter: Zuul
Branch: stable/pike

commit 37722c7f4f6df433489a62a19c318dceb4739d08
Author: Sam Morrison <email address hidden>
Date: Wed Sep 5 11:03:48 2018 +1000

    Fix DB archiver AttributeError due to wrong table name attribute used

    Change-Id: I658a12b3672eb8b1e97522259e9a212b3e6ab161
    Closes-bug: #1790750
    (cherry picked from commit d0657f4acf30f77ae978bf95a9d7ce76fe97a56c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.1.5

This issue was fixed in the openstack/nova 16.1.5 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.6

This issue was fixed in the openstack/nova 17.0.6 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.1

This issue was fixed in the openstack/nova 18.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ocata)

Reviewed: https://review.openstack.org/599885
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c59453bf84cb49f8bb2c7d08af2c8355bb5b8ad2
Submitter: Zuul
Branch: stable/ocata

commit c59453bf84cb49f8bb2c7d08af2c8355bb5b8ad2
Author: Sam Morrison <email address hidden>
Date: Wed Sep 5 11:03:48 2018 +1000

    Fix DB archiver AttributeError due to wrong table name attribute used

    Change-Id: I658a12b3672eb8b1e97522259e9a212b3e6ab161
    Closes-bug: #1790750
    (cherry picked from commit d0657f4acf30f77ae978bf95a9d7ce76fe97a56c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.1.5

This issue was fixed in the openstack/nova 15.1.5 release.

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.