520 Commits

Author SHA1 Message Date
Zuul
907b9042b8 Merge "tempest: Enable shelve_migrate tests with Libvirt" 2020-11-29 12:43:55 +00:00
Weronika Sikora
d7d87b0202 Set image_alt_ssh_user during stack
At this moment, only image_ssh_user is present in the config
of Tempest. It's set to cirros by default and used for
SSH connections in tests. However, several tests build
instances with image_ref_alt, but still use image_ssh_user to
connect, which results in failure if image_ref_alt is set to
a non-cirros image. They should use image_alt_ssh_user instead,
which can be set to whichever user the image_ref_alt needs in
either local.conf or during plugin installation.

Change-Id: I899909fb71a9862c891e94ba54c6a8fa137f9769
Partial-Bug: #1844535
2020-11-10 12:43:47 +01:00
Zuul
09430e43c4 Merge "Enable access rules tempest tests" 2020-09-27 10:00:45 +00:00
Alexandre Arents
4a1186aa90 tempest: Enable shelve_migrate tests with Libvirt
Enable the compute feature for shelve_migrate on all but LXC and
Xen virt_types.

Related-Bug: #1732428
Depends-On: https://review.opendev.org/#/c/696084/
Change-Id: I31cd00c9117607682213cfa0399709e560f4ad0d
2020-09-25 07:12:42 +00:00
Ghanshyam Mann
32d5b1ea2f Enable image import test
If glance is in standalone mode, image import works
fine so enable the tempest tests. Once we will have image
import or other async tasks working with glance under uwsgi
then we can remove this flag and run import tests by default.

Depends-On: https://review.opendev.org/#/c/741425/
Change-Id: I853e8a3815187f0aa8f05c70488ec948a97e55a6
2020-07-24 17:57:50 +00:00
Zuul
2ecd182385 Merge "Remove GLANCE_V1_ENABLED option" 2020-07-07 19:16:32 +00:00
Brian Rosmaita
ee5cf747d8 Remove GLANCE_V1_ENABLED option
This option sets enable_v1_api in glance-api.conf, a setting that
was removed by change Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
in July 2018, so remove the devstack option from lib/glance.

It occurs in two other places:

This option is used in lib/cinder to set an option that was removed
from Cinder by change Ice379db9ae83420bacf9e96e242c7515930eae86 in
Queens, so remove the related code.

When this option is False, it is used in lib/tempest to set
[image-feature-enabled]/api_v1 to False in the tempest config file.
However, the default value of ths setting has been False since
change Iab3a209c744375bf2618afc00a3f7731b62f557e in Sept 2018,
so remove the related code.

Change-Id: I4b18a0a388ed7e7a392fabeac613778e0d23dee7
2020-06-27 10:47:53 +02:00
Martin Kopec
729546a1ad Remove tempest deprecated img_dir option
Tempest option scenario.img_dir has been deprecated more than 4 years, it's
time to remove it from devstack.
img_file option should contain the full path to the image.
This patch removes setting of img_dir option and makes img_file
one contain the full path of an image.

Change-Id: I71102095f3603915f0bc7d21f2e18c4eac4e95ec
Depends-On: https://review.opendev.org/#/c/710996/
Related-Bug: #1393881
2020-06-11 19:59:51 +00:00
Lee Yarwood
54edc7aeef tempest: Increase m1.nano and m1.micro RAM by 64MB to avoid tmpfs exhaustion
tmpfs exhaustion has long been suspected as the root issue behind
failures to load ssh keys and other metadata from local config drives as
documented in bug #1808010. This can also lead to failures fetching
metadata from n-metadata-api leaving Tempest unable to SSH into
instances.

This change increases the RAM of the m1.nano and m1.micro flavors by
64MB to hopefully avoid these errors going forward. This is also ahead
of our eventual upgrade to Cirros 0.5.0 where 128MB becomes a
requirement.

Related-Bug: #1808010
Change-Id: I4b597579cf89939955d3c110c0bd58ca05de61f0
2020-05-22 15:40:03 +01:00
Luigi Toscano
8fd45dec50 New TEMPEST_VOLUME_REVERT_TO_SNAPSHOT setting
Follow the pattern of the other configuration keys. The new variables
allows tests to enable/disable volume revert tests provided
by cinder-tempest-plugin.

Revert-to-snapshot was introduced in pike, and so the tests.

Change-Id: If137f201c2f646703f5a1ff96e71e48caed63b67
2020-05-12 12:00:20 +02:00
Lee Yarwood
4361ef1eb8 tempest: Enable stable_rescue tests with Libvirt
Enable the compute feature for stable device rescue on all but LXC and
Xen virt_types.

Depends-On: https://review.opendev.org/#/c/700812/
Depends-On: https://review.opendev.org/#/c/700813/
Change-Id: Icfc717b4932be050a169fc00dae720d29a6497f7
2020-03-03 15:25:58 +00:00
Zuul
96fda3528a Merge "Support TEMPEST_BRANCH with tag name" 2020-01-30 20:32:48 +00:00
Ghanshyam
e1c0406d10 Support TEMPEST_BRANCH with tag name
TEMPEST_BRANCH which is mostly set as master so
that Tempest master is run to test the env. With
stable branch going to EM state and Tempest master
might not work due to incompatibility of code or
requirements. In that case we pin the Tempest so that
older Tempest can be used for their testing.

Till now for ocata, pike and, queens we used the gerrit style
ref to pin the Tempest which is not preferred way. We should be
able to use the tag name on TEMPEST_BRANCH.

This commit explicitly checkout the tag set in TEMPEST_BRANCH
as git_clone does not checkout the tag directly until RECLONE
is true or tempest dir does not exist.

After this stable branch or job can set the tag directly with name.
For exmaple: TEMPEST_BRANCH=23.0.0.

Change-Id: Ic777e4b56c4932dde135ac909cb5c6f4a7d5cc78
2020-01-29 15:39:17 -06:00
Zuul
46fd644897 Merge "Fix DevStack to configure tempest's service_availability" 2020-01-20 13:44:18 +00:00
Colleen Murphy
f8aa74bc04 Enable access rules tempest tests
In Train, the access rules API was introduced in keystone. This change
enables testing it in tempest.

Depends-on: https://review.opendev.org/699519
Change-Id: I2af21868cbf584a6881c6208bc2afc3bdb323ab9
2019-12-27 09:30:57 -08:00
Soniya Vyas
7634c78002 Removal of deprecated command and deprecated optional argument
lib/tempest uses 'tempest-account-generator'
which is deprecated 4 years back.
In addition to above, lib/tempest also uses
'os-tenant-name' which is also deprecated.

Use of 'tempest account-generator' and
'os-project-name' should be done now.

Signed-off by: Soniya Vyas<svyas@redhat.com>
Change-Id: I624e1dc57a3d3533322fb298c01f70241d0400ed
2019-12-27 14:01:17 +05:30
ghanshyam
f0dd9996cc Fix DevStack to configure tempest's service_availability
Tempest's service_availability config option includes all the service
availability which is further used by tests to take decision of skip
or run the test.

For example, [service_availability].nova is true then, compute test will run
or if [service_availability].aodh is false then, all aodh related tests either
in aodh tempest plugin or any other plugins will be skipped.

Now question is what is the best way to set the each service availability for
tempest or tempest plugins tests. We have 2 category of service here-
1. Service tested by Tempest (nova, cinder, keystone, glance, swift, neutron)
   (let's say type1 service)
2. Services tested by Tempest plugins (all other than above list)
   (let's say type2 service)

We need the standard way to set both type of service so that we can maintain
the setting of service_availability config options in consistent way.

As discussed on bug#1743688/ and review https://review.openstack.org/#/c/536723/,
we will use devstack lib/tempest to set the type1 service which is services test
owned by Tempest and type2 service setting will be done by devstack plugins of
those service.

For example - [service_availability].ironic will be set by ironic's devstack plugin.
because that is best place we know ironic is installed and available.

To do that we need:
1. Add setting of [service_availability].* in devstack plugins
2. Remove setting of type2 service from devstack lib/tempest

This commit does the second part and all depends-on patches handle the first part.

Related-Bug: #1743688

Change-Id: If3aec9fd1c61e2bb53233be437b97b811dc82414
2019-12-20 18:05:01 +00:00
Zuul
1a6c22e489 Merge "lib/tempest: Do not rely on six for image_size_in_gib" 2019-12-13 20:48:01 +00:00
Zuul
6ac1bb80b1 Merge "Enable libvirt virtio rng device" 2019-12-09 00:37:53 +00:00
Clark Boylan
7ddbece508 Enable libvirt virtio rng device
We've seen jobs where tests fail due to what appears to be rng
starvation. Enable virtio rng device to try and alleviate this.

Change-Id: I70d800cdc45b6008f775110f22c0000736421529
2019-12-05 07:58:23 -08:00
Lucas Alvares Gomes
40f7579bb8 lib/tempest: Do not rely on six for image_size_in_gib
input() should work on both python versions for what we need. I
understand the concern about eval() on python2 but, in the case it's
used we should be fine, plus, python2 is being removed from OpenStack
projects.

Change-Id: I86a7c31374986f81132bc4f49aee0a76b90e6553
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2019-12-05 09:20:47 +00:00
Rodolfo Alonso Hernandez
8579f58307 Dump the upper constraints for tempest in a temporary file
This will avoid the creation of an unneeded file in the "tempest"
repository directory.

TrivialFix

Change-Id: Id3f46b3537cd3232cb29c42808bde44c667565f1
2019-11-29 13:56:45 +00:00
Szymon Datko
28c498150d Select proper flavor_ref_alt for Tempest
Currently if user selects the default instance type for Tempest
tests, some of resize-related tests may fail due to resize attempt
into flavor with smaller disk size. It is because there is just
simple check if flavor_ref and flavor_ref_alt (IDs) aren't the same.
To ensure resize is really possible, there shall be additional
verification introduced.

Co-Authored-By: Michał Madarasz <michal.madarasz@corp.ovh.com>
Change-Id: Iaa1bfa9cb76cbe54be658d2d70d97d99e7fb5be9
2019-08-23 12:57:42 +02:00
Zuul
15c64f109e Merge "Add capability of adding additional network API extensions" 2019-07-04 11:46:33 +00:00
Ghanshyam Mann
52c2886f7e Add capability of adding additional network API extensions
Currently, devstack has NETWORK_API_EXTENSIONS var to define
the network API extensions. NETWORK_API_EXTENSIONS is defaulted
to 'all' for master and hard coded list of extensions per release.
Zuul jobs of network extensions (for example neutron-fwaas) need
add the some extra extensions in the default list. To do so, they
need to duplicate all the defaults extensions and then add the extra
extensions. Much difficult situation is when defaults extensions list
vary from release to release so they have to keep updating the
NETWORK_API_EXTENSIONS per release.

This commit defines a new var ADDITIONAL_NETWORK_API_EXTENSIONS which
will take extra extensions and append into the default list. This way
Zuul jobs do not need to duplicate the default extensions.

Change-Id: I7270c9b9e047a851970439522c0356c9089a5b74
2019-06-21 17:05:01 +00:00
Ghanshyam Mann
fc20705098 Add setting of placement microversion on tempest conf
Tempest not support placement microversion setting so that
test can call APIs with specific placement microversion.

This commit adds the setting of placement API microversion on
Tempest conf.

Change-Id: Ie04aa993ec7a1495740d9267b076a40f4291e25e
2019-06-05 08:24:45 +00:00
Stephen Finucane
4b8cba77fe Remove n-cells, n-net and n-cauth
Remove nova cells v1 support, which also allows/necessitates removing
support for nova networks (which was only supported with cells v1) and
nova-consoleauth (which was required by cells v1 but is unnecessary
otherwise).

The Depends-On isn't really necessary, but it's here to make sure this
doesn't merge until we _really_ have killed cells v1.

I honestly expected this patch would be bigger.

Change-Id: I90316208d1af42c1659d3bee386f95e38aaf2c56
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: Ib0e0b708c46e4330e51f8f8fdfbb02d45aaf0f44
2019-05-31 15:10:05 +01:00
Rodolfo Alonso Hernandez
8b8158ed8f "raw_input()" deprecated in Python3
Built-in function "raw_input()" is deprecated in favor of "input()" [1].

[1] https://www.python.org/dev/peps/pep-3111/

Change-Id: I31c4c59373a2ad04987da3daffb3eed50916a6db
Closes-Bug: #1823321
2019-05-14 16:25:48 +00:00
Zuul
58de715453 Merge "Explicitly set scheduler_available_filters" 2019-04-29 12:23:17 +00:00
Artom Lifshitz
4705861dd0 Explicitly set scheduler_available_filters
Tempest's scheduler_available_filters has a special 'all' value that
is understood to mean 'all filters are enabled' by various tempest
tests. However, what it really means is 'the default nova filters are
enabled.' In an effort to help clean that up, this patch explicitly
sets scheduler_available_filters to nova's $FILTERS. Because $FILTERS
is now used in both lib/nova and lib/tempest, it is renamed
$NOVA_FILTERS.

Change-Id: I6ffc1e9989cd61d666f9c1db9c94fbabd7151918
Related-bug: 1628443
2019-04-23 10:15:23 -05:00
Zuul
b359b960d2 Merge "Have lib/tempest to create shared network" 2019-03-30 00:06:19 +00:00
Zuul
0d7df32cb4 Merge "Fix installing tempest plugins" 2019-03-21 21:38:17 +00:00
Zuul
2ba01316f3 Merge "Remove admin_domain_scope tempest setting" 2019-03-18 19:20:04 +00:00
Vlad Gridin
bcd8a50cc6 Fix installing tempest plugins
When running stack.sh locally on stable branches
with tempest enabled and TEMPEST_PLUGINS set,
devstack will try to fetch master branch of requirements
and that fails if branch is not tracked.

Change-Id: Ia1ae6869a8fede2af5cd7c875e0946b6a75eb518
Closes-Bug: #1820051
2019-03-14 14:46:31 +01:00
Lance Bragstad
30d48ff887 Remove admin_domain_scope tempest setting
Keystone is currently working through a bunch of changes to add proper
system, domain, and project scope support for its API. This includes
implementing ``admin``, ``member``, and ``reader`` roles for system,
domain, and project assignments. More informaiton on those specific
changes can be found here:

  https://review.openstack.org/#/q/(status:open+OR+status:closed)+project:openstack/keystone+branch:master+topic:implement-default-roles

One thing that was uncovered in implementing that support for the
project API was that setting tempest
``CONF.identity.admin_domain_scope = True`` meant domain admins of one
domain would be able to list projects in other domains, highlighted in
the following patch:

  https://review.openstack.org/#/c/624218/2

This commit doesn't set this option and assumes the proper
domain-scoping behavior being built into keystone natively.

Change-Id: I12a57cc43de0b17eababa19b7b94de5277689f82
Related-Bug: 1750660
2019-02-27 19:53:58 +00:00
ghanshyam
0d83e09464 Use master upper-constraints when installing tempest plugins
when tempst venv is build, it use the master upper_contraint[1]
but when we install tempest plugin, it use branch upper_contraint.

This leads to mismatch the dependency version between tempest and required
tempest plugins setup.

Current flow after this change is:

1. install tempest form master (until you explicitly change TEMPEST_BRANCH
   which is default to master in all stable branch). It applies the upper_constraint
   from the stable branch but that will be overridden in step2
2. configure tempest, here the created venv will install all dependency with
   master's upper_constraint.
3. install tempest plugins in same venv created above. Now tempest plugin
   will also use the master upper_constraint.

With this tempest venv which has all enabled plugin will be contsraint with
master.

[1] 72f632222f/lib/tempest (L590)

Change-Id: I89314e8391e8f26c622fc090cbe27997b3cf049a
Closes-Bug: #1816022
2019-02-27 11:10:05 +00:00
Matt Riedemann
23d33a8b5b Set non-0 disk sizes for tempest flavors
Nova change https://review.openstack.org/603910/ is
going to change the default rule on policy
os_compute_api:servers:create:zero_disk_flavor to
admin-only, which will prevent non-admins from
creating image-backed servers with a flavor that
has disk=0 since it's a potential security exposure.

Therefore we need the test flavors that are created
for tempest to use non-0 disk values. Since the flavor_ref
and flavor_ref_alt can be aligned to the image_ref and
image_ref_alt in tempest.conf, we get the image sizes
from glance (in bytes) and convert those to GiB disk
sizes for each flavor, respectively. Since we're using
Cirros images by default, we need to make sure to round
up otherwise we'd still have a 0-disk flavor.

There are lots of ways the math could be done here
using numfmt, bash, awk, bc, etc, but it's simplest to
write and probably easiest to read by using python for
the size conversion code.

Change-Id: I537c299b0cd400982189f35b31df74755422737e
Related-Bug: #1739646
2018-11-26 13:03:28 -05:00
Attila Fazekas
0d4c9c9fa3 Have lib/tempest to create shared network
In order to make sure not possible to introduce a change in tempest
which breaks the shared network compatibility.

Depends-On: I6e3e53c4ac26b4fef09fefb9c590dfa91f577565

Change-Id: Ib2e7096175c991acf35de04e840ac188752d3c17
2018-11-04 13:28:46 +01:00
ghanshyam
35485ca21f Remove setting of unnecessary tempest config options
Tempest have removed the volume-feature-enabled.api_v1
config options[1] and modified the default value of
volume-feature-enabled.api_v3 to True.

These config options not needed to be set from devstack
side.

[1] https://review.openstack.org/#/c/573135/

Change-Id: Ic35cf4482ab4d3c2e69348ec92568e68f6ea74ee
2018-10-09 07:44:48 +00:00
Zuul
6f4b7fc99c Merge "Fixed git show for upper-constraints.txt in lib/tempest" 2018-09-04 07:29:50 +00:00
Lenny Verkhovsky
6465219ec3 Fixed git show for upper-constraints.txt in lib/tempest
Change-Id: Id133108e0436018be81fca74a15ff29a4fe2e796
Closes-Bug: #1789643
2018-08-29 16:41:04 +03:00
Zuul
9b4b4c6919 Merge "Rename "Member" role in tempest_roles to "member"" 2018-08-22 23:24:16 +00:00
ghanshyam
11b8649e83 Fix TEMPEST_AUTH_VERSION comparision condition for identity v2
TEMPEST_AUTH_VERSION should be 'v3' or 'v2' not 'v2.0'.
To disable the identity v2 admin tests TEMPEST_AUTH_VERSION is
being compared with 'v2.0' which is incorrect.

Change-Id: I5f7e3bcf733edbbee06016bcad4845dda552815e
2018-08-07 08:37:24 +00:00
Felipe Monteiro
3cdff78fba Rename "Member" role in tempest_roles to "member"
Recently, Keystone renamed "Member" role to "member"
(case-sensitive) with https://review.openstack.org/#/c/572243/14

Case-sensitivity role requirement in Keystone was recently
formalized with https://review.openstack.org/#/c/576640/

From the above reference:

"Role names are case-insensitive. for example, when keystone
bootstraps default roles, it creates `admin`, `member`, and
`reader`. If another role `Member` (note the upper case 'M') is
created, keystone will return a `409` Conflict since it considers
the name "Member" == "member". Note that case is preserved in these
cases."

It follows that Tempest should use "member" role by default.

Change-Id: Iebf04fdb4c195b6779c74f66da3f7822cf174494
2018-07-18 20:10:28 +00:00
Zuul
36b69c0b02 Merge "Add variable to set volume service version on tempest" 2018-05-31 12:25:10 +00:00
Zuul
3051d3ceff Merge "Re-enable novnc tempest tests" 2018-05-04 22:34:21 +00:00
Zuul
8cdf31e232 Merge "Run console proxies per cell instead of globally" 2018-05-04 16:16:10 +00:00
melanie witt
6645cf7a26 Re-enable novnc tempest tests
Once the nova patch series that converts from the nova-consoleauth
backend -> cell database backend lands, we can re-enable the novnc
tests in tempest.

Depends-On: If1b6e5f20d2ea82d94f5f0550f13189fc9bc16c4

Change-Id: I2939191a1c3ce49fa2104b4ffdf795fc416a1c33
2018-05-01 00:07:38 +00:00
melanie witt
ed2d491960 Run console proxies per cell instead of globally
Along with converting to the database backend for console token auth,
the console proxies need to run per cell instead of globally. This way,
the instance UUID isn't needed in the access url as users will be
handed an access url local to the cell their instances is in. With
console proxies sharded across cells, a large cloud will no longer have
a bottleneck of one console proxy for the entire deployment.

This also disables the novnc tempest tests with a TODO to re-enable
them once the nova patch series that converts from the nova-consoleauth
backend -> cell database backend lands.

Change-Id: I67894a31b887a93de26f3d2d8a1fa84be5b9ea89
2018-05-01 00:07:27 +00:00
Zuul
928a463d61 Merge "Enable tempest tests for application credentials" 2018-04-23 22:21:42 +00:00