pushing work from server

This commit is contained in:
secgen server
2017-10-13 11:47:39 +01:00
parent a68079786e
commit 6b87f6ca31
2 changed files with 9 additions and 4 deletions

View File

@@ -109,7 +109,7 @@ def get_delete_opts
end
def parse_opts(opts)
options = {:instances => '', :max_threads => 1, :id => '', :all => false}
options = {:instances => '', :max_threads => 3, :id => '', :all => false}
opts.each do |opt, arg|
case opt
when '--instances'

View File

@@ -133,7 +133,7 @@ def build_vms(project_dir, options)
command = '--provision reload'
end
retry_count = (options[:ovirtuser] and options[:ovirtpass]) ? 5 : 0
retry_count = (options[:ovirtuser] and options[:ovirtpass]) ? 10 : 0
successful_creation = false
while retry_count and !successful_creation
@@ -149,8 +149,13 @@ def build_vms(project_dir, options)
end
else
if retry_count > 0
Print.err 'Error creating VMs, retrying...'
command += ' --provision' unless command.include? ' --provision'
Print.err 'Error creating VMs, destroying VMs and retrying...'
if GemExec.exe('vagrant', project_dir, 'destroy')
Print.info 'VMs destroyed'
else
Print.err 'Failed to destroy VMs. Exiting.'
exit 1
end
sleep(10)
else
Print.err 'Error creating VMs, exiting SecGen.'