Properly preserve trace on error during wait

This commit starts using save_and_rereraise_exception from oslo
excutils when handling an server ERROR state during a wait loop.
Previously, if the wait loop in the common api create_server method
caught a BuildErrorException it attempts to do some final processing
and cleanup around that server. However, doing this interferes with
the trace output from the failure and only would show the subsequent
re-raise as the stack trace. This commit avoids that but using the
oslo method to get around this.

Change-Id: I62193af963020311d5ed90a847c9764faff3e4c2
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 7e9fe92..c7844a7 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -19,6 +19,7 @@
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
+from tempest.openstack.common import excutils
 from tempest.openstack.common import log as logging
 import tempest.test
 
@@ -242,15 +243,16 @@
                 try:
                     cls.servers_client.wait_for_server_status(
                         server['id'], kwargs['wait_until'])
-                except Exception as ex:
-                    if ('preserve_server_on_error' not in kwargs
-                        or kwargs['preserve_server_on_error'] is False):
-                        for server in servers:
-                            try:
-                                cls.servers_client.delete_server(server['id'])
-                            except Exception:
-                                pass
-                    raise ex
+                except Exception:
+                    with excutils.save_and_reraise_exception():
+                        if ('preserve_server_on_error' not in kwargs
+                            or kwargs['preserve_server_on_error'] is False):
+                            for server in servers:
+                                try:
+                                    cls.servers_client.delete_server(
+                                        server['id'])
+                                except Exception:
+                                    pass
 
         cls.servers.extend(servers)