Commit Graph

23 Commits

Author SHA1 Message Date
melanie witt bd76355ef5 Verify that instance can boot after volume retype with migration
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
2023-09-22 05:18:01 +00:00
Ghanshyam Mann 2803b57d6c Skip scenario tests early to avoid unnecessary setup
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
2023-08-04 19:38:16 +00:00
Soniya Vyas 582c170b2c Make _create_security_group() non-private
_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
2021-03-01 18:47:09 +05:30
Lee Yarwood e5597401ff Introduce an attached volume migration test
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
2019-04-25 10:34:58 +01:00
Lee Yarwood 8df5fdcbe0 Add assertions to attached volume retype test
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
2019-04-23 17:42:26 +01:00
ghanshyam 6c682ffc5d Make volume client alias with _latest suffix
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
2018-08-07 05:33:48 +00:00
Slawek Kaplonski 79d8b0ff9b Log server console output during create/get timestamp
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
2018-07-30 22:46:56 +02:00
Zuul 42f29abb29 Merge "Add NOTE related to 'on-demand' migration" 2018-01-17 05:30:19 +00:00
Ken'ichi Ohmichi d513a7f5ba Add NOTE related to 'on-demand' migration
This comes from the review I3e4853146bb6e2a62205ffe690da081229215f54

Change-Id: I455286e31bf95484b1b2b300f9038ef0628899f9
2018-01-08 18:19:05 +00:00
Zuul 5895ec110e Merge "Revert "Use a non admin privileges for retyping a volume"" 2018-01-07 01:31:53 +00:00
Mohammed Naser 65e4f9b9d1 Revert "Use a non admin privileges for retyping a volume"
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
2017-12-29 21:24:03 +00:00
Jenkins c961a656cc Merge "Move test decorators to common" 2017-08-24 06:48:00 +00:00
Andrea Frittoli cd36841ca2 Move test decorators to common
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
2017-08-23 17:09:33 +00:00
lkuchlan f5869b4557 Use a non admin privileges for retyping a volume
Retype of a volume does not require admin privileges,
since Bug #1657806 was fixed.

Change-Id: Ia4a9bd20af0fcc5991ea45c2fd2a78f417d67d72
2017-08-23 16:01:26 +03:00
zhufl 708821c508 Remove unused clients from testcases
This is to remove unused clients from testcases to
keep code clean.

Change-Id: I7dd4f9194357de23ece44d25f70f86f498df8a07
2017-07-14 14:54:03 +08:00
Matt Riedemann 1df940ebdb Fix test_volume_migrate_attached to retype as admin
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
2017-06-15 17:49:06 -04:00
Jordan Pittier 8160d31e58 test.py: stop using aliases for creds manager
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
2017-04-26 10:34:56 +02:00
Jordan Pittier 3b46d27c90 Move the `attr` decorator from test.py to tempest/lib
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
2017-04-14 11:16:36 +02:00
ghanshyam 3bd0d2bbd1 Remove remaining usage of cinder v1 API call from Tempest
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
2017-03-28 10:00:52 +00:00
Sean Dague 49505df20f make -e full run tempest scenarios serially
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
2017-03-03 20:50:46 +00:00
zhufl 13c9c893cc Make wait_until default as 'ACTIVE' in manager.create_server
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
2017-02-10 14:53:20 +08:00
Ken'ichi Ohmichi c85a951881 Switch to decorators.idempotent_id on scenario
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
2017-02-06 15:17:31 -08:00
scottda 61f68ac394 Migrate volume while attached to an instance
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
2017-01-20 10:12:09 -02:00