Comment 2 for bug 1624363

Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on MOS 7.0 + MU6 updates.

Before updates:
Command 'nova-manage db archive_deleted_rows --max_rows 10' doesn't archive any table:

mysql> select id,instance_uuid,action,message,deleted from nova.instance_actions;
+----+--------------------------------------+--------+---------+---------+
| id | instance_uuid | action | message | deleted |
+----+--------------------------------------+--------+---------+---------+
| 1 | 15906abe-7443-427a-88b9-5f8dbe9e3046 | create | NULL | 0 |
| 2 | 15906abe-7443-427a-88b9-5f8dbe9e3046 | delete | NULL | 0 |
+----+--------------------------------------+--------+---------+---------+
2 rows in set (0.00 sec)

mysql> select id,created_at,deleted_at,event,deleted from nova.instance_actions_events;
+----+---------------------+------------+------------------------------------+---------+
| id | created_at | deleted_at | event | deleted |
+----+---------------------+------------+------------------------------------+---------+
| 1 | 2016-10-19 07:50:09 | NULL | compute__do_build_and_run_instance | 0 |
| 2 | 2016-10-19 07:50:49 | NULL | compute_terminate_instance | 0 |
+----+---------------------+------------+------------------------------------+---------+

After updates:
Command 'nova-manage db archive_deleted_rows --max_rows 10' archive at least tables without foreign key constraint issue:

mysql> select id,instance_uuid,action,message,deleted from nova.instance_actions;
Empty set (0.00 sec)

mysql> select id,created_at,deleted_at,event,deleted from nova.instance_actions_events;
Empty set (0.00 sec)