1
0
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:
Pavel Czerný 2023-06-21 09:33:35 +02:00 committed by Ruben S. Montero
parent 6f445a3f4e
commit e5b7426a05
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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