Actions
Bug #22912
openStuck vSphere API breaks Foreman
Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Description
There are situations in which vSphere is broken and an API connection to vSphere gets stuck. This causes Foreman so completely break down as e.g. creating a VM happens inside an active record callback. This causes Foreman to get unresponsive eventually as all passenger processes are "in use", the passenger queue fills up and apache starts to drop connections.
The only way to solve this is by adding a timeout to the stuck vsphere connection.
- /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb
Timeout::timeout(20) do
vm = new_vm(args)
vm.firmware = 'bios' if vm.firmware == 'automatic'
vm.save
end
Updated by Marek Hulán about 7 years ago
From what I've heard, timeout implementation in Ruby stdlib is not great. Ivan, suggestions for something different? E.g. from concurrent ruby?
Actions