Commit Graph

283 Commits

Author SHA1 Message Date
Arx Cruz 94718fef1f Update default cirros image to 0.6.2
The 0.5.2 version being used so far as default, has a lot of kernel bugs
that were fixed in the new version, so updating it to 0.6.2.

Change-Id: Icd7330f4f58f1815d9f5b48ffd0a80277568023b
2024-04-22 21:09:02 +02:00
Chi Wai Chan 3366caea2c
Fix compute, volume, and share endpoint discovery.
The endpoint discovery mechanism in compute, volume, and share use
no_port_cut_url to cut the URLs after the version (including the
version) if port is not present.  However, when the port is present, the
no_port_cut_url method sets the top_level to True when calling do_get
method. This causes the do_get method also cut the top_level_path of the
URLs because by default the top_level_path is set to "". This behavior
is not desired because different clouds maybe have endpoints with
different top_level_path other than "". Instead of using
no_port_cut_url, we can use utils.get_base_url to properly cut the URLs
after and including the version.

Story: #2010968
Task: #49109
Change-Id: I221b6267afce90b8b7e22d468f0824c9365f4a91
2023-12-12 15:22:55 +08:00
Martin Kopec b5ae1f69ac Support Admin admin user and role
We didn't take into account that the admin role and user might be
called on with uppercase first letter - Admin - on some systems.
The patch edits the logic so that we accept this admin name or
role.

Story: #2010880
Task: #48601
Change-Id: Ie027de58f77a58f44b31274e6d75dc830d3b717d
2023-09-18 10:15:25 +02:00
Mert Kırpıcı 58e32bbe5a fix: un-hardcode v3 credentials
During cloud discovery resource creation, the domain_name and
user_domain_name information used to be hard coded to 'Default' which
might not be the case for all credentials, admin or non-admin.

This patch adds support for domain_name, project_domain_name and
user_domain_name information by defaulting all of them to 'Default'
however in the case they are available in the cloud credentials, using
them during python-tempestconf runtime as well as rendering them
correctly in the final tempest configuration.

Story: 2010811
Task: 48330
Change-Id: I4355837f4d8d514524039df6f3989dbd69f2c700
2023-08-21 11:29:06 +00:00
Arx Cruz ea9dc57278 Handle when there is no volume backend available
We query the volume pools to check if the user has permissions to list
the backend storage, but we do not handle when the volume backend is not
available, only when the user is not allowed. This patch adds the
ServiceError exception to handle it and set the backend properly.

Change-Id: I0fd61813dbadf5ef3a0db55791e3b261d4c9d885
2023-06-02 12:19:43 +02:00
Martin Kopec eca54c4743 Unblocking CI by n-v a few jobs
The commits marks several jobs as n-v to unblock the CI. The jobs
already have fixes proposed and are in the process of review.
Right now we wait on a change in Tempest which may take serveral
days to get merged.
The patch also fixes an issue with pep8 - too long line - seems
like the sensitivity of pep8 was increased because previously
the line was ok with pep8.

Change-Id: Icea222faadfe22ab029d0321fd68c3e6f1bbc0b4
2023-06-01 13:41:48 +02:00
afazekas fc128db3b2 Do not disable live migration by default
Live migration supposed to work in all qemu/kvm deployment.
It is expected switch to block magrate in case of no shared storage,
tempest expected to skip migration tests when there is no multiple
compute nodes and it would lead to test failure.
Also update the documentation regarding the options set by default.

Change-Id: Id9a25ad50df85f16f27a228a0075c2e073670937
2023-03-09 15:21:40 +01:00
Zuul 025c0c4891 Merge "Remove volumev2 from volume service" 2023-02-10 16:28:39 +00:00
Martin Kopec a0bcf9ad55 Change auth.tempest_roles default value
This commit changes the default value of the following option
from
CONF.auth.tempest_roles _member_
to
CONF.auth.tempest_roles member

Change-Id: Ic8263d0bfd9b093aab7f1779d24b19ca2a9b30bd
2023-02-10 07:29:13 +00:00
Arx Cruz 5457aa641f Remove volumev2 from volume service
The volumev2 endpoint was removed in Xena release [1]

1 - https://review.opendev.org/c/openstack/cinder/+/792299

Change-Id: Iad43c2c786dd59e91c83c0d38c4568fe73629ea4
2023-01-23 11:27:41 +01:00
Lukáš Piwowarski 6488be3e82 Change class variables to instance variables
TempestConf has a set of class variables that do not need to be
class variables because there are no multiple instances of
TempestConf class that could share the value.

The reason why we need to move the class variables to instance
variables is that some unit tests under certain conditions were
failing because multiple unit tests were changing the
TempestConf.priority_sectionkeys value.

Change-Id: Ic6f51be112aa9f93904fcab289d78a7e06f20f62
2022-11-24 08:56:45 +00:00
Zuul d5fc8ad86b Merge "[share] Add support for thin_provisioning" 2022-09-13 14:50:51 +00:00
Zuul 9aec82a788 Merge "Fix cinder-backup logic" 2022-09-07 15:08:03 +00:00
Arx Cruz ea78088ecb Fix cinder-backup logic
When you have several controllers, if the first controller have
cinder-backup service disabled, the pacemaker return it as down, and so
the cinder-backup is set to False, even though it is running in a
different controller.
This patch do a loop to check if the cinder-backup is enabled in other
controllers, if so return it as True.

Change-Id: I3a16ec4f7b45267fcb8f9c6d01f28fe40faf7661
2022-09-01 15:54:49 +02:00
lkuchlan 684db64bf1 [share] Add support for thin_provisioning
Since some of backends support thin_provisioning,
it's necessary to have a new parameter for skipping
the test in unsupported environments.

Change-Id: I9164a9f9d7d0dc913a1b91eb0efa741db8d523b8
2022-08-28 11:11:15 +03:00
Martin Kopec 448ff51dec Drop py3.6/7, T, U jobs and fix neutron discovery
python 3.6 and 3.7 are dropped (upstream tooling as e.g.
Devstack doesn't support this those anymore) together with
train and ussuri jobs.

refstack-client jobs are non-voting now until a fix on
refstack-client's side has landed. Also victoria jobs are
marked as non-voting because they require a patch on devstack's
side which isn't ready to be merged yet [1].

manila-tempest-plugin needs to be pinned in Victoria and
Wallaby because the plugin requires newer tempest version
than is available there.

The patch also makes neutron version discovery with a not
top level URL, seems like something changed because
the discovery has been failing.

[1] https://review.opendev.org/c/openstack/devstack/+/844774

Change-Id: Ia3d78e84ad9eee515eb8ca017ea84df1fd160929
2022-08-19 09:13:03 +02:00
Martin Kopec 6bb29fdd27 Fix TestImageService's unit tests
The test class had hardcoded DEFAULT_IMAGE_DIR value to /img/
which resulted in unit tests failures when this path existed
because the tests expect a call to makedirs which didn't happen
as the DEFAULT_IMAGE_DIR already existed.
The patch fixes that by passing exist_ok=True to makedirs call
which will result in always calling makedirs, whether img_dir
exists or not.

Change-Id: I47d15747536394006f6b502b3025220a5077e547
2022-03-29 14:59:40 +02:00
Zuul 9586241409 Merge "Add multistore image option" 2022-03-14 17:26:05 +00:00
Eduardo Olivares 8e5a594d93 discoverability may not be defined on object-storage-feature-enabled
Using a deployer-input file that includes object-storage-feature-enabled
section without discoverability fails, although discoverability is an
optional parameter

Change-Id: I52838fc6b6f7e576604764e1b8b7938fe4b2ea0d
2022-03-04 13:18:00 +01:00
Soniya Vyas fb978cf770 Add multistore image option
This is an attempt to populate tempestconf with
multistore feature enabled if and only if multiple
stores are available.
In Rocky and Stein, Glance has added the ability to
configure multiple stores as an EXPERIMENTAL feature.
This feature is fully supported from the Train cycle.

Please refer [1] for more information
[1] https://specs.openstack.org/openstack/cinder-specs/specs/ussuri/support-glance-multiple-backend.html

Here are two test-projects exercising the results of
this change

1. With multi-store enabled
https://review.rdoproject.org/r/c/testproject/+/37159
2. With multi-store not enabled
https://review.rdoproject.org/r/c/testproject/+/37160

Signed-off-by: Soniya Vyas <svyas@redhat.com>
Change-Id: I45f9dce14b60e9385600c57ee56b50aba3a4476f
2022-03-03 18:40:38 +05:30
Martin Kopec 490a7ea40b Fix no floating_network_name option
If there is no public network set, python-tempestconf doesn't
set network.floating_network_name option. In order to avoid
the following error when heat_plugin options are being set:
No option 'floating_network_name' in section: 'network'
the commit adds a try except block to catch this situation
and log it for the user.

Change-Id: Ib1f04584b620fc662fd415c4430a03ea92c35b76
2022-02-21 15:43:38 +00:00
Luigi Toscano 9b2c8127b1 Remove references to live_migrate_migrate_instance
The option was removed long ago in tempest 10.0.0:

https://review.opendev.org/c/openstack/tempest/+/277834

Change-Id: I1f8e9fabf7465479e1eee7fc466e39be1e67a8f8
2022-01-04 12:17:00 +01:00
Martin Kopec 2bf7bf6a84 [Trivial] Fix swift's extension discovery
In case the swift's endpoint returned an exception during an
extension query, get_capabilities method returned a string of
an empty dict, which is always "true" and therefore it confues
a later if statement checking if any extensions were found.
Let's make the method return an object - dict - which will
be either true (if contains any data) or false (if it's empty).

Change-Id: Ie7974c97a4b119e41fba7150bcd2a2553300f694
2021-08-29 17:25:11 +00:00
lpiwowar 0398f2a6c0 Fix extension discovery for object_storage
Python-tempestconf assumed that swift's /info endpoint is always the
same. But it may happen that the endpoint is renamed to /swift/info
in certain situations (e.g.: when swift is on ceph).

This patch fixes the issue by trying to access the /info endpoint
first. When the connection to /info endpoint is unsuccessful then
/swift/info endpoint is used as a fallback.

Story: 43092
Change-Id: I4447e1527eae8ec75acb4fb96047c894db75620d
2021-08-26 15:25:57 +02:00
Zuul c9dcf15b34 Merge "Update default cirros version to 0.5.2" 2021-06-07 20:35:52 +00:00
yatinkarel 9a2d7cbbb0 Use assertCountEqual instead of assertItemsEqual
The assertItemsEqual method has been removed in Python 3.3 [1] but
it was kept alive by unittest2, imported by testtools. For better
compatibility, change to assertCountEqual.

[1] https://bugs.python.org/issue17866

Change-Id: Ia9768b9b889becbbc6153f3866e9fdf625fe4f5e
2021-05-14 13:02:57 +05:30
Archit Modi 829516e45d Update default cirros version to 0.5.2
Due to a known libvirt issue [1], fixed in 0.5.2, we're updating the
default cirros image version. Following is from the related commit:

```
Add ahci module

Without this module it isn't possible to see any attached SATA devices
once booted, even when booting from SATA based disks.

As discussed in the associated issue the OpenStack Nova project is
looking to test the `q35` machine type that requires the use of SATA
based cdrom config drives. Including and loading this module allows
these config drives to be seen correctly within launched instances.
```

[1] https://github.com/cirros-dev/cirros/issues/64

Change-Id: Ie0d7d5ad023121c834900aac47199231b4b9af05
2021-04-28 09:23:36 -04:00
Zuul f88961eb59 Merge "Updating download_with_retry function" 2021-04-26 21:57:22 +00:00
Arx Cruz 2e09b75839 Updating download_with_retry function
Older versions of tenacity doesn't support iterator in the Retrying
class, so updating the function to use the decorator instead, so we can
keep compatibility.

Change-Id: I33fa112975f355cf4f4396ec331200b15a366161
2021-04-26 16:17:37 +02:00
Mohammed Naser d4c30061e5 Stop trying to use identity URI if dashboard URL exists
At the moment, if dashboard_url is overridden, we still try to
make a request to introspect based-off the identity URI which
isn't correct behaviour.

This patch short-circuits this entire behaviour if there's a
dashboard_url provided.

Change-Id: Ifeaec3337e5155ad1f5adeca85fce00b611a631d
2021-04-16 21:24:32 -04:00
Zuul 18bc878270 Merge "Manila: Add snapshot capabilities in [share]" 2021-04-09 14:34:29 +00:00
Zuul d4fa5af28d Merge "Manila: Set multitenancy_enabled in [share]" 2021-04-08 21:54:32 +00:00
Goutham Pacha Ravi b15c290af1 Manila: Add snapshot capabilities in [share]
Makes configuration convenient when we can
discover and set these values by default.

Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
Change-Id: Iecb1328f1fb3d54cfd91bb9c23d2d8ee40cf3b33
2021-04-08 10:18:04 -07:00
Zuul 233fca29a5 Merge "Fix share endpoint discovery" 2021-03-26 09:54:13 +00:00
Zuul 6c4d89c290 Merge "Fix manila backend_names and enable_protocols" 2021-03-26 05:04:10 +00:00
Goutham Pacha Ravi 677d9c8e4e Manila: Set multitenancy_enabled in [share]
Manila's tests _need_ this configuration, and it
defaults to True. However, if there are no backends
that satisfy that condition, we need to set this
config opt to False, else tests will fail due
to misconfiguration.

Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
Change-Id: I40bf6c53f205318bcd92effed433fa40f230aa02
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-03-22 12:13:30 -07:00
Zuul 2b611fcfc3 Merge "Add alternative image to be downloaded" 2021-03-20 00:46:58 +00:00
Goutham Pacha Ravi d625ec79c2 Fix manila backend_names and enable_protocols
A backend in manila can have multiple storage pools
and capabilities for each pool are considered to
create configuration for tempest tests. These
capabilities however may overlap with each other,
so we need some de-duplication.

Change-Id: I108615ab197b8959fe944e21ae7c1a36125ca531
2021-03-19 12:46:47 -07:00
Martin Kopec bd97ede0a5 Fix share endpoint discovery
Share's endpoints are versioned so we have to call
no_port_cut_url method for properly parsing the endpoint.

Change-Id: I54855f44e87a46a72da704413b1b78857858c9a7
2021-03-19 18:25:43 +00:00
Arx Cruz 506bd27890 Add alternative image to be downloaded
Sometimes the image is being download from some other place rather than
the C.DEFAULT_IMAGE, and then it fails due the fact the url is down.
Add the --alt-image option allows tempestconf to instead of fail, try
again download a different image

Change-Id: Ia1af9e684dc4488841e2b54c5817902e19e51b7f
2021-03-15 12:29:30 +01:00
Zuul 84e406d530 Merge "Set ssl cert option for horizon service" 2021-03-09 17:01:19 +00:00
Martin Kopec a935d258d5 Fix placement endpoint discovery
Placement's endpoints are not versioned (don't contain /<version>
in the URLs opposite to services such as compute or volume)
and therefore we don't have to call no_port_cut_url or do_get
method *with* top_level set to True whose take care of cutting
the URls after the version (including the version).
python-tempestconf is able to discover the endpoint and as it's
not versioned, we don't need to do any further processing.

Story: 2008679
Task: 41980
Change-Id: Id3c270fa4a0b09c19edf6c0c9dba48a2235d1907
2021-03-03 18:52:50 +00:00
Zuul 3e690f744e Merge "Remove deprecated scenario image option" 2021-02-15 21:42:13 +00:00
Martin Kopec 9770ce3de3 Set ssl cert option for horizon service
The patch adds the abbility to automatically set
CONF.dashboard.disable_ssl_certificate_validation for
horizon service.

Change-Id: If23bd0973d0bd63f3e265ef615904df7931dc2ff
2021-01-25 10:57:18 +00:00
Martin Kopec d355f91a6a Remove deprecated scenario image option
Deprecated scenario image options are being removed from tempest,
see [1]. The tempest change makes img_dir obsolete
therefore CONF.scenario.img_file needs to contain the full path to
the image now.
CONF.scenario.img_dir will be removed entirely from tempest in the
near future by [2].

[1] https://review.opendev.org/c/openstack/tempest/+/710996
[2] https://review.opendev.org/c/openstack/tempest/+/754927

Change-Id: Icf7ac92807873d0a5cd8ccaf75033003adb21c0a
2021-01-25 10:01:15 +00:00
Brent Eagles 66147e0551 Enable neutron port security for Octavia tests
Some Octavia tempest tests require that neutron port security feature is
enabled.

Change-Id: I0b35080f065df09b460e33431545f70ac3cb9557
2021-01-13 12:38:05 -03:30
Zuul 4f4774d4e4 Merge "Remove deprecated volume API config options" 2021-01-07 17:59:48 +00:00
Zuul 58897fdb74 Merge "Get ssl opts to every service class" 2021-01-07 17:59:45 +00:00
Roman Safronov 66fec04b96 Add placement service versions discovery
Some tempest tests require placement service microversions to be
specified, e.g. MinBwAllocationPlacementTest. This patch adds
discovery of the placement service min and max microversions.

Change-Id: I639cbf0d63cc2a3235615762d61347b9bb0c5e6f
2021-01-04 12:35:50 +02:00
Martin Kopec 09c369514d Remove deprecated volume API config options
Started by Rocky release
 * ``CONF.volume-feature-enabled.api_v2``
 * ``CONF.volume-feature-enabled.api_v3``
are deprecated and have no effect.
``CONF.volume.catalog_type`` will be used instead.

Volume APIs tests have been moved to v3 as default and can be run
under v2 API via catalog_type.
- https://review.opendev.org/#/q/topic:volume-default-testing-v3+(status:open+OR+status:merged)

Story: 2007283
Task: 38735

Change-Id: Ia4c07bdda484828a29e9bfa299134f69d0f4050a
2021-01-04 10:32:46 +00:00