mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
B #-: Fix s3 import (#1001)
Use exit_status of downloader.sh instead STDERR downloader.sh returns "Exporting image: 100% complete...done." to STDERR for small rbd image, even if exits with 0
This commit is contained in:
parent
41ae39e41e
commit
6ffc05d107
@ -115,13 +115,14 @@ end
|
||||
|
||||
cmd = "#{UTILS_PATH}/downloader.sh #{import_source} -"
|
||||
|
||||
Open3.popen3(cmd) do |_, o, e, _|
|
||||
Open3.popen3(cmd) do |_, o, e, wt|
|
||||
body = o.read(read_length)
|
||||
|
||||
if o.eof?
|
||||
exit_status = wt.value
|
||||
error = Thread.new { e.read }.value
|
||||
|
||||
unless error.empty?
|
||||
unless exit_status.success?
|
||||
STDERR.puts error
|
||||
exit 1
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user