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)
This commit is contained in:
parent
e3f1f4b260
commit
868828464c
@ -467,7 +467,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
|
||||
|
@ -1512,10 +1512,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