# Unable to Force Delete Volume Snapshot

## Problem

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

{% tabs %}
{% tab title="None" %}

```none
# 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.
```

{% endtab %}
{% endtabs %}

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

{% tabs %}
{% tab title="None" %}

```none
# 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.
```

{% endtab %}
{% endtabs %}

## 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:

{% tabs %}
{% tab title="None" %}

```none
# openstack role assignment list --user [UUID or USERNAME] --names
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="None" %}

```none
Sample Output:+----------+--------------------------------+-------+--------------+--------+--------+-----------+| Role     | User         | Group | Project      | Domain | System | Inherited |+----------+--------------------------------+-------+--------------+--------+--------+-----------+| _member_ | user@Default |       | PROJ@Default |        |        | False |+----------+--------------------------------+-------+--------------+--------+--------+-----------+
```

{% endtab %}
{% endtabs %}

## Resolution

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

{% tabs %}
{% tab title="None" %}

```none
$ openstack role add --user [USER_NAME] --project [PROJECT_NAME] ROLE_NAME
```

{% endtab %}
{% endtabs %}

2. 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.

{% tabs %}
{% tab title="None" %}

```none
$ openstack volume snapshot delete [snapshot-uuid]
```

{% endtab %}
{% endtabs %}

## Additional Information

[Openstack CLI Documentation for Snapshots.](https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/volume-snapshot.html#volume-snapshot-set)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmo/solution/unable-to-force-delete-volume-snapshot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
