]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
openstack: more robust server deletion 685/head
authorLoic Dachary <ldachary@redhat.com>
Fri, 30 Oct 2015 19:06:58 +0000 (04:06 +0900)
committerLoic Dachary <ldachary@redhat.com>
Sat, 31 Oct 2015 00:25:32 +0000 (09:25 +0900)
commitad940ab425c282e494b373298e8f83479f8ee06b
tree9957dd4f2da76dc9b86d3d504dbe82254c7f70ab
parent0f1c0680fb3aade50aeef7a350e46b0984ba1b6f
openstack: more robust server deletion

When removing a server and the volumes attached to it, the following can
happen:

  * the server goes in ERROR status instead of being deleted
  * if removed before the server is deleted, the volume may fail detach
    and consequently the deletion can fail with "still attached, detach
    volume first"
  * some volumes go in ERROR status instead of being deleted

This will cause problem when and if an instance is assigned the same IP
as an instance in ERROR state. They will both have the same name and
confuse teuthology.

Instead of assuming deletion is a reliable operation, assume it is a
best effort:

   * rename the server and volumes to REMOVE-ME
   * delete the server and then the volumes: ignore failures

The names instances and volumes in error state no longer conflict with
the name of running instances and can be dealt with at a later time,
and kept around for the cloud provider support to investigate.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
teuthology/provision.py