Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

However if a planner is added that needs to use resources exclusively for an account, then we will need some kind of resource reservation between planners.

e.g Refer to the Implicit Dedication Planner being added as part of this 4.2 release.

...

  1. Planner Choice in ServiceOffering:
    1. Admin can set a deployment_planner to be used while creating a service offering. Changes are needed to createServiceOffering API to add a deployment_planner.
    2. During VM deployment, each planner can check if it is supposed to execute based on the ServiceOffering of the VM being deployed. DeploymentPlanner :: canHandle() can be modified to do this check.
  2. Reservation Mechanism:
    1. As part of the Affinity feature, a new manager on top of deployment planners is added, called as the DeploymentPlanningManager. This manager can handle the resource reservation as well.
    2. Currently, the DPM invokes the planners to find suitable host and storage pools for the VM being deployed.
    3. After a planner finds a host to use, DPM can make a check if that host is reserved by any planner explicitly or if it can be shared across planners.
    4. Wiki MarkupWhen a planner like the \ [Implicit Dedication Planner\] chooses a host for deployment, DPM can store it as a 'dedicated' host. No other planner will be able to pick it up for any other VM deployment.
    5. VMs deployed through FirstFitPlanner, UserDispersingPlanner and UserConcentratedPodPlanner can share hosts - so DPM can mark those hosts as 'shared'.
    6. DPM will store this reservation info in a separate table 'op_host_planner_reservation'
    7. Also in order to free up the reservations, DPM can listen to VM state transitions. When a VM is stopped, DPM can check if the host has no other VMs. If yes, it can free up the reservation so that it can be picked up by other planner.

...

  1. Additional column to service_offering:
    ALTER TABLE `cloud`.`service_offering` ADD COLUMN `deployment_planner` varchar(255) COMMENT 'Planner heuristics used to deploy a VM of this offering; if null global config vm.deployment.planner is used';
  2. A new table to store planner reservations. Following are some columns needed:
    CREATE TABLE `cloud`.`op_host_planner_reservation` (
      `id` bigint unsigned NOT NULL auto_increment,
      `data_center_id` bigint unsigned NOT NULL,
      `pod_id` bigint unsigned,
      `cluster_id` bigint unsigned,
      `host_id` bigint unsigned,
      `resource_usage` varchar(255) COMMENT 'Shared(between planners) Vs Dedicated (exclusive usage to a planner)',
      PRIMARY KEY  (`id`),
      INDEX `i_op_host_planner_reservation__host_resource_usage`(`host_id`, `resource_usage`),
      CONSTRAINT `fk_planner_reservation__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
      CONSTRAINT `fk_planner_reservation__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES `cloud`.`data_center`(`id`) ON DELETE CASCADE,
      CONSTRAINT `fk_planner_reservation__pod_id` FOREIGN KEY (`pod_id`) REFERENCES `cloud`.`host_pod_ref`(`id`) ON DELETE CASCADE,
      CONSTRAINT `fk_planner_reservation__cluster_id` FOREIGN KEY (`cluster_id`) REFERENCES `cloud`.`cluster`(`id`) ON DELETE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;unmigrated-wiki-markup
  3. Global config variable to choose a planner if no planner is selected in the ServiceOffering
    INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.deployment.planner', 'FirstFitPlanner', '\[''FirstFitPlanner'', ''UserDispersingPlanner'', ''UserConcentratedPodPlanner''\]: DeploymentPlanner heuristic that will be used for VM deployment.');
  4. INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'host.reservation.release.period', '300000', 'The interval in milliseconds between host reservation release checks');

...