Volume Stuck in "Error-Deleting" State due to ISCSI Errors
Problem
In the Openstack environments having ISCSI as a backend storage solution, the volumes deletion is stuck in "error deleting" state.
The volume status:
Diagnostics
In the cindervolume-base.log within the location /var/log/pf9/ in the cinder host, below errors can be seen:
The fdisk output will be having osprober results for the specific affected volume in the cinder host:
Environment
Platform9 Managed OpenStack - v5.10 and Higher
Cause
When os-prober is enabled, the grub-update process utilizes grub-mount to scan devices for operating systems and potentially adds them to the boot menu. However, in some cases, grub-update fails to unmount these devices, leading to potential issues.
The grub-update process is automatically triggered when a new kernel is installed, which can occur during routine or automatic security updates. If os-prober remains enabled, it may cause unwanted behavior due to its mounting and unmounting process.
Solution
Steps the delete volumes in "error-deleting" status are:
Update
GRUB_DISABLE_OS_PROBER=truein the file/etc/default/grub.Perform grub update using the command:
update-grubSet the volume status detached in Cinder :
# cinder reset-state <volume ID> --state available --attach-status detachedNow delete the volume using:
# cinder delete <volume ID>
Validation
Once the volume is deleted, the volume show ouput should mention the volume does not exist:
Additional Information
From the error it indicates that the Cinder service is unable to delete the volume:
And, if the manual deletion of the ISCSI target is also failing, this is an issue specific to the underlying storage. It is recommended to fix the underlying storage-related issues with the ISCSI vendors to prevent recurring volume deletion failures from the Openstack side.
As a workaround to unblock the volume deletion within Openstack, please reach out to the Platform9 support team, where the affected volumes will be removed from the backend database manually by the Platform9 support team using below command.
After the above change, the user should be able to delete the volume directly.
