Commit Graph

903 Commits

Author SHA1 Message Date
Zuul 1687dd6ef6 Merge "Add access rules restriction tests" 2024-03-13 16:16:42 +00:00
silvacarloss d10819b89b Add access rules restriction tests
Adds new test cases and updates current test cases for access allow
and deny APIs. Such APIs now allow users to restrict the visibility
of some fields during the access creation, or even restricting the
deletion of access rules.

Depends-On: https://review.opendev.org/c/openstack/manila/+/887725
Change-Id: If0f7655dc6c11c6c12eeb76bd1cc853466235cca
2024-03-12 14:48:03 -03:00
silvacarloss cbab9fe0c7 Fix backup build erro exception class name
When backups fail to build, tempest is not displaying the correct
exception because the class name is not following the pattern we
expect it to follow.

This change fixes the class name for the share backups build error
exception.

Change-Id: I9553ba44544d84dbc452973252391967225c724e
2024-03-06 19:24:36 -03:00
Zuul bdc5ad5961 Merge "Add share backup tests." 2024-03-06 13:40:28 +00:00
Zuul a7f07f24d4 Merge "Use ddt.named_data decorator to avoid random test names" 2024-03-05 20:43:57 +00:00
lkuchlan de4bf8d29e Use ddt.named_data decorator to avoid random test names
There are few tests that generate random test names because
random parameters are given to the ddt.data  decorator.

In the ddt version number 1.6.0 there is a possibility to
determine the name of the tests without relying on the
given values. I think this could be a good solution for
the randomly generated names.

This change is being re-introduced as ddt version 1.6.0 is
now usable in the downstream CI. The original change is: Iaf39f4a83e383fb9db7f519136b9169352ff84af

The following change is also included: I4d274869e5e9e7800be44bccf7a2641b4a5febe8
Which replaces periods to underscores, a needed fix.

Change-Id: Iaf39f4a83e383fb9db7f519136b9169352ff84ad
2024-03-04 15:17:41 +00:00
silvacarloss cf874b1dac Ensure metadata tests manipulate only its own metadata
There are some metadata that only drivers or administrators can
manipulate, and if the tests haven't created those, we should not
be adding them to our asserts.

In this change, we are making sure that tests will only validate
the metadata that they are creating.

Change-Id: I168e1d9057d48b61eb325f2fd93dcc12a406f06e
2024-02-28 14:29:29 -03:00
Kiran Pawar edd82c7385 Add share backup tests.
Share backup tests i.e. create/delete/get share_backups.

Change-Id: I366221702b3aa2e78bff82e6b2a543b6f6784f77
2024-02-22 09:01:46 +00:00
Luigi Toscano 7604da8054 Remove unneeded randomness when calling ddt.data()
The usage of sets introduces unneeded randomness, and the
utils.deduplicate function can be used instead.

This is a follow-up to similar past changes, see:
I9cbd26016238c25487ac8104c1188cd2cf4f467e
I15bfbf6e1ca604f2bf2fcf12dcd4e67bc728fe5e
I8fce553d927da6d94471ecdf4040bbbb4377d9cf

Change-Id: I5477b815f212c5468c5e52905c4e1e1d4ef082bb
2024-02-13 14:05:51 +01:00
Goutham Pacha Ravi d6a517351d [CI] Stable branch CI adjustments
Xena and Yoga are past the stable maintenance
cycles. We're soon going to tag these release
branches as "unmaintained" branches [1]. We don't
expect the trunk version of manila-tempest-plugin
to work against these older branches any more.
Instead, we have tagged a "xena-last" and will
soon [2] tag a "yoga-last" branch that will be more
appropriate.

Going forward we must be testing the "maintained"
stable branches, which are zed, antelope, bobcat
as of this commit.

[1] https://docs.openstack.org/project-team-guide/stable-branches.html#unmaintained
[2] https://review.opendev.org/c/openstack/releases/+/908381
Change-Id: Ib0e984a4acdc2f82f5e3a75e34c7ec922674b0a5
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2024-02-12 17:08:38 -08:00
Zuul d78f3b9dc8 Merge "Remove unused babel.cfg" 2023-12-21 14:49:55 +00:00
Takashi Kajinami 4644870931 Remove unused babel.cfg
This file is no longer used since [1] was merged.

[1] a3fef5ccca

Change-Id: I8cfdc80993aa62780322a04c3a48daae6317337e
2023-12-20 21:41:16 +09:00
Zuul 874dd329f6 Merge "Fixed Share server migration test related to CIFS." 2023-12-13 19:32:53 +00:00
ashrod98 cb9fc3df02 Ceph-native job change
Pop off ceph release pin in cephfs-native-cephadm job

Change-Id: Idf15ccf996eb6cdc05a960bdc6411f6fdb9e5fea
2023-11-08 20:33:49 +00:00
agireesh 541c6cd91d Fixed Share server migration test related to CIFS.
Modify "wait_for_resource_status" method so that we can pass the timeout
parameter from test cases and modify the test cases as per lib changes.

Change-Id: Id67589bf2d2094355003a16e3379867ba81bfb6b
2023-11-06 21:54:07 +05:30
Zuul 5d2d2b4a38 Merge "Stop skipping cephfs snapshot cloning test" 2023-11-02 09:20:06 +00:00
Zuul 4a2f09514f Merge "Optimize the dd command to improve performance" 2023-10-31 13:01:58 +00:00
Zuul 20a38d094a Merge "Re-enable IPv4 scenario tests in LVM driver job" 2023-10-31 09:06:09 +00:00
Zuul 7b8882908b Merge "Stop skipping test on volume existence detection" 2023-10-26 09:16:29 +00:00
Goutham Pacha Ravi ac3c750236 Stop skipping cephfs snapshot cloning test
The scenario test
`test_write_data_to_share_created_from_snapshot`
was being skipped because of a bug in ceph's MDS
service. It has now been addressed [1]

[1] https://tracker.ceph.com/issues/57210
Closes-Bug: #1989273

Change-Id: I967479458038b67c7892a71ac881491e1f8c87f7
Depends-On: Iea541d2edefc871bcac2d965997c88462fcbe521
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-10-23 19:27:00 +00:00
Zuul 08236b23bd Merge "Change the expected status response from Forbidden to NotFound" 2023-10-20 20:18:28 +00:00
lkuchlan 2c06e81bfd Change the expected status response from Forbidden to NotFound
In some share metadata operations performed on a share resource
in another project by member and reader users, the response
code is 403/Forbidden but actually it should be 404/Not Found.

Related-Bug: #2004230
Change-Id: I23f592aa0616dd000c91366056b19f73d4a92fa5
2023-10-20 17:47:35 +00:00
lkuchlan 192d408d70 Optimize the dd command to improve performance
Use if=/dev/zero: Instead of reading from /dev/urandom,
which is slow for generating random data, use /dev/zero
to write zeros to the disk. Zeros are generated much faster.
Omit conv=fsync: The conv=fsync option forces dd to
synchronize the data after each write, which can be slow for
large writes.

Change-Id: Id845c60c39072a03171fa5906461eb254c2736a7
2023-10-18 14:20:08 +00:00
Goutham Pacha Ravi 1ba0a8d94c Re-enable IPv4 scenario tests in LVM driver job
We had disabled scenario tests on the IPv6
test job manila-tempest-plugin-lvm [1] to prevent
gate failures at feature freeze. We can partially
re-enable these tests; while still working to
get IPv6 testing as well soon.

[1] https://review.opendev.org/c/openstack/manila-tempest-plugin/+/893651/
Related-bug: #1998489

Change-Id: Ie6599bc3533a002fa118ebe8b9243d677bdb410e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-10-17 15:53:07 -07:00
Zuul dae4d135da Merge "Add share transfer test." 2023-09-22 13:54:41 +00:00
haixin 1227546e7c Add share transfer test.
Partially-Implements: blueprint transfer-share-between-project

Change-Id: I74f0a079edb59e376d045fe9e9fd781acd70249d
2023-09-21 09:06:06 +08:00
Zuul a77dddc00c Merge "Change test manage share server with invalid id" 2023-09-19 14:46:11 +00:00
Zuul 0026dff138 Merge "[CI] Add multinode job for cephfs/nfs with cephadm" 2023-09-18 22:01:20 +00:00
Zuul 7a43ca0412 Merge "Stop using deprecated Nova APIs" 2023-09-15 21:16:49 +00:00
Pavlo Shchelokovskyy 88018ca2fa Stop using deprecated Nova APIs
some places in scenario manager were still using very long deprecated
nova APIs, like nova images and nova networks,
which breaks if tempest is configured to use nova microverson > 2.35.

Change-Id: I5b83e0d120525f7e8959f68a340635cf954bc7f8
2023-09-15 08:18:54 +00:00
Zuul dc97a5179a Merge "[CI] Disable glance RBAC enforcement in generic jobs" 2023-09-14 18:47:08 +00:00
Goutham Pacha Ravi 7cafa4cf4e Stop skipping test on volume existence detection
Depends-On: I7e05dcb343c932cc7fec8d395919053d0a1801ce
Change-Id: I3c99e4873cc7dc8bf8875fd3e3ed2f11d38a6dd7
Closes-Bug: #1901210
2023-09-14 00:34:41 +00:00
Zuul d6a4d27f49 Merge "[RBAC] Add share groups tests" 2023-09-12 19:40:25 +00:00
ashrod98 1bab3433f0 [CI] Add multinode job for cephfs/nfs with cephadm
A multinode job creates a controller node
that runs manila with other OpenStack components;
and an additional compute node to spread the
compute VM workload around.

`manila-tempest-plugin-multinode-cephfs-nfs-cephadm`
replaces the existing `manila-tempest-plugin-cephfs-nfs`
in the check queue for this repository. These jobs
are different. `manila-tempest-plugin-cephfs-nfs`
uses devstack-plugin-ceph to install ceph and nfs-ganesha
as standalone components on the devstack host, whereas
`manila-tempest-plugin-multinode-cephfs-nfs-cephadm` uses
cephadm to deploy ceph, and it includes the deployment
of an nfs service. Manila's ceph driver communicates with
cephadm deployed nfs via ceph-mgr APIs, and with standalone
nfs-ganesha service via DBUS APIs. Ideally we'd run
both jobs all the time, however, since these jobs will
run individually against the manila repository, we'll just
pick the newer one here.

Depends-On: I84249ae268dfe00a112c67e5170b679acb318a25
Change-Id: I5162815b66d3f3e8cf8c1e246b61b0ea06c1a270
Co-Authored-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-09-09 09:18:25 -07:00
Goutham Pacha Ravi 3b9a0c4537 [CI] Conform to re2 regexes in branch config
Zuul has deprecated Perl-style syntax; and we're
getting warnings posted against the manifests:

 The RE2 syntax error is: invalid perl operator: (?!

Change-Id: I498573532fd701b47684a54bda9b54b86836afdc
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-09-07 20:00:00 -07:00
silvacarloss 91ca00a96f Use Ubuntu Jammy and Temporarily disable scenario tests
A couple of issues happening at the moment:

- Nova recently merged a change that bumps the libvirt version in
the Bobcat release [1]. The new libvirt version is not available
in Ubuntu Focal. In order to get the new libvirt version, our jobs
that were using Ubuntu Focal, are now forced to use Jammy, so we
bump it to the new version in this patch.

- The support for Ubuntu Focal has also been dropped in this
release [2]. Making it one more reason to get the new jammy
images.

While upgrading the image, some other issues surfaced:

- Some CI jobs are doing IPv6 testing, which use quagga. Quagga
does not have a candidate for installation in Jammy and must be
replaced. This issue is already documented [3].

- The inability to set up IPv6, combined with the scenario tests
being enabled in the LVM and CEPH drivers brought up another known
issue: when doing IPv6 setup, we don't set up only IPv6 networking
and we also end up setting crucial information for the scenario
tests to run in the function that does IPv6 setup. So in case the
job is only using IPv4 in scenario testing, we currently don't set
some key configuration to let the shares be created/mounted [4].

- Due to the reasons above, the scenario tests will never pass, as
we can't use Focal images, and when using Jammy, we can't do
scenario testing.

This is blocking the Manila gate and all other changes in the CI.
As we are forced to use the Jammy image and the scenario tests
won't pass, we disable them in this change, do some refactoring
in Manila [5], and re-enable them again for IPv4, until we have
figured out the quagga replacement.

[1] https://review.opendev.org/c/openstack/nova/+/887255
[2] https://lists.openstack.org/pipermail/openstack-discuss/2023-September/034968.html
[3] https://bugs.launchpad.net/manila/+bug/1998489
[4] https://github.com/openstack/manila/blob/master/devstack/plugin.sh#L1104-L1116
[5] https://review.opendev.org/c/openstack/manila/+/893804

Change-Id: Ia45a8e7f7c9cf9959bcc9b9a7243cccbbd1f4916
2023-09-06 13:31:31 -03:00
lkuchlan 0f7345a4dd [RBAC] Add share groups tests
The tests validate policy of share groups actions for
admin, member and reader users in a project scope.

Change-Id: Iee0f739d9701b2efe9b275ea22859318b58a46be
2023-09-06 07:01:22 +00:00
Zuul b0ab2128cb Merge "Test resource locks" 2023-08-28 16:07:56 +00:00
Goutham Pacha Ravi 838733e183 [CI] Disable glance RBAC enforcement in generic jobs
We have a problem with glance's RBAC changes
in the generic driver. Disable the enforcement temporarily
while we explore a fix

Related-Bug: #2031191
Change-Id: Ia9c9eb4542c576e3e4d94334e62649abf3cb6faf
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-08-22 18:18:56 +00:00
Goutham Pacha Ravi 646fcd2e23 Test resource locks
Add API tests for the resource locks APIs

Change-Id: Idf71e236b1b8a2558bb4ad3de1018fa33b41877f
Partially-implements: bp/allow-locking-shares-against-deletion
Depends-On: I146bc09e4e8a39797e22458ff6860346e11e592e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-08-21 16:52:44 -07:00
Zuul 8d4a2decf0 Merge "Remove Glance v1 APIs tests code" 2023-08-15 21:35:58 +00:00
Goutham Pacha Ravi f60b52515b [CI] Drop test config workaround in standalone jobs
devstack seems to honor local.conf's test-config
properly now, and this workaround is no longer
necessary.

Change-Id: I4f52a9f2a7a2ca12083c47766615ec2e8fdd4a49
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-08-14 15:01:11 -07:00
Zuul efbad5d8dc Merge "[RBAC] Add share group type tests" 2023-08-11 01:09:15 +00:00
Zuul c6483c98ad Merge "Fix share network subnet cleanup" 2023-08-08 23:37:26 +00:00
niuke 7b825d8d83 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py

Change-Id: Idefdbf454ad18fbbd3c06c0eb864e143d8a419a7
2023-08-07 15:17:22 +08:00
Ghanshyam Mann 9cf773d9fb Remove Glance v1 APIs tests code
Glance v1 APIs were removed in Rocky and tempest master
does not support the Rocky release. If glance v1 APIs
needs to be tested for older release then older Tempest
can be used.

Tempest is removing the Glance v1 APIs tests, config option,
and its service clients and this change is needed for that.

Needed-By: https://review.opendev.org/c/openstack/tempest/+/890592
Change-Id: Ib7bbb274256a7e1d1e308adbd416d243ad7f8b54
2023-08-06 12:14:08 -07:00
Zuul 68fc053a27 Merge "Fixed multiple subnet negative tempest test" 2023-08-02 23:07:54 +00:00
Helena Dantas ab1c39cc29 Fixed multiple subnet negative tempest test
Changed skip_checks to verify if the flag
run_share_server_multiple_subnet_tests is enabled.

Changed the user that executes the command to retrieve the
share networks.

Closes-bug: #1966198
Change-Id: I93912f1683d5694a50a875c5dffbade958294e99
2023-07-31 12:37:29 +00:00
lkuchlan 5bd5f54073 [RBAC] Add share snapshot metadata tests
The tests validate policy of share snapshot metadata actions
for admin,member and reader users in a project scope.

Change-Id: I4de5c256ef468419cabf0293e05c0855fa67e095
2023-07-18 12:23:09 +00:00
lkuchlan 796f3ebff8 [RBAC] Add share group type tests
The tests validate policy of share group type actions
for admin, member and reader users in a project scope.

Change-Id: I759fe2b5048aea466cab9107cca68d70548bd347
2023-07-18 15:15:43 +03:00