Skip to content

Compute profile - fix duplicate disks & nics#190

Merged
evgeni merged 1 commit intotheforeman:masterfrom
stejskalleos:ls/duplicate_disk
Mar 2, 2026
Merged

Compute profile - fix duplicate disks & nics#190
evgeni merged 1 commit intotheforeman:masterfrom
stejskalleos:ls/duplicate_disk

Conversation

@stejskalleos
Copy link
Contributor

How to test

  • Go to compute profile
  • Add / edit / remove storage and interfaces
    🍏 Make sure no empty duplicate disks/nics are shown in the form
    🍏 Make sure CRUD operations work

Risk

This fix edits the new_vm method, so the impact might be across the entire provisioning process.

@evgeni
Copy link
Member

evgeni commented Mar 2, 2026

It works (tested with rubygem-foreman_kubevirt-0.5.2-1.20260226144348065801.pr190.4.gfac5f28.el9.noarch), but I am struggling to see which part of the diff is the fix. Is it the rename of the variables? The removal of <<?

@evgeni
Copy link
Member

evgeni commented Mar 2, 2026

FTR, the bug was introduced in 4a501b4

@stejskalleos
Copy link
Contributor Author

but I am struggling to see which part of the diff is the fix. Is it the rename of the variables? The removal of <<?

"The removal of <<" is the actual fix.
Renaming variables is a readability improvement.

@evgeni
Copy link
Member

evgeni commented Mar 2, 2026

(FTR²: the nics are not duplicated today, as we don't add interfaces in vm_instance_defaults but it's still good to fix that too)

@evgeni evgeni merged commit 0d6123d into theforeman:master Mar 2, 2026
9 checks passed
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.

2 participants