# Murano Environment Stuck in "Deleting" Status

## Problem

* A Murano environment is stuck in a "deleting" status.

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

```bash
$ openstack environment show MuranoTest -c name -c status
+------------------+----------------------------------+
| Field            | Value                            |
+------------------+----------------------------------+
| id               | 868d8d6356974db5b5e6d6588a8c527e |
| name             | MuranoTest                       |
| status           | deleting                         |
+------------------+----------------------------------+
```

{% endtab %}
{% endtabs %}

* After some time, the environment is shown to be in a "delete failure" status.

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

```bash
$ openstack environment show MuranoTest -c name -c status
+------------------+----------------------------------+
| Field            | Value                            |
+------------------+----------------------------------+
| id               | 868d8d6356974db5b5e6d6588a8c527e |
|name              | MuranoTest                       |
| status           | delete failure                   |
+------------------+----------------------------------+
```

{% endtab %}
{% endtabs %}

* The underlying Heat stack and its associated resources still exist.
* In */var/log/murano/murano-engine.log* (on the Platform9 Management Plane), the following is observed.

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

```none
DEBUG murano.engine.package_loader [-] There are no packages matching filter {'catalog': True, 'version': [u'eq:0.0.0'], 'fqn': u'io.murano.apps.generated.[PACKAGE_NAME]'} _get_definition /opt/pf9/murano/lib/python2.7/site-packages/murano/engine/package_loader.py:211...ERROR murano.common.engine NoPackageFound: Package "io.murano.apps.generated.[PACKAGE_NAME]" is not found
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed OpenStack - v3.8.0 and Higher
* Murano
* Heat

## Cause

The underlying package and/or the particular version of that package which was leveraged for environment creation no longer exists; the package was either deleted, or a newer version has been uploaded.

## Resolution

1. Abandon the Murano environment.

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

```bash
$ openstack environment delete --abandon [NAME/UUID]
```

{% endtab %}
{% endtabs %}

2. List all nested resources for the associated Heat stack.

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

```bash
$ openstack stack resource list -n 5 [NAME/UUID]
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Note**

The stack name typically corresponds to the name of the Murano environment. For further guidance, please reference [Identifying Heat Stack Associated with Murano Environment](https://support.platform9.com/hc/en-us/articles/360042869974).
{% endhint %}

3. Delete the Heat stack.

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

```bash
$ openstack stack delete [NAME/UUID]
```

{% endtab %}
{% endtabs %}

4. Confirm that the Heat stack was successfully deleted along with its associated resources.

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

```bash
$ openstack stack show [NAME/UUID] -c stack_status
$ openstack stack resource list -n 5 [NAME/UUID]
```

{% endtab %}
{% endtabs %}

**Example:**

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

```bash
$ openstack stack show 868d8d6356974db5b5e6d6588a8c527e -c stack_status
| stack_status | DELETE_COMPLETE
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Note**

The resource list should return no results if all resources have successfully been deleted.
{% endhint %}

5. Confirm that the Murano environment was successfully deleted.

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

```bash
$ openstack environment show [NAME/UUID]
```

{% endtab %}
{% endtabs %}

## Additional Information

* [Platform9 - Murano Overview](https://docs.platform9.com/openstack/automation/murano/)
* [OpenStack Docs: Installing the OpenStack command-line Clients](https://docs.openstack.org/newton/user-guide/common/cli-install-openstack-command-line-clients.html)
