mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-09 05:27:20 +09:00
feature #1243: Add resched flag to VMs. Includes associated logic to make it work: RM methods, OCA bindings, CLI commands. LCM updated to clear the resched flag when leaving the running state Fixes VM tests
This commit is contained in:
1 parent
d364c3e57f
commit
8ff221052d
16 files changed
+255
-37
No files matched your search
@@ -586,6 +586,22 @@ public:
|
||||
lcm_state = s;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the re-scheduling flag
|
||||
* @param set or unset the re-schedule flag
|
||||
*/
|
||||
void set_resched(bool do_sched)
|
||||
{
|
||||
if ( do_sched == true )
|
||||
{
|
||||
resched = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
resched = 0;
|
||||
}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Timers
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -720,6 +736,11 @@ private:
|
||||
*/
|
||||
LcmState lcm_state;
|
||||
|
||||
/**
|
||||
* Marks the VM as to be re-scheduled
|
||||
*/
|
||||
int resched;
|
||||
|
||||
/**
|
||||
* Start time, the VM enter the nebula system (in epoch)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user