Feature #1243

resched command for onevm

Added by Chris Johnston over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:04/18/2012
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Scheduler
Target version:Release 3.6
Resolution:fixed Pull request:

Description

The following patch adds a resched command to onevm. This puts an active/running VM into resched/running state. On the next scheduler cycle, the scheduler will find a new host and live-migrate the VM. This is similar to the resubmit action but is non-destructive.

It provides a quick way to live-migrate VMs without having to think about destination host as the scheduler will make that decision based on the same scheduler rules that initially placed the VM. It would also be useful for a separate component that monitors host usage and reschedules VMs when thresholds are exceeded.

The patch is against 3.4.0. It would be great if this patch (not necessarily as submitted) was included in future releases.

resched-3.4.0.patch Magnifier (18.7 KB) Chris Johnston, 04/18/2012 03:04 PM

Associated revisions

Revision 8ff22105
Added by Ruben S. Montero over 7 years ago

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

Revision f2105549
Added by Ruben S. Montero over 7 years ago

feature #1243: Scheduler makes use of the resched flag. Needs to get live/cold migration type from config

Revision 38c5992c
Added by Ruben S. Montero over 7 years ago

feature #1243: Add configuration option to select the rescheduling type

Revision f64fccda
Added by Ruben S. Montero over 7 years ago

feature #1243: Do not store uneeded vars in Scheduler class

Revision 00b09519
Added by Ruben S. Montero over 7 years ago

feature #1243: Seting/Clearing resched flag requires ADMIN permissions. Bring back Sconstruct tests.

Revision 021cfd6f
Added by Ruben S. Montero over 7 years ago

feature #1243: Fix compilation warning

History

#1 Updated by Ruben S. Montero over 7 years ago

  • Category set to Scheduler
  • Status changed from New to Assigned
  • Assignee set to Ruben S. Montero
  • Target version set to Release 3.6

We've implemented this using a flag for the VMs to not add more states and transitions to the life-cycle state machine. The scheduler then gets VMs in pending state and those running with the rescheduling flag set. I was able to reuse part of your patch :)

The development is almost done. I want to do some more testing and set the type of migration (live or cold) in the scheduler configuration file. Then we can merge it to master.

Thanks for contributing this!

#2 Updated by Ruben S. Montero over 7 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Tests are now in place.
Type of rescheduling also in configuration file.
Documentation updated.

Changes are in master.

Also available in: Atom PDF