1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

Feature #2435 #2092: New host and ds sched policy: fixed

This new policy simply uses the PRIORITY template attribute
that the admin can set manually.
This commit is contained in:
Carlos Martín 2013-11-21 12:16:14 +01:00 committed by Javi Fontan
parent b2cb9c10f6
commit f1b88a7436
3 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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 = "";
}

View File

@ -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"