Skip to content

webadmin: trim OVA path before submit on import dialog - #1144

Merged
dupondje merged 1 commit into
oVirt:masterfrom
ryan-ronnander:linbit/mbs-ova-path-trim
May 11, 2026
Merged

webadmin: trim OVA path before submit on import dialog#1144
dupondje merged 1 commit into
oVirt:masterfrom
ryan-ronnander:linbit/mbs-ova-path-trim

Conversation

@ryan-ronnander

Copy link
Copy Markdown
Contributor
  • pasted paths with leading/trailing whitespace were sent verbatim, causing FileNotFoundError from the ovirt-ova-query ansible role
  • trim at the model boundary (ImportVmsModel + ImportTemplatesModel) so user input never reaches the engine with whitespace
  • null-safe; null paths still pass through unchanged

Fixes #1143 - Discovered while testing the upstream MBS feature push (#1138, #1133, #1125, oVirt/vdsm#459). The bug itself is not MBS-specific. Affects any OVA import.

Changes introduced with this PR

  • ImportVmsModel: trim the OVA path before passing to setIsoName
  • ImportTemplatesModel: same trim before passing to setIsoName
  • null-safe: null paths pass through unchanged

Are you the owner of the code you are sending in, or do you have permission of the owner?

Yes

@ryan-ronnander
ryan-ronnander requested a review from sgratch as a code owner May 5, 2026 21:54
- pasted paths with leading/trailing whitespace were sent verbatim,
  causing FileNotFoundError from the ovirt-ova-query ansible role
- trim at the model boundary (ImportVmsModel + ImportTemplatesModel)
  so user input never reaches the engine with whitespace
- null-safe; null paths still pass through unchanged

Signed-off-by: Ryan Ronnander <rronnander@linbit.com>

@JasperB-TeamBlue JasperB-TeamBlue left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small but good fix, tested it out and LGTM.

@JasperB-TeamBlue

Copy link
Copy Markdown
Collaborator

/ost

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

⏳ Running ost suite 'basic-suite-master' on distro 'centos9'.

Follow the progress here.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

😎💪 ost suite 'basic-suite-master' on distro 'centos9' finished successfully. (details)

@dupondje
dupondje merged commit a766b3f into oVirt:master May 11, 2026
3 checks passed
@ryan-ronnander
ryan-ronnander deleted the linbit/mbs-ova-path-trim branch July 10, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OVA import fails on file paths with leading or trailing whitespace

3 participants