Removed duplicate mark to upstream nova bug https://bugs.launchpad.net/nova/+bug/1183523. Targeted to 7.0-mu-6 and 8.0-updates. Invalid for 9.1 as there is fix to stable/mitaka which was consumed via sync.
** Changed in: mos Status: New => Confirmed ** Changed in: mos Milestone: 7.0-mu-4 => 7.0-mu-6 ** Changed in: mos Assignee: Nova (nova) => MOS Maintenance (mos-maintenance) ** This bug is no longer a duplicate of bug 1183523 db-archiving fails to clear some deleted rows from instances table ** Also affects: mos/9.x Importance: High Assignee: MOS Maintenance (mos-maintenance) Status: Confirmed ** Also affects: mos/7.0.x Importance: Undecided Status: New ** Also affects: mos/8.0.x Importance: Undecided Status: New ** Changed in: mos/7.0.x Status: New => Confirmed ** Changed in: mos/8.0.x Status: New => Confirmed ** Changed in: mos/7.0.x Importance: Undecided => High ** Changed in: mos/8.0.x Importance: Undecided => High ** Changed in: mos/8.0.x Assignee: (unassigned) => MOS Maintenance (mos-maintenance) ** Changed in: mos/7.0.x Assignee: (unassigned) => MOS Maintenance (mos-maintenance) ** Changed in: mos/7.0.x Milestone: None => 7.0-mu-6 ** Changed in: mos/8.0.x Milestone: None => 8.0-updates ** Changed in: mos/9.x Milestone: 7.0-mu-6 => 9.1 ** Changed in: mos/9.x Status: Confirmed => Invalid -- You received this bug notification because you are a member of Nova, which is a bug assignee. https://bugs.launchpad.net/bugs/1562863 Title: The command "nova-manage db archive_deleted_rows" doesn't move the entries to the shadow tables. Status in Mirantis OpenStack: Invalid Status in Mirantis OpenStack 7.0.x series: Confirmed Status in Mirantis OpenStack 8.0.x series: Confirmed Status in Mirantis OpenStack 9.x series: Invalid Bug description: Once an instance is deleted from the cloud its entry in the database is still present. When trying to archive some number of deleted rows with "nova-manage db archive_deleted_rows --max-rows 1", a constraint error is displayed in nova logs. Expected results: Specified deleted rows number should be moved from production tables to shadow tables. Actual result: db-archiving fails to archive specified number of deleted rows with "nova-manage db archive_deleted_rows --max-rows 1", a constraint error is displayed in nova logs: 2016-03-28 12:31:43.751 14147 ERROR oslo_db.sqlalchemy.exc_filters [req-0fd152a6-b298-4c3c-9aa7-ebdadc752b89 - - - - -] DBAPIError exception wrapped from (IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`nova`.`block_device_mapping`, CONSTRAINT `block_device_mapping_instance_uuid_fkey` FOREIGN KEY (`instance_uuid`) REFERENCES `instances` (`uuid`))') 'DELETE FROM instances WHERE instances.id in (SELECT T1.id FROM (SELECT instances.id \nFROM instances \nWHERE instances.deleted != %s ORDER BY instances.id \n LIMIT %s) as T1)' (0, 1) 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last): 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters context) 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters) 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 205, in execute 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters self.errorhandler(self, exc, value) 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters raise errorclass, errorvalue 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters IntegrityError: (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`nova`.`block_device_mapping`, CONSTRAINT `block_device_mapping_instance_uuid_fkey` FOREIGN KEY (`instance_uuid`) REFERENCES `instances` (`uuid`))') 2016-03-28 12:31:43.751 14147 TRACE oslo_db.sqlalchemy.exc_filters 2016-03-28 12:31:43.753 14147 WARNING nova.db.sqlalchemy.api [req-0fd152a6-b298-4c3c-9aa7-ebdadc752b89 - - - - -] IntegrityError detected when archiving table instances Steps to reproduce: 1) create instance 2) delete instance 3) run command 'nova-manage db archive_deleted_rows --max_rows 1' Description of the environment: MOS: 7.0 OS: Ubuntu 14.04 Reference architecture: HA Network model: Neutron VLAN To manage notifications about this bug go to: https://bugs.launchpad.net/mos/+bug/1562863/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp