mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
Merge 38f962f514 into ad4e760f56
This commit is contained in:
commit
c78e8b68ca
4 changed files with 27 additions and 3 deletions
|
|
@ -33,6 +33,9 @@ module Vmpooler
|
|||
parsed_config[:config]['vm_checktime'] ||= 15
|
||||
parsed_config[:config]['vm_lifetime'] ||= 24
|
||||
|
||||
parsed_config[:config]['check_pending_port'] ||= 22
|
||||
parsed_config[:config]['check_pending_timeout'] ||= 5
|
||||
|
||||
# Create an index of pool aliases
|
||||
parsed_config[:pools].each do |pool|
|
||||
if pool['alias']
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
module Vmpooler
|
||||
class PoolManager
|
||||
|
||||
def initialize(config, logger, redis, graphite=nil)
|
||||
$config = config
|
||||
|
||||
|
|
@ -32,8 +33,8 @@ module Vmpooler
|
|||
|
||||
if host
|
||||
begin
|
||||
Timeout.timeout(5) do
|
||||
TCPSocket.new vm, 22
|
||||
Timeout.timeout($config[:config]['check_pending_timeout']) do
|
||||
TCPSocket.new vm, $config[:config]['check_pending_port']
|
||||
end
|
||||
move_pending_vm_to_ready(vm, pool, host)
|
||||
rescue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue