Merge "Fix lack of share type id in share creation"
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 5f0bf6a..99f7e90 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,3 +1,3 @@
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+sphinx>=1.7.0 # BSD
openstackdocstheme>=1.31.2 # Apache-2.0
reno>=2.5.0 # Apache-2.0
diff --git a/manila_tempest_tests/config.py b/manila_tempest_tests/config.py
index aebf4a9..dc16100 100644
--- a/manila_tempest_tests/config.py
+++ b/manila_tempest_tests/config.py
@@ -334,6 +334,18 @@
cfg.IntOpt("share_size",
default=1,
help="Default size in GB for shares created by share tests."),
+ cfg.IntOpt("additional_overflow_blocks",
+ default=0,
+ help="Additional blocks to be written "
+ "to share in scenario tests."),
+ cfg.IntOpt("share_resize_sync_delay",
+ default=0,
+ help="Time to wait before the changes to the share size"
+ " are propagated to the storage system."),
+ cfg.IntOpt("share_growth_size",
+ default=1,
+ help="The default increase in size sought by tests"
+ " when validating share resizing within scenario tests."),
cfg.BoolOpt("run_ipv6_tests",
default=False,
help="Enable or disable running IPv6 NFS scenario tests. "
diff --git a/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py b/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py
index 98a1361..c212095 100644
--- a/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py
+++ b/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py
@@ -20,6 +20,7 @@
from testtools import testcase as tc
from manila_tempest_tests.common import constants
+from manila_tempest_tests.common import waiters
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
@@ -67,6 +68,9 @@
cls.access = cls.shares_v2_client.create_access_rule(
cls.share["id"], cls.access_type, cls.access_to,
'rw', metadata={u"key1": u"value1"})['access']
+ waiters.wait_for_resource_status(
+ cls.shares_v2_client, cls.share["id"], "active",
+ resource_name='access_rule', rule_id=cls.access["id"])
@decorators.idempotent_id('d2d41db8-ae00-4641-a5ec-499cee1877f1')
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
diff --git a/manila_tempest_tests/tests/api/test_share_groups.py b/manila_tempest_tests/tests/api/test_share_groups.py
index ab6b9d1..dbc673c 100644
--- a/manila_tempest_tests/tests/api/test_share_groups.py
+++ b/manila_tempest_tests/tests/api/test_share_groups.py
@@ -401,6 +401,8 @@
# Delete share group
self.shares_v2_client.delete_share_group(
share_group['id'], version=constants.MIN_SHARE_GROUP_MICROVERSION)
+ self.shares_v2_client.wait_for_resource_deletion(
+ share_group_id=share_group['id'])
# Delete subnet
self.shares_v2_client.delete_subnet(
diff --git a/manila_tempest_tests/tests/scenario/test_share_extend.py b/manila_tempest_tests/tests/scenario/test_share_extend.py
index 450d2d4..39098dc 100644
--- a/manila_tempest_tests/tests/scenario/test_share_extend.py
+++ b/manila_tempest_tests/tests/scenario/test_share_extend.py
@@ -9,6 +9,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+import time
import ddt
from oslo_log import log as logging
@@ -50,6 +51,8 @@
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
def test_create_extend_and_write(self):
default_share_size = CONF.share.share_size
+ additional_overflow_blocks = CONF.share.additional_overflow_blocks
+ share_growth_size = CONF.share.share_growth_size
LOG.debug('Step 1 - create instance')
instance = self.boot_instance(wait_until="BUILD")
@@ -77,30 +80,36 @@
self.write_data_to_mounted_share_using_dd(remote_client,
'/mnt/t1', '64M',
three_quarter_blocks)
+ time.sleep(CONF.share.share_resize_sync_delay)
ls_result = remote_client.exec_command("sudo ls -lAh /mnt/")
LOG.debug(ls_result)
- over_one_quarter_blocks = total_blocks - three_quarter_blocks + 5
+ # Additional blocks that exceed the share capacity, defaulting to 5.
+ overflow_blocks = (
+ total_blocks - three_quarter_blocks +
+ additional_overflow_blocks or 5)
LOG.debug('Step 6b - Write more data, should fail')
self.assertRaises(
exceptions.SSHExecCommandFailed,
self.write_data_to_mounted_share_using_dd,
- remote_client, '/mnt/t2', '64M', over_one_quarter_blocks)
+ remote_client, '/mnt/t2', '64M', overflow_blocks)
+ time.sleep(CONF.share.share_resize_sync_delay)
ls_result = remote_client.exec_command("sudo ls -lAh /mnt/")
LOG.debug(ls_result)
LOG.debug('Step 7 - extend and wait')
- extended_share_size = default_share_size + 1
+ extended_share_size = default_share_size + share_growth_size
self.shares_v2_client.extend_share(share["id"],
new_size=extended_share_size)
waiters.wait_for_resource_status(
self.shares_v2_client, share["id"], constants.STATUS_AVAILABLE)
share = self.shares_v2_client.get_share(share["id"])['share']
self.assertEqual(extended_share_size, int(share["size"]))
+ time.sleep(CONF.share.share_resize_sync_delay)
LOG.debug('Step 8 - writing more data, should succeed')
self.write_data_with_remount(location, remote_client, '/mnt/t3',
- '64M', over_one_quarter_blocks)
+ '64M', overflow_blocks)
ls_result = remote_client.exec_command("sudo ls -lAh /mnt/")
LOG.debug(ls_result)
diff --git a/manila_tempest_tests/tests/scenario/test_share_shrink.py b/manila_tempest_tests/tests/scenario/test_share_shrink.py
index fab7e0a..431bfc2 100644
--- a/manila_tempest_tests/tests/scenario/test_share_shrink.py
+++ b/manila_tempest_tests/tests/scenario/test_share_shrink.py
@@ -80,6 +80,7 @@
self.write_data_to_mounted_share_using_dd(remote_client,
'/mnt/t1', '64M',
blocks)
+ time.sleep(CONF.share.share_resize_sync_delay)
ls_result = remote_client.exec_command("sudo ls -lAh /mnt/")
LOG.debug(ls_result)
@@ -117,10 +118,11 @@
self.assertEqual(default_share_size, int(share["size"]))
LOG.debug('Step 11 - write more data than allocated, should fail')
+ overflow_blocks = blocks + CONF.share.additional_overflow_blocks
self.assertRaises(
exceptions.SSHExecCommandFailed,
self.write_data_to_mounted_share_using_dd,
- remote_client, '/mnt/t1', '64M', blocks)
+ remote_client, '/mnt/t1', '64M', overflow_blocks)
LOG.debug('Step 12 - unmount')
self.unmount_share(remote_client)
diff --git a/requirements.txt b/requirements.txt
index 108bbee..ae5ea16 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,8 +1,4 @@
-# The order of packages is significant, because pip processes them in the order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
-
-pbr!=2.1.0,>=2.0.0 # Apache-2.0
+pbr>=3.0.0 # Apache-2.0
ddt>=1.6.0 # MIT
oslo.log>=3.36.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index e422e93..761bf70 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,10 +1,6 @@
-# The order of packages is significant, because pip processes them in the order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
+hacking>=3.0.1,<3.1.0 # Apache-2.0
-hacking>=3.0.1,<3.1.0;python_version>'3' # Apache-2.0
-
-coverage!=4.4,>=4.0 # Apache-2.0
+coverage>=4.4.1 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
diff --git a/zuul.d/manila-tempest-jobs.yaml b/zuul.d/manila-tempest-jobs.yaml
index 02d07fe..cd48dd8 100644
--- a/zuul.d/manila-tempest-jobs.yaml
+++ b/zuul.d/manila-tempest-jobs.yaml
@@ -174,8 +174,8 @@
environment with IPv6 control plane endpoints.
parent: manila-tempest-plugin-ipv6-base
abstract: true
- required-projects:
- - openstack/neutron-dynamic-routing
+ # TODO(carloss): enable neutron-dynamic-routing setup when LP #1998489
+ # is fixed.
vars:
tempest_test_regex: '(^manila_tempest_tests.tests)(?=.*\[.*\bbackend\b.*\])'
devstack_services: &devstack-with-ovs
@@ -194,6 +194,7 @@
q-l3: true
q-meta: true
q-metering: true
+ openstack-cli-server: true
devstack_localrc:
# NOTE(gouthamr): LP#1940324 prevents bgp usage with OVN, use OVS
Q_AGENT: openvswitch
@@ -213,8 +214,8 @@
MANILA_SETUP_IPV6: true
NEUTRON_CREATE_INITIAL_NETWORKS: false
MANILA_RESTORE_IPV6_DEFAULT_ROUTE: false
- devstack_plugins:
- neutron-dynamic-routing: https://opendev.org/openstack/neutron-dynamic-routing
+ # TODO(carloss): enable neutron-dynamic-routing setup when LP #1998489
+ # is fixed.
devstack_local_conf:
test-config:
$TEMPEST_CONFIG:
@@ -415,7 +416,12 @@
vars:
configure_swap_size: 8192
tempest_test_regex: manila_tempest_tests.tests
- tempest_exclude_regex: '(^manila_tempest_tests.tests.scenario.*ceph_fuse.*)'
+ # NOTE(gouthamr): Avoiding ceph fuse tests to conserve resources;
+ # we're hoping we'd get sufficient coverage through kernel tests.
+ # test_extend_share: https://bugs.launchpad.net/manila/+bug/2075981
+ tempest_exclude_regex: "\
+ (^manila_tempest_tests.tests.scenario.*ceph_fuse.*)|\
+ (^manila_tempest_tests.tests.scenario.test_share_extend.*)"
devstack_localrc:
ENABLE_CEPH_NOVA: false
CEPHADM_DEPLOY: true
@@ -433,7 +439,8 @@
parent: manila-tempest-plugin-base
required-projects:
- openstack/devstack-plugin-ceph
- - openstack/neutron-dynamic-routing
+ # TODO(carloss): enable neutron-dynamic-routing setup when LP #1998489
+ # is fixed.
vars:
tempest_concurrency: 2
# turning off some tests due to exhaustion of disk space
@@ -444,7 +451,8 @@
devstack_services: *devstack-with-ovs # LP 1940324
devstack_plugins:
devstack-plugin-ceph: https://opendev.org/openstack/devstack-plugin-ceph
- neutron-dynamic-routing: https://opendev.org/openstack/neutron-dynamic-routing
+ # TODO(carloss): enable neutron-dynamic-routing setup when LP #1998489
+ # is fixed.
devstack_localrc:
# NOTE(gouthamr): LP#1940324 prevents bgp usage with OVN, use OVS
Q_AGENT: openvswitch
@@ -487,9 +495,14 @@
parent: manila-tempest-plugin-cephfs-nfs-base
branches: *ubuntu_jammy_test_image_branches
vars:
+ tempest_concurrency: 1
# TODO(gouthamr): some tests are disabled due to bugs
# IPv6 Tests: https://bugs.launchpad.net/manila/+bug/1998489
- tempest_exclude_regex: "(^manila_tempest_tests.tests.scenario.*IPv6.*)"
+ # test_share_extend: https://bugs.launchpad.net/manila/+bug/2075981
+ tempest_exclude_regex: "\
+ (^manila_tempest_tests.tests.scenario.*IPv6.*)|\
+ (^manila_tempest_tests.tests.scenario.test_share_extend.*)"
+ tempest_test_regex: '(^manila_tempest_tests.tests)(?=.*\[.*\bbackend\b.*\])'
devstack_localrc:
CEPHADM_DEPLOY: True
CEPHADM_DEV_OSD: True
@@ -498,10 +511,11 @@
TARGET_DEV_OSD_DIR: /opt/stack
ENABLED_SHARE_PROTOCOLS: NFS
MANILA_OPTGROUP_cephfsnfs_cephfs_ganesha_server_ip: "{{ hostvars[inventory_hostname]['nodepool']['private_ipv4'] }}"
- CEPH_RELEASE: "quincy"
+ CEPH_RELEASE: "reef"
MANILA_SETUP_IPV6: false
NEUTRON_CREATE_INITIAL_NETWORKS: true
IP_VERSION: 4
+ CEPH_INGRESS_IP: "{{hostvars['controller'].ansible_default_ipv6.address}}"
- job:
name: manila-tempest-plugin-multinode-base
@@ -555,7 +569,10 @@
tempest_concurrency: 2
# TODO(gouthamr): some tests are disabled due to bugs
# IPv6 Tests: https://bugs.launchpad.net/manila/+bug/1998489
- tempest_exclude_regex: "(^manila_tempest_tests.tests.scenario.*IPv6.*)"
+ # test_share_extend: https://bugs.launchpad.net/manila/+bug/2075981
+ tempest_exclude_regex: "\
+ (^manila_tempest_tests.tests.scenario.*IPv6.*)|\
+ (^manila_tempest_tests.tests.scenario.test_share_extend.*)"
devstack_localrc:
MYSQL_REDUCE_MEMORY: True
CEPHADM_DEPLOY: True
@@ -578,6 +595,7 @@
MANILA_SETUP_IPV6: false
SHARE_DRIVER: manila.share.drivers.cephfs.driver.CephFSDriver
TARGET_DEV_OSD_DIR: /opt/stack
+ CEPH_INGRESS_IP: "{{hostvars['controller'].ansible_default_ipv6.address}}"
devstack_local_conf:
test-config:
$TEMPEST_CONFIG:
diff --git a/zuul.d/manila-tempest-stable-jobs.yaml b/zuul.d/manila-tempest-stable-jobs.yaml
index a6b5e2b..8a4495e 100644
--- a/zuul.d/manila-tempest-stable-jobs.yaml
+++ b/zuul.d/manila-tempest-stable-jobs.yaml
@@ -69,6 +69,19 @@
vars: *manila_tempest_image_pinned_vars
- job:
+ name: manila-tempest-plugin-lvm-caracal
+ parent: manila-tempest-plugin-lvm-base
+ override-checkout: stable/2024.1
+ vars:
+ # TODO(gouthamr): some tests are disabled due to bugs
+ # IPv6 Tests: https://bugs.launchpad.net/manila/+bug/1998489
+ # drop these overrides once we address that bug.
+ tempest_exclude_regex: '(^manila_tempest_tests.tests.scenario.*IPv6.*)'
+ devstack_localrc:
+ MANILA_SETUP_IPV6: false
+ NEUTRON_CREATE_INITIAL_NETWORKS: true
+
+- job:
name: manila-tempest-plugin-lvm-bobcat
parent: manila-tempest-plugin-lvm-base
override-checkout: stable/2023.2
@@ -99,12 +112,6 @@
MANILA_SERVICE_IMAGE_URL: https://tarballs.opendev.org/openstack/manila-image-elements/images/manila-service-image-1.3.0-76-ga216835.qcow2
MANILA_SERVICE_IMAGE_NAME: manila-service-image-1.3.0-76-ga216835
-- job:
- name: manila-tempest-plugin-lvm-zed
- parent: manila-tempest-plugin-lvm-base
- override-checkout: stable/zed
- vars: *manila_tempest_image_pinned_vars
-
- project-template:
name: manila-tempest-plugin-jobs-using-service-image-stable
description: |
diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml
index 06204d6..a6b15af 100644
--- a/zuul.d/project.yaml
+++ b/zuul.d/project.yaml
@@ -8,9 +8,9 @@
jobs:
- manila-tempest-plugin-dummy-no-dhss
- manila-tempest-plugin-dummy-dhss
+ - manila-tempest-plugin-lvm-caracal
- manila-tempest-plugin-lvm-bobcat
- manila-tempest-plugin-lvm-antelope
- - manila-tempest-plugin-lvm-zed
- manila-tempest-plugin-dummy-no-dhss-rbac
- manila-tempest-plugin-container:
voting: false