mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
M #-: Fix return code if sched-action add fails (#2641)
(cherry picked from commit 868828464c9c918031908ba11a1bb104ed611c43)
This commit is contained in:
parent
6f445a3f4e
commit
e5b7426a05
@ -459,7 +459,8 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
|
||||
rc = vm.sched_action_add(tmp_str)
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
return rc
|
||||
STDERR.puts rc.message
|
||||
return -1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1457,10 +1457,7 @@ CommandParser::CmdParser.new(ARGV) do
|
||||
action.to_s,
|
||||
time[:warning][:time] + acc_w)
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
STDERR.puts rc.message
|
||||
exit(-1)
|
||||
end
|
||||
exit(-1) if rc < 0
|
||||
|
||||
acc_t += time[:time].to_i
|
||||
acc_w += time[:warning][:time].to_i
|
||||
|
Loading…
x
Reference in New Issue
Block a user