mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Log everything that comes from stderr(cherry picked from commit ba954f3bb3458d2439b5ea853fb18b8b74de91d7)
This commit is contained in:
parent
d57afb1494
commit
5a3408a64b
@ -86,17 +86,17 @@ class GenericCommand
|
||||
|
||||
if @code!=0
|
||||
log("Command execution fail: #{command}")
|
||||
log("STDERR follows.")
|
||||
log(@stderr)
|
||||
end
|
||||
|
||||
log(@stderr)
|
||||
|
||||
return @code
|
||||
end
|
||||
|
||||
|
||||
# Parses error message from +stderr+ output
|
||||
def get_error_message
|
||||
tmp=@stderr.scan(/^ERROR MESSAGE --8<------\n(.*?)ERROR MESSAGE ------>8--$/m)
|
||||
return "Error message not available" if !tmp[0]
|
||||
return "-" if !tmp[0]
|
||||
tmp[0].join(' ').strip
|
||||
end
|
||||
|
||||
@ -179,14 +179,14 @@ class RemotesCommand < SSHCommand
|
||||
|
||||
cmd = self.new(cmd_string, host, logger, stdin)
|
||||
cmd.run
|
||||
|
||||
|
||||
if cmd.code == MAGIC_RC
|
||||
cmd.update_remotes(host, remote_dir, logger)
|
||||
|
||||
@command = command
|
||||
cmd.run
|
||||
end
|
||||
|
||||
|
||||
while cmd.code != 0 and retries != 0
|
||||
sleep 1
|
||||
cmd.run
|
||||
|
Loading…
x
Reference in New Issue
Block a user