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)
Verified on MOS 7.0 + MU6 updates.
Before updates: deleted_ rows --max_rows 10' doesn't archive any table:
Command 'nova-manage db archive_
mysql> select id,instance_ uuid,action, message, deleted from nova.instance_ actions; ------- ------- ------- ------- ------- --+---- ----+-- ------- +------ ---+ ------- ------- ------- ------- ------- --+---- ----+-- ------- +------ ---+ 7443-427a- 88b9-5f8dbe9e30 46 | create | NULL | 0 | 7443-427a- 88b9-5f8dbe9e30 46 | delete | NULL | 0 | ------- ------- ------- ------- ------- --+---- ----+-- ------- +------ ---+
+----+-
| id | instance_uuid | action | message | deleted |
+----+-
| 1 | 15906abe-
| 2 | 15906abe-
+----+-
2 rows in set (0.00 sec)
mysql> select id,created_ at,deleted_ at,event, deleted from nova.instance_ actions_ events; ------- ------- ------+ ------- -----+- ------- ------- ------- ------- ------- +------ ---+ ------- ------- ------+ ------- -----+- ------- ------- ------- ------- ------- +------ ---+ _do_build_ and_run_ instance | 0 | terminate_ instance | 0 | ------- ------- ------+ ------- -----+- ------- ------- ------- ------- ------- +------ ---+
+----+-
| id | created_at | deleted_at | event | deleted |
+----+-
| 1 | 2016-10-19 07:50:09 | NULL | compute_
| 2 | 2016-10-19 07:50:49 | NULL | compute_
+----+-
After updates: deleted_ rows --max_rows 10' archive at least tables without foreign key constraint issue:
Command 'nova-manage db archive_
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)