Hi,
I get testtools.matchers._impl.MismatchError in the following tests. I changed "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/volume/v3/attachments_client.py" file in this commit: https://review.opendev.org/c/openstack/tempest/+/891016/1/tempest/lib/services/volume/v3/attachments_client.py#34
-tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachScenarioOldVersion.test_old_versions_reject
-tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachmentScenario.test_server_detach_rules
Output 1:
tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachScenarioOldVersion.test_old_versions_reject
'''
$ stestr run tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachScenarioOldVersion.test_old_versions_reject
{0} tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachScenarioOldVersion.test_old_versions_reject [41.462875s] ... FAILED
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/common/utils/__init__.py", line 70, in wrapper
return f(*func_args, **func_kwargs)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/scenario/test_server_volume_attachment.py", line 191, in test_old_versions_reject
self.assertRaises(
File "/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line 468, in assertRaises
self.assertThat(our_callable, matcher)
File "/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line 481, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: <bound method BaseAttachmentTest._call_with_fake_service_token of <tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachScenarioOldVersion.test_old_versions_reject[compute,id-6f4d2144-99f4-495c-8b0b-c6a537971418,image,network,slow,volume] id=0x7f6f55a51760>> returned {'attachments': []}
Captured traceback-1:
~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/scenario/manager.py", line 931, in nova_volume_detach
servers_client.detach_volume(server['id'], volume['id'])
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/servers_client.py", line 480, in detach_volume
resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 339, in delete
return self.request('DELETE', url, extra_headers, headers, body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/base_compute_client.py", line 47, in request
resp, resp_body = super(BaseComputeClient, self).request(
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 742, in request
self._error_checker(resp, resp_body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 857, in _error_checker
raise exceptions.BadRequest(resp_body, resp=resp)
tempest.lib.exceptions.BadRequest: Bad request
Details: {'code': 400, 'message': "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-6816f92c-793c-4f33-b639-2e69159751b9)"}
Captured traceback-2:
~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/utils/test_utils.py", line 87, in call_and_ignore_notfound_exc
return func(*args, **kwargs)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/scenario/manager.py", line 931, in nova_volume_detach
servers_client.detach_volume(server['id'], volume['id'])
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/servers_client.py", line 480, in detach_volume
resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 339, in delete
return self.request('DELETE', url, extra_headers, headers, body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/base_compute_client.py", line 47, in request
resp, resp_body = super(BaseComputeClient, self).request(
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 742, in request
self._error_checker(resp, resp_body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 857, in _error_checker
raise exceptions.BadRequest(resp_body, resp=resp)
tempest.lib.exceptions.BadRequest: Bad request
Details: {'code': 400, 'message': "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-8e31dccb-9deb-4a62-bf47-534db4029bb3)"}
'''
Output 2:
tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachmentScenario.test_server_detach_rules
'''
$ stestr run tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachmentScenario.test_server_detach_rules
{0} tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachmentScenario.test_server_detach_rules [39.859514s] ... FAILED
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/common/utils/__init__.py", line 70, in wrapper
return f(*func_args, **func_kwargs)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/scenario/test_server_volume_attachment.py", line 103, in test_server_detach_rules
self.assertRaises(
File "/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line 468, in assertRaises
self.assertThat(our_callable, matcher)
File "/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line 481, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: <bound method BaseAttachmentTest._call_with_fake_service_token of <tempest.scenario.test_server_volume_attachment.TestServerVolumeAttachmentScenario.test_server_detach_rules[compute,id-be615530-f105-437a-8afe-ce998c9535d9,image,network,slow,volume] id=0x7fa2741cab20>> returned {}
Captured traceback-1:
~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/scenario/manager.py", line 931, in nova_volume_detach
servers_client.detach_volume(server['id'], volume['id'])
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/servers_client.py", line 480, in detach_volume
resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 339, in delete
return self.request('DELETE', url, extra_headers, headers, body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/base_compute_client.py", line 47, in request
resp, resp_body = super(BaseComputeClient, self).request(
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 742, in request
self._error_checker(resp, resp_body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 857, in _error_checker
raise exceptions.BadRequest(resp_body, resp=resp)
tempest.lib.exceptions.BadRequest: Bad request
Details: {'code': 400, 'message': "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-2d541106-5318-4048-89b8-8bcb873106a6)"}
Captured traceback-2:
~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/utils/test_utils.py", line 87, in call_and_ignore_notfound_exc
return func(*args, **kwargs)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/scenario/manager.py", line 931, in nova_volume_detach
servers_client.detach_volume(server['id'], volume['id'])
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/servers_client.py", line 480, in detach_volume
resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 339, in delete
return self.request('DELETE', url, extra_headers, headers, body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/services/compute/base_compute_client.py", line 47, in request
resp, resp_body = super(BaseComputeClient, self).request(
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 742, in request
self._error_checker(resp, resp_body)
File "/opt/venv/tempest/lib/python3.8/site-packages/tempest/lib/common/rest_client.py", line 857, in _error_checker
raise exceptions.BadRequest(resp_body, resp=resp)
tempest.lib.exceptions.BadRequest: Bad request
Details: {'code': 400, 'message': "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-ac361ffa-fe87-4f3f-93a6-97522c3e9338)"}
'''
Openstack version: Zed
Openstack VolumeV3 Version: 3.70
tempest.conf:
'''
# A list of backend names separated by comma. The backend name must be
# declared in cinder.conf (list value)
#backend_names = BACKEND_1,BACKEND_2
backend_names = rbd-1,rbd-2,r2-pure-dev,r2-pure-dev-iscsi
# Volume type to be used while creating volume. (string value)
volume_type = "r2-pure-dev"
# Multiattach volume type used while creating multiattach volume.
# (string value)
#volume_type_multiattach =
# Backend protocol to target when creating volume types (string value)
storage_protocol = "NVMe-RoCE"
# Backend vendor to target when creating volume types (string value)
vendor_name = "Pure Storage"
[volume-feature-enabled]
# Runs Cinder multi-backend test (requires 2 backends) (boolean value)
multi_backend = true
'''
Regards,
Hi, CVE-2023- 2088), until the fix for this issue is merged into your environment OpenStack version, you may skip these two test cases.
The two test cases you mentioned have been newly introduced specifically to test for the presence of a certain security vulnerability in cinder(
Bug: /bugs.launchpad .net/nova/ +bug/2004555
https:/
cinder commit: /review. opendev. org/c/openstack /cinder/ +/882836
https:/
tempest commit: /review. opendev. org/c/openstack /tempest/ +/882876
https:/