mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(maint) Move VM Only When SSH Check Succeeds
An SSH check was added before moving a VM from pending to ready. However, the result of that check did not matter and move_pending would still be called. This moves the move_pending call to within the begin block that holds the SSH check. If the check fails, then only fail_pending will be called.
This commit is contained in:
parent
6395d0227e
commit
b8bdfe1301
1 changed files with 1 additions and 2 deletions
|
|
@ -35,11 +35,10 @@ module Vmpooler
|
||||||
Timeout.timeout(5) do
|
Timeout.timeout(5) do
|
||||||
TCPSocket.new vm, 22
|
TCPSocket.new vm, 22
|
||||||
end
|
end
|
||||||
|
move_pending_vm_to_ready(vm, pool, host)
|
||||||
rescue
|
rescue
|
||||||
fail_pending_vm(vm, pool, timeout)
|
fail_pending_vm(vm, pool, timeout)
|
||||||
end
|
end
|
||||||
|
|
||||||
move_pending_vm_to_ready(vm, pool, host)
|
|
||||||
else
|
else
|
||||||
fail_pending_vm(vm, pool, timeout)
|
fail_pending_vm(vm, pool, timeout)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue