Sometimes it happens that stack delete fails. I think there is such problem that subnet is tried to be deleted before all its ports have been deleted. With same template delete sometimes work - sometimes not. This happens even if DependsOn has been set between port-subnet-network resources.
2013-06-28 16:42:32.036 22788 ERROR heat.engine.resource [-] Delete Subnet "public-subnet"
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource Traceback (most recent call last):
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat-2013.1.1.a1.g6ed78c2-py2.7.egg/heat/engine/resource.py", line 413, in delete
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource self.handle_delete()
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat-2013.1.1.a1.g6ed78c2-py2.7.egg/heat/engine/resources/quantum/subnet.py", line 65, in handle_delete
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource raise ex
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource QuantumClientException: Unable to complete operation on subnet c3f40080-c66b-42d0-a7fa-82a29185f90e. One or more ports have an IP allocation from this subnet.
2013-06-28 16:42:32.036 22788 TRACE heat.engine.resource
2013-06-28 16:42:32.457 22788 ERROR heat.engine.parser [-] Failed to delete Subnet "public-subnet" error: Unable to complete operation on subnet c3f40080-c66b-42d0-a7fa-82a29185f90e. One or more ports have an IP allocation from this subnet.
used release: grizzly