Project

General

Profile

Actions

Bug #22912

open

Stuck vSphere API breaks Foreman

Added by Timo Goebel about 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.

  1. /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
Actions #1

Updated by Marek Hulán about 6 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

Also available in: Atom PDF