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)

This commit is contained in:
Pavel Czerný 2023-06-21 09:33:35 +02:00 committed by GitHub
parent e3f1f4b260
commit 868828464c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

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

View File

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