Move and update test_resize_volume_backed_server_confirm
There is a bug in nova where the libvirt driver incorrectly removes
the local guest files for the hypervisor from shared storage because
it does not realize the instance is volume-backed. Nova runs an NFS
CI job in the experimental queue but it's not failing on resize
tests because they aren't volume-backed, so to recreate the failure
and make sure we don't regress the fix, this test is added. Nova
also runs a Ceph job which applies here too.
This moves the existing scenario test to be a compute API test. The
test ID is maintained in case people are blacklisting it, but the
slow tag is dropped because it's not a particularly slow test and
if the slow tag is applied, it won't actually be run in the jobs
that we care about testing this, e.g. NFS and Ceph jobs.
The additional wrinkle of getting the console log after the resize
is what shows the failure when the bug is not fixed, so that's added
here.
Depends-On: I29fac80d08baf64bf69e54cf673e55123174de2a
Change-Id: Id7de5186b2ea0ff7af86d9950c69203914498d88
Related-Bug: #1728603
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index aa06ae8..bce7524 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -315,6 +315,22 @@
def test_resize_server_confirm(self):
self._test_resize_server_confirm(self.server_id, stop=False)
+ @decorators.idempotent_id('e6c28180-7454-4b59-b188-0257af08a63b')
+ @decorators.related_bug('1728603')
+ @testtools.skipUnless(CONF.compute_feature_enabled.resize,
+ 'Resize not available.')
+ @utils.services('volume')
+ def test_resize_volume_backed_server_confirm(self):
+ # We have to create a new server that is volume-backed since the one
+ # from setUp is not volume-backed.
+ server = self.create_test_server(
+ volume_backed=True, wait_until='ACTIVE')
+ self._test_resize_server_confirm(server['id'])
+ # Now do something interactive with the guest like get its console
+ # output; we don't actually care about the output, just that it doesn't
+ # raise an error.
+ self.client.get_console_output(server['id'])
+
@decorators.idempotent_id('138b131d-66df-48c9-a171-64f45eb92962')
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
'Resize not available.')
diff --git a/tempest/scenario/test_server_advanced_ops.py b/tempest/scenario/test_server_advanced_ops.py
index d4f29ad..89b9fdd 100644
--- a/tempest/scenario/test_server_advanced_ops.py
+++ b/tempest/scenario/test_server_advanced_ops.py
@@ -42,28 +42,6 @@
super(TestServerAdvancedOps, cls).setup_credentials()
@decorators.attr(type='slow')
- @decorators.idempotent_id('e6c28180-7454-4b59-b188-0257af08a63b')
- @testtools.skipUnless(CONF.compute_feature_enabled.resize,
- 'Resize is not available.')
- @utils.services('compute', 'volume')
- def test_resize_volume_backed_server_confirm(self):
- # We create an instance for use in this test
- instance = self.create_server(volume_backed=True)
- instance_id = instance['id']
- resize_flavor = CONF.compute.flavor_ref_alt
- LOG.debug("Resizing instance %s from flavor %s to flavor %s",
- instance['id'], instance['flavor']['id'], resize_flavor)
- self.servers_client.resize_server(instance_id, resize_flavor)
- waiters.wait_for_server_status(self.servers_client, instance_id,
- 'VERIFY_RESIZE')
-
- LOG.debug("Confirming resize of instance %s", instance_id)
- self.servers_client.confirm_resize_server(instance_id)
-
- waiters.wait_for_server_status(self.servers_client, instance_id,
- 'ACTIVE')
-
- @decorators.attr(type='slow')
@decorators.idempotent_id('949da7d5-72c8-4808-8802-e3d70df98e2c')
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
'Suspend is not available.')