diff --git a/src/scheduler/etc/sched.conf b/src/scheduler/etc/sched.conf index 1ee77c2910..c992f8d35b 100644 --- a/src/scheduler/etc/sched.conf +++ b/src/scheduler/etc/sched.conf @@ -30,10 +30,12 @@ # 1 = Striping. Heuristic that tries to maximize resources available for # the VMs by spreading the VMs in the hosts # 2 = Load-aware. Heuristic that tries to maximize resources available for -# the VMs by usingthose nodes with less load +# the VMs by using those nodes with less load # 3 = Custom. # - rank: Custom arithmetic exprission to rank suitable hosts based in their # attributes +# 4 = Fixed. Hosts will be ranked according to the PRIORITY attribute found +# in the Host or Cluster template. # # DEFAULT_DS_SCHED: Definition of the default storage scheduling algorithm # - policy: @@ -44,6 +46,8 @@ # 2 = Custom. # - rank: Custom arithmetic exprission to rank suitable datastores based on # their attributes +# 3 = Fixed. Datastores will be ranked according to the PRIORITY attribute +# found in the Datastore template. # # # LOG: Configuration for the logging system diff --git a/src/scheduler/src/sched/SchedulerTemplate.cc b/src/scheduler/src/sched/SchedulerTemplate.cc index 05c943ef6f..a419d5fe0e 100644 --- a/src/scheduler/src/sched/SchedulerTemplate.cc +++ b/src/scheduler/src/sched/SchedulerTemplate.cc @@ -155,6 +155,10 @@ string SchedulerTemplate::get_policy() const rank = sched->vector_value("RANK"); break; + case 4: //Fixed + rank = "PRIORITY"; + break; + default: rank = ""; } @@ -201,6 +205,10 @@ string SchedulerTemplate::get_ds_policy() const rank = sched->vector_value("RANK"); break; + case 3: //Fixed + rank = "PRIORITY"; + break; + default: rank = ""; } diff --git a/src/vmm_mad/remotes/ec2/ec2_driver.rb b/src/vmm_mad/remotes/ec2/ec2_driver.rb index 26c865b700..897a903e2b 100755 --- a/src/vmm_mad/remotes/ec2/ec2_driver.rb +++ b/src/vmm_mad/remotes/ec2/ec2_driver.rb @@ -307,6 +307,7 @@ class EC2Driver host_info = "HYPERVISOR=ec2\n" host_info << "PUBLIC_CLOUD=YES\n" + host_info << "PRIORITY=-1\n" host_info << "TOTALMEMORY=#{totalmemory.round}\n" host_info << "TOTALCPU=#{totalcpu}\n" host_info << "CPUSPEED=1000\n"