Skip to content

Commit 11f3821

Browse files
committed
Allow setting cpu mode again
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")
1 parent df19a30 commit 11f3821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/fog/libvirt/models/compute/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def to_xml
307307
end
308308
else
309309
xml.cpu(
310-
:mode => cpu.dig(:model, :name) || "host-passthrough",
310+
:mode => cpu.fetch(:mode, "host-passthrough"),
311311
:check => cpu.fetch(:check, "none"),
312312
:migratable => cpu.fetch(:migratable, "on")
313313
)

0 commit comments

Comments
 (0)