Repository navigation
scs-0128: remove ListUserImagesTest due to Glance format enforcement - #1300
shresth-kumar-lal wants to merge 3 commits into
Conversation
OpenStack Glance enables image format enforcement by default following OSSA-2024-001. Under format enforcement, Tempest's ListUserImagesTest fails because dummy/synthetic image data uploaded during test setup is rejected by Glance. Remove these tests from tempest-tests-non-admin.lst to prevent false failures against compliant Glance deployments. Fixes SovereignCloudStack#1299 Signed-off-by: Shresth Kumar Lal <shresthkumarlal@gmail.com>
- Implement compute_scs_0104_custom_image_upload validating Glance image upload mandated by SCS-0104 with a valid minimal raw payload. - Validate image schemas (get_images_schema, get_image_schema), image details, and parameter filtering (visibility, status, disk/container format, limit) to retain baseline SCS-0128 test coverage. - Add cleanup_images to Janitor in cleanup.py to ensure test images prefixed with '_scs-' are safely removed. - Register scs_0104_custom_image_upload in openstack_test.py. Signed-off-by: Shresth Kumar Lal <shresthkumarlal@gmail.com>
|
Per @toothstone's feedback on #1299, I have added a companion commit to this PR:
|
|
Hi @shresth-kumar-lal, thanks for this contribution! I had a quick look, and at first glance, it looks very good! This change here supplies the new testcase, but it doesn't incorporate the new testcase into the overall tests. I think I shall check whether all current partners pass this test, and then we (meaning us SCS folks, including you if you like!) can talk in the SIG Std/Cert on November 26th, 2026 whether and how best to include this new testcase. Thanks again! 🚀 |
|
|
||
| image_id = test_image.id | ||
| logger.info(f"Uploading image payload for ID: {image_id}...") | ||
| conn.image.set_image_data(image_id, payload) |
There was a problem hiding this comment.
I'm afraid I'm getting an error message here:
ERROR: Error during SCS-0104 custom image upload test: 'Proxy' object has no attribute 'set_image_data'
Traceback (most recent call last):
File "/home/mbue/opensrc/standards-shresth-kumar-lal/Tests/iaas/scs_0104_standard_images/standard_images.py", line 201, in compute_scs_0104_custom_image_upload
conn.image.set_image_data(image_id, payload)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Proxy' object has no attribute 'set_image_data'. Did you mean: 'get_image_cache'?
Replace non-existent conn.image.set_image_data() call with openstacksdk's native conn.image.create_image(..., data=io.BytesIO(payload), wait=True). Signed-off-by: Shresth Kumar Lal <shresthkumarlal@gmail.com>
|
Thanks for catching that @mbuechse! I've pushed a fix replacing Looking forward to the partner test results and discussing inclusion at the SIG Std/Cert meeting on Nov 26! |
Description
Glance now enforces image format validation by default to mitigate security vulnerabilities (OSSA-2024-001). Under strict format validation, Tempest tests under
ListUserImagesTestfail because bogus/synthetic test payloads uploaded during test setup are rejected by Glance.Following the discussion in #1299, these tests are incompatible with upstream Glance security defaults and should be removed from the non-admin test suite.
Changes
tempest.api.image.v2.test_images.ListUserImagesTest.*fromTests/iaas/scs_0128_e2e_testing/tempest-tests-non-admin.lst.Fixes #1299.