Unable to Force Delete Volume Snapshot

Problem

Unable to delete a volume snapshot as it is stuck in the "Creating" state.

# openstack volume snapshot delete [snapshot-uuid]Failed to delete snapshot with name or ID '[snapshot-uuid]': Invalid snapshot: Snapshot status must be available or error and must not be part of a group. (HTTP 400) (Request-ID: [req-id])1 of 1 snapshots failed to delete.

Trying to delete the snapshot with the "--force" option throws the following error:

# openstack volume snapshot delete --force [snapshot-uuid]Failed to delete snapshot with name or ID '[snapshot-uuid]': Policy doesn't allow volume_extension:snapshot_admin_actions:force_delete to be performed. (HTTP 403) (Request-ID: [req-id])1 of 1 snapshots failed to delete.

Environment

  • Platform9 Managed OpenStack - All Versions

  • Cinder

Cause

The user account running the commands above is a Self Service user and does not have the admin role associated with the project. This may be verified by an administrator using the following command:

# openstack role assignment list --user [UUID or USERNAME] --names
Sample Output:+----------+--------------------------------+-------+--------------+--------+--------+-----------+| Role     | User         | Group | Project      | Domain | System | Inherited |+----------+--------------------------------+-------+--------------+--------+--------+-----------+| _member_ | user@Default |       | PROJ@Default |        |        | False |+----------+--------------------------------+-------+--------------+--------+--------+-----------+

Resolution

  1. Add the admin role to the account being used to delete the snapshot the following command:

  1. Run the below command to delete the snapshot using an admin user account or the user with an admin role defined for the project in which the volume resides.

Additional Information

Openstack CLI Documentation for Snapshots.arrow-up-right

Last updated