How to Delete a Murano Environment Stuck in "Deleting" Status

Problem

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

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

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

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

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.

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

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

Abandon the Murano environment.

$ openstack environment delete --abandon <NAME/UUID>

List all nested resources for the associated Heat stack.

$ openstack stack resource list -n 5 <NAME/UUID>

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.

Delete the Heat stack.

$ openstack stack delete <NAME/UUID>

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

$ openstack stack show <NAME/UUID> -c stack_status
$ openstack stack resource list -n 5 <NAME/UUID>

Example:

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

Note: The resource list should return no results if all resources have successfully been deleted.

Confirm that the Murano environment was successfully deleted.

$ openstack environment show <NAME/UUID>

Additional Information

[Platform9 - Murano Overview](https://docs.platform9.com/openstack/appcatalog/concepts)