Skip to content

Commit

Permalink
Allow setting cpu mode again
Browse files Browse the repository at this point in the history
The value for `cpu.dig(:model, :name)` is always `nil` since that's the
condition in the `if` statement. It was intended to still respect the
cpu mode option passed in.

Fixes: 7a3a46b ("Prefer CPU host pass through over explicit models")
  • Loading branch information
ekohl committed Aug 26, 2024
1 parent 14ac85e commit ec4c6d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fog/libvirt/models/compute/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def to_xml
end
else
xml.cpu(
:mode => cpu.dig(:model, :name) || "host-passthrough",
:mode => cpu.fetch(:mode, "host-passthrough"),
:check => cpu.fetch(:check, "none"),
:migratable => cpu.fetch(:migratable, "on")
)
Expand Down

0 comments on commit ec4c6d0

Please sign in to comment.