mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
F #2427: Default to different vnets for VM NICS. Add new configuration attributes to sched.conf
This commit is contained in:
parent
e9805a788b
commit
9a99332aec
@ -33,8 +33,8 @@
|
||||
# 2 = Load-aware. Heuristic that tries to maximize resources available for
|
||||
# the VMs by using those nodes with less load
|
||||
# 3 = Custom.
|
||||
# - rank: Custom arithmetic expression to rank suitable hosts based in their
|
||||
# attributes
|
||||
# - rank: Custom arithmetic expression 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.
|
||||
#
|
||||
@ -45,11 +45,24 @@
|
||||
# 1 = Striping. Tries to optimize I/O by distributing the VMs across
|
||||
# datastores.
|
||||
# 2 = Custom.
|
||||
# - rank: Custom arithmetic exprission to rank suitable datastores based on
|
||||
# their attributes
|
||||
# - 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.
|
||||
#
|
||||
# DEFAULT_NIC_SCHED: Definition of the default virtual network scheduler
|
||||
# - policy:
|
||||
# 0 = Packing. Tries to pack address usage by selecting the VNET with
|
||||
# less free leases
|
||||
# 1 = Striping. Tries to distribute address usage across VNETs.
|
||||
# 2 = Custom.
|
||||
# - rank: Custom arithmetic exprission to rank suitable datastores based
|
||||
# on their attributes
|
||||
# 3 = Fixed. Virtual Networks will be ranked according to the PRIORITY
|
||||
# attribute found in the Virtual Network template.
|
||||
#
|
||||
# DIFFERENT_VNETS: When set (YES) the NICs of a VM will be forced to be in
|
||||
# different Virtual Networks.
|
||||
#
|
||||
# LOG: Configuration for the logging system
|
||||
# - system: defines the logging system:
|
||||
@ -87,6 +100,8 @@ LIVE_RESCHEDS = 0
|
||||
|
||||
MEMORY_SYSTEM_DS_SCALE = 0
|
||||
|
||||
DIFFERENT_VNETS = YES
|
||||
|
||||
DEFAULT_SCHED = [
|
||||
policy = 1
|
||||
]
|
||||
@ -95,6 +110,10 @@ DEFAULT_DS_SCHED = [
|
||||
policy = 1
|
||||
]
|
||||
|
||||
DEFAULT_NIC_SCHED = [
|
||||
policy = 1
|
||||
]
|
||||
|
||||
#DEFAULT_SCHED = [
|
||||
# policy = 3,
|
||||
# rank = "- (RUNNING_VMS * 50 + FREE_CPU)"
|
||||
|
@ -108,7 +108,6 @@ void Scheduler::start()
|
||||
ostringstream oss;
|
||||
|
||||
string etc_path;
|
||||
string diff_vnets_str;
|
||||
|
||||
unsigned int live_rescheds;
|
||||
|
||||
@ -158,21 +157,7 @@ void Scheduler::start()
|
||||
|
||||
conf.get("MEMORY_SYSTEM_DS_SCALE", mem_ds_scale);
|
||||
|
||||
conf.get("DIFFERENT_VNETS", diff_vnets_str);
|
||||
|
||||
one_util::toupper(diff_vnets_str);
|
||||
|
||||
if (diff_vnets_str != "" )
|
||||
{
|
||||
if ( diff_vnets_str == "NO" )
|
||||
{
|
||||
diff_vnets = false;
|
||||
}
|
||||
else if ( diff_vnets_str == "YES" )
|
||||
{
|
||||
diff_vnets = true;
|
||||
}
|
||||
}
|
||||
conf.get("DIFFERENT_VNETS", diff_vnets);
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Log system & Configuration File
|
||||
|
@ -123,7 +123,7 @@ void SchedulerTemplate::set_conf_default()
|
||||
conf_default.insert(make_pair(attribute->name(),attribute));
|
||||
|
||||
//DIFFERENT_VNETS
|
||||
value = "NO";
|
||||
value = "YES";
|
||||
|
||||
attribute = new SingleAttribute("DIFFERENT_VNETS",value);
|
||||
conf_default.insert(make_pair(attribute->name(),attribute));
|
||||
|
Loading…
x
Reference in New Issue
Block a user