mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-09 09:57:23 +03:00
Also fix error code for onevm create-chart (cherry picked from commit 18a4796ea16704966ba34a04f08dbb2068479ab8)
This commit is contained in:
parent
3c9bfecbd1
commit
8f99e99236
@ -464,7 +464,11 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
|
|||||||
tmp_str << "TIME = #{options[:schedule]}"
|
tmp_str << "TIME = #{options[:schedule]}"
|
||||||
tmp_str << str_periodic << ']'
|
tmp_str << str_periodic << ']'
|
||||||
|
|
||||||
vm.sched_action_add(tmp_str)
|
rc = vm.sched_action_add(tmp_str)
|
||||||
|
|
||||||
|
if OpenNebula.is_error?(rc)
|
||||||
|
return rc
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1507,10 +1507,15 @@ CommandParser::CmdParser.new(ARGV) do
|
|||||||
charters.each do |action, time|
|
charters.each do |action, time|
|
||||||
sched = "+#{time[:time].to_i + acc_t + diff_stime}"
|
sched = "+#{time[:time].to_i + acc_t + diff_stime}"
|
||||||
|
|
||||||
helper.schedule_actions([args[0]].flatten,
|
rc = helper.schedule_actions([args[0]].flatten,
|
||||||
{ :schedule => sched },
|
{ :schedule => sched },
|
||||||
action.to_s,
|
action.to_s,
|
||||||
time[:warning][:time] + acc_w)
|
time[:warning][:time] + acc_w)
|
||||||
|
|
||||||
|
if OpenNebula.is_error?(rc)
|
||||||
|
STDERR.puts rc.message
|
||||||
|
exit(-1)
|
||||||
|
end
|
||||||
|
|
||||||
acc_t += time[:time].to_i
|
acc_t += time[:time].to_i
|
||||||
acc_w += time[:warning][:time].to_i
|
acc_w += time[:warning][:time].to_i
|
||||||
|
@ -3637,6 +3637,14 @@ void VirtualMachineDiskResize::request_execute(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Authorize the operation
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
if (vm_authorization(id, 0, 0, att, 0, 0, 0) == false)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool img_ds_quota, vm_ds_quota;
|
bool img_ds_quota, vm_ds_quota;
|
||||||
int img_id = -1;
|
int img_id = -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user