Files
nova/releasenotes/notes/delete-dangling-volumes-2615100187fe29fb.yaml
Amit Uniyal 9d5935d007 Delete dangling bdms
On reboot, check the instance volume status on the cinder side.
Verify if volume exists and cinder has an attachment ID, else
delete its BDMS data from nova DB and vice versa.

Updated existing test cases to use CinderFixture while rebooting as
reboot calls get_all_attachments

Implements: blueprint https://blueprints.launchpad.net/nova/+spec/cleanup-dangling-volume-attachments
Closes-Bug: 2019078

Change-Id: Ieb619d4bfe0a6472aefb118b58283d7ad8d24c29
2023-08-31 14:19:58 +00:00

25 lines
1.1 KiB
YAML

---
features:
- |
This change ensures the synchronization of volume attachments
between Nova and Cinder, by deleting any dangling volume attachments
and maintaining consistency between two databases.
Block device mapping (BDM) table in the Nova database, stores
information about volume attachments, image attachments
and swap attachments. Similarly, each volume attachment had a
corresponding entry in the Cinder database volume attachment table.
With this change, on instance reboot, Nova will checks for all volume
attachments associated with the instance and verifies their availability
in the Cinder database. If attachments are not found they will get deleted
from Nova database too.
After Nova database cleanup, similarly Cinder database is checked for
attachments related to instance. If attachments found in Cinder DB that
are not present in Nova DB, they will get deleted from Cinder databse.
See `spec`__ for more details.
__ https://specs.openstack.org/openstack/nova-specs/specs/2023.2/approved/cleanup-dangling-volume-attachments.html