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:

Volume show output
Copy

Diagnostics

In the cindervolume-base.log within the location /var/log/pf9/ in the cinder host, below errors can be seen:

Cinder host
Copy

The fdisk output will be having osprober results for the specific affected volume in the cinder host:

Cinder host
Copy

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:

  1. Update GRUB_DISABLE_OS_PROBER=true in the file /etc/default/grub .
  2. Perform grub update using the command: update-grub
  3. Set the volume status detached in Cinder : # cinder reset-state <volume ID> --state available --attach-status detached
  4. Now 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:

Command
Copy

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.

Command
Copy

After the above change, the user should be able to delete the volume directly.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard