mirror of
https://github.com/OpenNebula/one.git
synced 2025-09-24 01:44:14 +03:00
@@ -400,7 +400,7 @@ class ExecDriver < VirtualMachineDriver
|
|||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
local_dfile = action.data[:local_dfile]
|
local_dfile = action.data[:local_dfile]
|
||||||
|
|
||||||
if !local_dfile || File.zero?(local_dfile)
|
if !local_dfile || File.empty?(local_dfile)
|
||||||
send_message(ACTION[:deploy], RESULT[:failure], id,
|
send_message(ACTION[:deploy], RESULT[:failure], id,
|
||||||
"Cannot open deployment file #{local_dfile}")
|
"Cannot open deployment file #{local_dfile}")
|
||||||
return
|
return
|
||||||
|
@@ -224,9 +224,9 @@ class MicroVM
|
|||||||
t_start = Time.now
|
t_start = Time.now
|
||||||
timeout = @one.fcrc[:cgroup_delete_timeout]
|
timeout = @one.fcrc[:cgroup_delete_timeout]
|
||||||
|
|
||||||
next while !File.read(path).empty? && (Time.now - t_start < timeout)
|
next while !File.empty?(path) && (Time.now - t_start < timeout)
|
||||||
|
|
||||||
File.read(path).empty?
|
File.empty?(path)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
end
|
end
|
||||||
# rubocop:enable Lint/SuppressedException
|
# rubocop:enable Lint/SuppressedException
|
||||||
|
Reference in New Issue
Block a user