Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1910420

Summary: [RHOS 16.2] Cinder tempest plugin test fails with "Failed validating 'type' in schema['properties']['backup']['properties']['name']"
Product: Red Hat OpenStack Reporter: Archit Modi <amodi>
Component: openstack-tempestAssignee: Chandan Kumar <chkumar>
Status: CLOSED ERRATA QA Contact: Martin Kopec <mkopec>
Severity: high Docs Contact:
Priority: high    
Version: 16.2 (Train)CC: apevec, lhh, ltoscano, slinaber, udesale
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tempest-26.0.0-2.20210111142455.f9d31f2.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-15 07:11:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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