This tests that an instance can still boot after a volume retype with
migration across backends.
Note: The TestVolumeMigrateRetypeAttached tests only run if there are
multiple backends configured in CINDER_ENABLED_BACKENDS.
Related-Bug: #2019190
Change-Id: Ia88375dd08e0ba2c897fb37c312ef69dab3d001e
This is change for the volume scenario test to
skip them early.
When we skip the test class using skip_checks(), it check
the conditions and skip the test class at first step
without creating any keystone credentials. But when
tests are skipped with other decorator at test level then
it does create keystone credentials, setup network resources
and service clients.
This will mostly help neutron gate where these volume
tests will be skipped in the initial stage only and will
not create the keystone and network resources.
One good example is TestEncryptedCinderVolumes which is skipped
- https://zuul.openstack.org/build/babcc06f24764a408ed77702365b4c5b/log/job-output.txt#28695
But it still does the resources setup
- https://zuul.openstack.org/build/babcc06f24764a408ed77702365b4c5b/log/controller/logs/tempest_log.txt#6374-6450
Related-Bug: #2004780
Change-Id: I59cd39c20b995bf2ed2f58f4522743c3ca51b516
_create_security_group() is made public by this commit as
the tempest.scenario.manager interface is meant to be
consumed by tempest plugins.
Implements: blueprint tempest-scenario-manager-stable
Signed-off by: Soniya Vyas<svyas@redhat.com>
Change-Id: I6d862b4dd41ea86a659e6431bcb215e9e12cf35d
This change introduces a true cinder host to host attached volume
migration test in addition to the existing attached volume retype test.
To enable this two new calls are introduced to the v3 volume client to
allow all volume backends to be listed per project and to also call for
a direct volume migration between backends.
Related-bug: #1803961
Depends-On: I1bdf3431bda2da98380e0dcaa9f952e6768ca3af
Change-Id: I501eb0cd5eb101b4dc553c2cdbc414693dd5b681
Previously only the volume type and timestamp data was checked when
retyping an attached volume. This change adds additional assertions to
ensure the volume state remains `in-use`, volume migration state is
`success` and the same `volume_id` remains attached to the instance
after the retype completes. This final check ensures that nova has
correctly called the os-migrate_volume_completion cinder API.
Related-bug: #1803961
Change-Id: I32f0611bdfd2ccede73e7ab774286f5315ff92c3
This is next step patch from https://review.openstack.org/#/c/573118/
which makes all the volume service clients alias with _latest suffix.
As all the volume clients point to v3 service client only, having
alias with _v2_ or _v3_ name are confusing.
This commit provide alias with _latest suffix and use them in
tempest. As old alias are being used in tempest plugins also,
we keep the old alias also and slowly will move each plugins to
start using new alias.
Change-Id: Ib89ab72ab4ada3e8442901f104b0b96072187ef9
Methods {create,get}_timestamp now have possibility to
pass "server" variable to it.
That allows to log instance's console output in case if
SSH to instance would not be available.
Change-Id: I1352e9d559e67510917c2eecd9ecbbb387fdfdb6
This reverts commit f5869b4557.
When retyping a volume, it is possible that Cinder falls back to
migrating a volume in order to complete the retype which is admin-only
operation.
This will result in a failure because Cinder will attempt to contact
Nova using the credentials of the user which are not elevated, with
Nova refusing to do the volume swap.
Therefore, in order to effectively test this, we should stick to using
the admin API as a retype can require a migration which is an
admin-only operation.
Related-Bug: #1740544
Change-Id: I3e4853146bb6e2a62205ffe690da081229215f54
services and extension decorators are based on CONF and needed by
Tempest only, so moving them to tempest.common.
Since a few plugnis use them today, use debtcollector to avoid
breaking all dependencies.
Change-Id: Ibd52153d00b8e60fb8c89e38d94e358ddc787251
By default, Cinder policy will allow a non-admin owner
of a volume to retype a volume. That triggers a call from
Cinder to Nova to swap the volume in the guest. The Nova
swap volume API, however, is admin-only by default. So this
test fails with default policy because Cinder gets a 403
response from Nova when trying to swap the volume on the
Nova side.
This fixes the problem by using the admin client for initiating
the retype.
Change-Id: I17e6603c588e3efddcf44ca4e7af6e352490e689
Closes-Bug: #1698224
It could be confusing to new comers that the variables
cls.os and cls.os_primary or cls.alt_manager and cls.os_alt
actually are aliases. Besides we are not consistent in their usage.
This patch normalizes the usage around os_admin, os_primary and
os_alt. We keep the old aliases for compatibility but we should not
use them anymore.
This fix a long standing TODO item.
Change-Id: I5f7164f7a7ec5d4380ca22885000caa0183a0bf7
I think it's a good idea to move all utility decorators into
tempest/lib/decorators.py. This patch does that for the `attr`
decorator.
Change-Id: Iaafbb112b6eee458089cc49918359a8a8d0485e2
Cinder v1 API tests have been removed from Tempest
- I04de2d90fe11f8ec4acbfa983bc0ad3aa979f45b
There are few other tests like compute, scenario which makes
call to Cinder v1 API based on api_v1 is configured.
We should cleanup those to go with v2 directly and later
those will be directed to make v2/v3 APIs.
Change-Id: I0685a74a80ff845bd0d787bc43fac1c608ee4710
The scenario tests end up generating a large load on target
environments. In most cases this means the whole system is running at
an extremely unrealisticly high load, and many of our scenario
failures are probably traceable back to this.
This classifies many more scenario tests as slow so that during normal
full runs they are not run, they are still accessible for running with
the tox -e all flag.
Selection based on https://ethercalc.openstack.org/nu56u2wrfb2b
Depends-on: Ia303773cabffc25d910cd1c0950d6739592bade6
Change-Id: I35cf4a77ff61d04ed8be58acff3edf47b1ae36f7
All callings to manager.create_server pass wait_until='ACTIVE',
so this is to make wail_until default as 'ACTIVE', not None.
Change-Id: I630cf047ed419fbf0cc073b5984fa29b456da451
So many modules are using test.idempotent_id and this is for
switching to decorators.idempotent_id on scenario.
Change-Id: Ieae5a2ee6937ad4339aff531eadc5e4986d7ec42
Related-Bug: #1616913
Test scenario with a bootable volume that is migrated via:
retype --on-demand <volume_id>
This will exercise cinder retype and migration as well as
nova swap_volume for a bootable volume.
Requires at least 2 Cinder backends which are configured in
devstack with:
CINDER_ENABLED_BACKENDS=lvm:lvmdriver-1,lvm:lvmdriver-2
Co-Authored-By: Erlon R. Cruz <erlon.cruz@fit-tecnologia.org.br>
Change-Id: I4ed9b1f30d4e4e595c44a0ce243c2463069833d7