Comment 0 for bug 1782328

Revision history for this message
Krzysztof Pawlowski (krzysztof.pawlowski) wrote :

Description
===========
nova-manage db archive_deleted_rows crash during processing of `nova.tags` table because table do not have `id` column.

Steps to reproduce
==================
Execute: nova-manage db archive_deleted_rows

Expected result
===============
Successful execution with summary:

+-----------------+-------------------------+
| Table | Number of Rows Archived |
+-----------------+-------------------------+
| agent_builds | 12 |
| floating_ips | 12 |
| instance_groups | 7 |
| instance_types | 6 |
| key_pairs | 44242 |
+-----------------+-------------------------+

Actual result
=============
An error has occurred:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1644, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 532, in archive_deleted_rows
    run, deleted_instance_uuids = db.archive_deleted_rows(max_rows)
  File "/usr/lib/python2.7/site-packages/nova/db/api.py", line 2018, in archive_deleted_rows
    return IMPL.archive_deleted_rows(max_rows=max_rows)
  File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 6233, in archive_deleted_rows
    tablename, max_rows=max_rows - total_rows_archived)
  File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 6116, in _archive_deleted_rows_for_table
    column = table.c.id
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/_collections.py", line 212, in __getattr__
    raise AttributeError(key)
AttributeError: id

Environment
===========
Openstack Queens release:
openstack-nova-conductor-17.0.5-1.el7.noarch
openstack-nova-scheduler-17.0.5-1.el7.noarch
openstack-nova-api-17.0.5-1.el7.noarch
openstack-nova-placement-api-17.0.5-1.el7.noarch
openstack-nova-novncproxy-17.0.5-1.el7.noarch
openstack-nova-console-17.0.5-1.el7.noarch
openstack-nova-common-17.0.5-1.el7.noarch