Bug 1910420 - [RHOS 16.2] Cinder tempest plugin test fails with "Failed validating 'type' in schema['properties']['backup']['properties']['name']"
Summary: [RHOS 16.2] Cinder tempest plugin test fails with "Failed validating 'type' i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tempest
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Chandan Kumar
QA Contact: Martin Kopec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-23 20:48 UTC by Archit Modi
Modified: 2021-09-15 07:11 UTC (History)
5 users (show)

Fixed In Version: openstack-tempest-26.0.0-2.20210111142455.f9d31f2.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-15 07:11:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1894844 0 None None None 2021-01-07 10:58:39 UTC
OpenStack gerrit 750360 0 None MERGED Volume backup response schemas are incorrect 2021-02-16 20:04:30 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:11:21 UTC

Description Archit Modi 2020-12-23 20:48:42 UTC
Description of problem: On a RHOS 16.2 deployment, following cinder tempest plugin tests fail while validating schema:

cinder_tempest_plugin.api.volume.admin.test_volume_backup.VolumesBackupsTest.test_backup_crossproject_admin_negative
 cinder_tempest_plugin.api.volume.admin.test_volume_backup.VolumesBackupsTest.test_backup_crossproject_user_negative
 cinder_tempest_plugin.api.volume.admin.test_volume_backup.VolumesBackupsTest.test_incremental_backup_respective_parents

How reproducible: always

Steps to Reproduce:
1. Deploy RHOS 16.2
2. Run above mentioned tempest plugin tests
3. Tests fail with the error: "jsonschema.exceptions.ValidationError: None is not of type 'string'"

Actual results:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tempest/lib/common/rest_client.py", line 976, in validate_response
    format_checker=FORMAT_CHECKER)
  File "/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 541, in validate
    cls(schema, *args, **kwargs).validate(instance)
  File "/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 130, in validate
    raise error
jsonschema.exceptions.ValidationError: None is not of type 'string'

Failed validating 'type' in schema['properties']['backup']['properties']['name']:
    {'type': 'string'}

On instance['backup']['name']:
    None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cinder_tempest_plugin/api/volume/admin/test_volume_backup.py", line 96, in test_incremental_backup_respective_parents
    volume_id=volume['id'])['backup']
  File "/usr/lib/python3.6/site-packages/tempest/lib/services/volume/v3/backups_client.py", line 38, in create_backup
    self.validate_response(schema.create_backup, resp, body)
  File "/usr/lib/python3.6/site-packages/tempest/lib/common/rest_client.py", line 979, in validate_response
    raise exceptions.InvalidHTTPResponseBody(msg)
tempest.lib.exceptions.InvalidHTTPResponseBody: HTTP response body is invalid json or xml
Details: HTTP response body is invalid (None is not of type 'string'

Failed validating 'type' in schema['properties']['backup']['properties']['name']:
    {'type': 'string'}

On instance['backup']['name']:
    None)

Expected results:
Tests pass

Additional info:
Job and logs info in #c1

Comment 2 Luigi Toscano 2021-01-07 10:58:40 UTC
Those are new tests (new for 16.2), and they are meant to test a fix that should be in the code. The error is most  due to an incorrect schema definition in tempest for the volume backup calls, and it appears to have been fixed by https://review.opendev.org/c/openstack/tempest/+/750360
See also https://bugs.launchpad.net/tempest/+bug/1894844

Moving to tempest (this may be fixed by a tempest rebase).

Comment 3 Martin Kopec 2021-01-07 11:28:15 UTC
RDO bump by https://review.rdoproject.org/r/#/c/31405/, downstream should follow in a bit

Comment 6 Martin Kopec 2021-02-14 18:25:41 UTC
The Fixed in version package contains the fix for this issue, moving to VERIFIED.
The fix has been also verified by a downstream job which has passed after it installed a openstack-tempest containing the fix.

Comment 9 errata-xmlrpc 2021-09-15 07:11:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483


Note You need to log in before you can comment on or make changes to this bug.