Add extra check to avoid double delete of instances 65/29665/5
authorCiprian Barbu <ciprian.barbu@enea.com>
Thu, 2 Mar 2017 17:27:24 +0000 (19:27 +0200)
committerCiprian Barbu <ciprian.barbu@enea.com>
Fri, 3 Mar 2017 15:24:20 +0000 (17:24 +0200)
commit430b7e154f847b0dfb99c8419a999074e175e1e7
treef82bf346dfb3988fcc6cbd7c823e8b9ac83202e6
parenta5cb507c061738a50ca358147a135a1c4498ff22
Add extra check to avoid double delete of instances

JIRA: FUNCTEST-748

Sometimes Openstack doesn't handle deletion in a timely manner which can lead
to openstack_clean to think there are leftovers from a previous test when in
fact the instances are pending deletion. This patch tries to better handle
this kind of situation that would otherwise result in a double free and
eventually <class 'nova.exception.InstanceInvalidState'> (HTTP 500)

Change-Id: Id0d9b61d8380e9b12fc7acd46cd84260714f4baf
Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
functest/tests/unit/utils/test_openstack_clean.py
functest/utils/openstack_clean.py