Feature #2347

[anti-]affinity functionality for VMs to be placed in the same physical host

Added by OpenNebula Systems Support Team almost 8 years ago. Updated about 4 years ago.

Status:ClosedStart date:09/30/2013
Priority:SponsoredDue date:
Assignee:-% Done:

0%

Category:Core & System
Target version:Release 5.4
Resolution:fixed Pull request:

Description

The idea is to be able to tell OpenNebula whether a group of VMs should be placed in the same physical host (affinity) or each in a different host (antiaffinity).

The best fit for this request is to handle it at the OneFlow level. A template for a VM that participates on a Service would be able to include:

AFFINITY_TEMPLATE_IDs=<templateid-A>,<templateid-B>
ANTI_AFFINITY_TEMPLATE_IDs=<templateid-X>,<templateid-Y>

-- This VM would then be placed by OpenNebula in a physical host where VMs belonging to the same service AND coming from templates ID=(A or B) are already running or will be placed by OpenNebula afterwards.
-- VMs from the same service coming from templates with ID=(X or Y) won't be placed in this physical host.

Associated revisions

Revision 7381aa40
Added by Ruben S. Montero over 4 years ago

F #2347: VMGroup base classes, intial version

Revision 17749cb5
Added by Ruben S. Montero over 4 years ago

F #2347: Allocate, delete and info API calls for the VMGroup

Revision ef25d182
Added by Ruben S. Montero over 4 years ago

F #2347: VMGroup Roles managed in a separate clas

Revision 973aac07
Added by Ruben S. Montero over 4 years ago

F #2347: Better parsing of VMGroup attributes

Revision 202b47e9
Added by Ruben S. Montero over 4 years ago

F #2347: Fix bugs. Show role names in vm group output

Revision 8b3abfab
Added by Ruben S. Montero over 4 years ago

F #2347: Mora API calls for VMGroup

Revision 1b4c5437
Added by Ruben S. Montero over 4 years ago

F #2347: Add/del methods for VMGroup

Revision a6fc7b23
Added by Ruben S. Montero over 4 years ago

F #2347: VMs are added/removed from VMGROUP roles. VMGROUP with VMs
cannot be updated

Revision 20d10c7b
Added by Ruben S. Montero over 4 years ago

F #2347: Fixes some bugs to VMGroups

Revision 0cd63c2d
Added by Ruben S. Montero over 4 years ago

F #2347: ACL support for VMGroups

Revision a85f4a63
Added by Ruben S. Montero over 4 years ago

F #2347: Show the total number of VMs in Group in list

Revision a1c1dee1
Added by Ruben S. Montero over 4 years ago

F #2347: Moved VMGroup logic from VirtualMachine to VMGroupPool. Added
authorization tests to VMGroup usage in VMs

Revision 97c5fcd2
Added by Ruben S. Montero over 4 years ago

F #2347: VMGroupRule class. Methods to check rule consistency

Revision b2f15970
Added by Ruben S. Montero over 4 years ago

F #2347: Add placement rules consistency checks

Revision 9fd82d98
Added by Ruben S. Montero over 4 years ago

F #2347: Base classes for Scheduler to gather VMGroup information

Revision 184bd79e
Added by Ruben S. Montero over 4 years ago

F #2347: Split rule and role logic in different objects and libraries to reuse it in scheduler

Revision 70ce3469
Added by Ruben S. Montero over 4 years ago

F #2347: Load roles and rules in the scheduler. Helper methods to
generate requirement expressions

Revision d73a57da
Added by Ruben S. Montero over 4 years ago

F #2347: Dump VMGroups in scheduler output for DEBUG

Revision 685b0bd9
Added by Ruben S. Montero over 4 years ago

F #2347: Set antiaffinity placement constraints for VMs

Revision 7c948b3a
Added by Ruben S. Montero over 4 years ago

F #2347: Host affinity rules

Revision 09fafc3b
Added by Ruben S. Montero over 4 years ago

F #2347: Get information about VMs in VMGroups

Revision 5bd214ab
Added by Ruben S. Montero over 4 years ago

F #2347: Schedule affined groups

Revision 90ed2f5c
Added by Ruben S. Montero over 4 years ago

F #2347: Re-evaluate host requirements in dispatch loop to fulfil anti-affinity rules

Revision a845425a
Added by Ruben S. Montero over 4 years ago

F #2347: Fix minor bugs in CLI. Better dispatching for affined groups,
fix issue for anti-affined sets

Revision f3a3f9cd
Added by Ruben S. Montero over 4 years ago

F #2347: Update default ACLS to grant VMGroup create permission

Revision 4c1d4de4
Added by Ruben S. Montero over 4 years ago

F #2347: Add more information in onevmgroup show command for each role

Revision 882f1bc7
Added by Juan Jose Montiel Cano over 4 years ago

Feature 2347 (#192)

  • F #2347 changed install.sh file for add the new JSON
  • F #2347 Added a new JSON file for the new tab VMGroup
  • F #2347 added a new file and folder for the new tab VMGroup
  • F #2347 changed name to vm_group
  • F #2347 removed roles tab in fill function, for update
  • F #2347 Finalized vm_group tab
  • F #2347 removed test file and changed role tab hbs

Revision 9e0db5fd
Added by Juan Jose Montiel Cano over 4 years ago

Feature 2347 (#192)

  • F #2347 changed install.sh file for add the new JSON
  • F #2347 Added a new JSON file for the new tab VMGroup
  • F #2347 added a new file and folder for the new tab VMGroup
  • F #2347 changed name to vm_group
  • F #2347 removed roles tab in fill function, for update
  • F #2347 Finalized vm_group tab
  • F #2347 removed test file and changed role tab hbs

(cherry picked from commit 882f1bc778e23b69b815e2f866c739d3941fc571)

Revision a787b938
Added by Abel Coronado over 4 years ago

F #2347 .yaml includes the new VMGroup tab (PR #195)

Revision cd4e926a
Added by Juan Jose Montiel Cano over 4 years ago

Changes (#198)

  • Zoom graphs
  • activated zoom and pan in graphs
  • F #4359 Added auth panel to user settings
  • F #2347 Added new section to VMTemplate for select a vmgroup
  • F #2347 Added new checkbox for select vmgroup
  • Removed conflict HEAD
  • F #2347 Added possibility of select a vmgroup when:
    - Instantiate a VM
    - Create or Update a TEMPLATE
  • Added new actions
  • Added UID, GID and REQUEST_ID to placement into vm tab
  • remove binding.pry()
  • Updated vmgroup
  • F #2347 changed checkbox per select when fill the vmgroup
  • F #2347 Checking same group values

Revision 7000edf7
Added by Ruben S. Montero over 4 years ago

F #2347: better output for onevm

Revision 2090e4e5
Added by Juan Jose Montiel Cano over 4 years ago

Master bis (#203)

  • removed bug of creation of template and vm
  • F #2347 added section for vmgroup into cloud.yaml
  • F #2347 added section for select vmgroup when you intanciate a machine
  • F #2347 Filling mvgroup when instantiating a vm from a template

Revision add0ca1b
Added by Juan Jose Montiel Cano over 4 years ago

Feature 2347 (#205)

  • F #2347 Added label VM Group
  • F #2347 Added new column to show the number of vms
  • F #2347 changed notifier string error
  • F #2347 Added the new column to the .yamls
  • F #2347 Added panel vms for show the vms of a role

Revision 59c23fe5
Added by Ruben S. Montero over 4 years ago

F #2347: Include build options for JAVA tests

Revision d119f8cb
Added by Javi Fontan over 4 years ago

F #2347: add onevmgroup man page

Revision 649f09bc
Added by Juan Jose Montiel Cano over 4 years ago

Feature 2347 (#217)

  • F #2347 Allowed to enter point in field name of the role

Revision a7403bc1
Added by Abel Coronado over 4 years ago

F #2347 Added invalid chars into role name (&|:\\;/'#{}$<>) (#224)

History

#1 Updated by OpenNebula Systems Support Team almost 8 years ago

It would be more useful to incorporate this into the core of OpenNebula and scheduler so that it supports the resched functionality, and taking into account the count of VMs as well.

AFFINITY=”SELF<2,X=1,Y>1,Z=0”

1. less that 2 of my template id
2. exactly 1 X template id
3. greater than 1 Y template id
4. none of Z template id

Additionally, using an AFFINITY_TAG may be more useful than the TEMPLATE_ID.

For example:

AFFINITY_TAG = database
AFFINITY_RULE = "database < 2"

This would allow for affinity rules to work across different templates that specify the same tag.

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

  • Tracker changed from Request to Backlog
  • Priority changed from Normal to High

#3 Updated by Ruben S. Montero over 4 years ago

  • Tracker changed from Backlog to Feature
  • Category changed from OneFlow to Core & System
  • Priority changed from High to Sponsored
  • Target version set to Release 5.4

#4 Updated by Ruben S. Montero about 4 years ago

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

Also available in: Atom PDF