Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #14431
getUploadParamsForIso accepts a checksum but drops it when preparing the
ISO record. Pass it through IsoUploadParams so it is saved on the template.
The Kubernetes supported-version ISO upload uses this same path.
Verify the uploaded file on the SSVM before running the install script or
creating TemplateLocation metadata. A checksum mismatch or verification
error stops processing and is reported through the existing upload error
handler. This also prevents template sync from finding install metadata
for an unchecked file.
Remove both -c checksum arguments from the install script call. The
script treats -c as a flag, so passing a digest there breaks argument
parsing. Check the digest in Java instead, using the existing DigestHelper.
This shared processing also handles template and volume POST uploads.
Checksum remains optional. This change needs the updated SSVM code.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Uploaded files must match the checksum supplied by the user.
Screenshots (if appropriate):
Not applicable. Backend change.
How Has This Been Tested?
All 42 targeted tests passed, covering ISO preparation, the template
adapter, SSVM upload processing and the HTTP upload handler.
Required modules compiled and Checkstyle passed.
How did you try to break this feature and the system with this change?
Added eight regression tests covering:
Tests also verify that no checksum is passed as a script option and
verification happens before installation and metadata creation.