Permalink
Browse files

Fixed tests after last commit

  • Loading branch information...
1 parent 459e887 commit a21fc5057ec74e612c0c830db077d89da7640bb9 @pauloricardomg pauloricardomg committed Jul 22, 2010
Showing with 565 additions and 55 deletions.
  1. +1 −1 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/cumulus.conf
  2. +20 −0 ...e/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/global-policies.conf
  3. +10 −0 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/network.conf
  4. +9 −0 ...ice/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  5. +23 −0 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.xml
  6. +108 −0 ...ice/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/spotinstances.conf
  7. +1 −1 ...va/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/cumulus.conf
  8. +20 −0 .../suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/global-policies.conf
  9. +10 −0 ...va/tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/network.conf
  10. +1 −0 .../spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/authz-callout-sql.xml
  11. +9 −0 ...s/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  12. +25 −1 .../tests/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/other/main.xml
  13. +108 −0 ...ts/suites/spotinstances/noresources/home/services/etc/nimbus/workspace-service/spotinstances.conf
  14. +1 −1 ...s/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/cumulus.conf
  15. +20 −0 .../spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/global-policies.conf
  16. +10 −0 ...s/suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/network.conf
  17. +1 −0 ...stances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/authz-callout-sql.xml
  18. +9 −0 ...nstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  19. +25 −1 ...suites/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/other/main.xml
  20. +108 −0 ...es/spotinstances/singleresourcepool/home/services/etc/nimbus/workspace-service/spotinstances.conf
  21. +8 −7 ...potinstances/src/org/globus/workspace/testing/suites/spotinstances/SingleResourcePoolSISuite.java
  22. +14 −15 ...ce/service/java/tests/unit/org/globus/workspace/spotinstances/MaximizeProfitPricingModelTest.java
  23. +22 −22 ...rvice/java/tests/unit/org/globus/workspace/spotinstances/MaximizeUtilizationPricingModelTest.java
  24. +2 −6 service/service/java/tests/unit/org/globus/workspace/spotinstances/PricingModelTestUtils.java
@@ -5,4 +5,4 @@ cumulus.authz.db=$NIMBUS_HOME/cumulus/etc/authz.db
cumulus.repo.dir=$NIMBUS_HOME/cumulus/posixdata
cumulus.host=
cumulus.repo.bucket=Repo
-cumulus.repo.prefix=VM
+cumulus.repo.prefix=VMS
@@ -67,3 +67,23 @@ termination.offset.seconds=600
# per-use if one justs wants to limit all static IP use
allow.static.addresses=false
+
+
+# POLICY: allow.other.schemes
+#
+# If 'true' this allows clients to use file URL schemes other than "cumulus://"
+# or file://" for images. It leaves it up to workspace-control or other special
+# mechanisms (like "allowed.http.hosts" configuration below) to decide on
+# the authorization question.
+
+allow.other.schemes=false
+
+
+# POLICY: allowed.http.hosts
+#
+# This is a list of hosts that the users are allowed to propagate images from
+# via http propagation. This should be a comma separated list.
+#
+# If http is desired, "allow.other.propagation.schemes" above must be enabled.
+
+allowed.http.hosts=
@@ -17,5 +17,15 @@
# of 2, 6, A or E"
#
# Setting a too-long prefix will limit the amount of IPs you can support.
+#
+# MAC addresses can also be explictly assigned in the network-pool files.
+# Explicit MACs do not need to start with this prefix.
mac.prefix=A2:AA:BB
+
+# Network to choose netsample IP and MAC from. This is only generally used
+# when you are first installing Nimbus and attempting to get correct network
+# bridging working on your VMM. Specifying an invalid or empty network here
+# will result in the netsample file not being written.
+
+netsample.network=public
@@ -64,6 +64,15 @@
value="$CUMULUS{" />
</bean>
+ <bean id="siSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/spotinstances.conf" />
+ <property name="placeholderPrefix"
+ value="$SI{" />
+ </bean>
+
<bean id="accountingSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
@@ -152,6 +152,8 @@
value="$GLOBAL{termination.offset.seconds}" />
<property name="defaultRunningTimeSeconds"
value="$GLOBAL{default.runtime.seconds}" />
+ <property name="allowedHttpHosts"
+ value="$GLOBAL{allowed.http.hosts}" />
<!-- Property values coming via common.conf -->
<property name="fake" value="$COMMON{fake.mode}" />
@@ -274,6 +276,13 @@
<property name="networksDir" value="$COMMON{conf.dir}/network-pools" />
<property name="macPrefix" value="$NETWORK{mac.prefix}" />
+ <property name="netSampleNetwork" value="$NETWORK{netsample.network}" />
+ <property name="netSampleResource"
+ value="$COMMON{persistence.dir}/control.netsample.txt" />
+ <property name="dhcpdEntriesResource"
+ value="$COMMON{persistence.dir}/dhcpd.entries" />
+ <property name="ipMacResource"
+ value="$COMMON{persistence.dir}/ip_macs.txt" />
</bean>
@@ -538,16 +547,30 @@
org.globus.workspace.spotinstances.* interfaces
=================================================================== -->
+ <bean id="nimbus-rm.spotinstances.pricingmodel"
+ class="$SI{si.pricingmodel}" />
+
<bean id="nimbus-rm.spotinstances.manager"
class="org.globus.workspace.spotinstances.SpotInstancesManagerImpl">
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.home.instance"/>
<constructor-arg ref="nimbus-rm.home.group"/>
+ <constructor-arg value="$SI{si.basic.minprice}" />
+ <constructor-arg ref="nimbus-rm.spotinstances.pricingmodel" />
<!-- set after object creation time to avoid circular dep -->
<property name="creationManager" ref="nimbus-rm.creation" />
+
+ <!-- Property values coming via spotinstances.conf -->
+ <property name="minReservedMem"
+ value="$SI{si.policies.minreservedmem}" />
+ <property name="maxUtilization"
+ value="$SI{si.policies.maxutilization}" />
+ <property name="instanceMem"
+ value="$SI{si.basic.mem}" />
+
</bean>
@@ -0,0 +1,108 @@
+################################################################################
+#
+# This file is used for configuring Spot Instances within this site
+#
+################################################################################
+
+###########################
+# GENERAL CONFIGURATION:
+###########################
+
+# Indicates whether the Spot Instances feature
+# is enabled (true) or disabled (false) for this site
+
+si.enabled=true
+
+# A pricing model is invoked every time the Spot Instances
+# environment changes. This can happen in many situations:
+# when a request arrives, is canceled or terminated, when
+# the quantity of resources available for Spot Instances
+# increases or decreases, etc.
+#
+# Given the actual requests, the maximum quantity of VMs for
+# Spot Instances and the current spot price, a pricing model
+# defines the next spot price based on this variables.
+# Usually a spot price change causes requests to be allocated,
+# if their bid is above the spot price, or pre-empted, if their
+# bid is below the current spot price.
+#
+# This property defines which implementation of the
+# org.globus.workspace.spotinstances.PricingModel
+# interface should be used by the Spot Instances module
+# to set the spot price. This class will be constructed
+# by reflection, so it must be in the classpath of the
+# Nimbus executable.
+#
+# Currently there are two default implementations of that
+# interface, explained as follows:
+#
+# ** org.globus.workspace.spotinstances.MaximizeUtilizationPricingModel **
+#
+# This pricing model aims to satisfy the maximum number of requests, giving
+# priority to higher bid requests when there aren't available VMs to fulfill
+# all requests. Suitable for scientific clouds.
+#
+# ** org.globus.workspace.spotinstances.MaximizeProfitPricingModel **
+#
+# This pricing model aims to maximize the revenue of the cloud provider,
+# without necessarily increasing cloud utilization. Suitable for commercial
+# clouds.
+
+si.pricingmodel=org.globus.workspace.spotinstances.MaximizeUtilizationPricingModel
+
+####################################
+# BASIC SPOT INSTANCE CONFIGURATION:
+####################################
+
+# Defines the amount of memory (in MegaBytes) that
+# a Spot Instance of the basic type has
+
+si.basic.mem=128
+
+# Defines the minimum price (in allocation units) per minute
+# that a Spot Instance of the basic type can cost
+
+si.basic.minprice=0.1
+
+
+#############################
+# MEMORY MANAGEMENT POLICIES:
+#############################
+
+# The policies below define how the total resource pool memory is #
+# divided between ordinary Workspace Service requests #
+# (1st class requests) and Spot Instance requests (SI requests). #
+# #
+# It's important to note that these policies are preventive, in the #
+# sense that free space is reserved for future 1st class requests, #
+# but if the reserved space is still not sufficient to satisfy a #
+# 1st class request, SI requests will be pre-empted on-the-fly in #
+# order to free the needed amount of space (emergency pre-emption) #
+
+# This policy defines the minimum amount of free memory (in MegaBytes)
+# that should be reserved exclusively for 1st class requests, and thus
+# will not be allocated for SI requests.
+
+si.policies.minreservedmem=256
+
+# This policy defines the maximum utilization (in %) for
+# 1st class requests. When the utilization raises above that
+# value, Spot Instance requests are pre-empted (preventive pre-emption)
+# in order to decrease the utilization of 1st class requests.
+#
+# The Spot Instances module will reserve an amount of free
+# memory for 1st class requests in order to ensure that
+# the utilization of 1st class requests is equal or below
+# that value, unless there is no more available memory
+# to reserve.
+#
+# The amount of reserved memory for 1st class requests
+# is derived from this formula:
+#
+# * maxUtilization = usedMem / (usedMem + reservedMem)
+#
+# that, if reorganized becomes:
+#
+# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
+
+si.policies.maxutilization=0.7
@@ -5,4 +5,4 @@ cumulus.authz.db=$NIMBUS_HOME/cumulus/etc/authz.db
cumulus.repo.dir=$NIMBUS_HOME/cumulus/posixdata
cumulus.host=
cumulus.repo.bucket=Repo
-cumulus.repo.prefix=VM
+cumulus.repo.prefix=VMS
@@ -67,3 +67,23 @@ termination.offset.seconds=600
# per-use if one justs wants to limit all static IP use
allow.static.addresses=false
+
+
+# POLICY: allow.other.schemes
+#
+# If 'true' this allows clients to use file URL schemes other than "cumulus://"
+# or file://" for images. It leaves it up to workspace-control or other special
+# mechanisms (like "allowed.http.hosts" configuration below) to decide on
+# the authorization question.
+
+allow.other.schemes=false
+
+
+# POLICY: allowed.http.hosts
+#
+# This is a list of hosts that the users are allowed to propagate images from
+# via http propagation. This should be a comma separated list.
+#
+# If http is desired, "allow.other.propagation.schemes" above must be enabled.
+
+allowed.http.hosts=
@@ -17,5 +17,15 @@
# of 2, 6, A or E"
#
# Setting a too-long prefix will limit the amount of IPs you can support.
+#
+# MAC addresses can also be explictly assigned in the network-pool files.
+# Explicit MACs do not need to start with this prefix.
mac.prefix=A2:AA:BB
+
+# Network to choose netsample IP and MAC from. This is only generally used
+# when you are first installing Nimbus and attempting to get correct network
+# bridging working on your VMM. Specifying an invalid or empty network here
+# will result in the netsample file not being written.
+
+netsample.network=public
@@ -33,6 +33,7 @@
class="org.globus.workspace.sqlauthz.AuthzDecisionLogic">
<constructor-arg ref="other.AuthzDataSource" />
+ <constructor-arg value="$GLOBAL{allow.other.schemes}" />
<property name="repoDir" value="$CUMULUS{cumulus.repo.dir}" />
<property name="repoHost" value="$SSH{service.sshd.contact.string}" />
@@ -64,6 +64,15 @@
value="$CUMULUS{" />
</bean>
+ <bean id="siSettings"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+
+ <property name="location"
+ value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/spotinstances.conf" />
+ <property name="placeholderPrefix"
+ value="$SI{" />
+ </bean>
+
<bean id="accountingSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
@@ -152,6 +152,8 @@
value="$GLOBAL{termination.offset.seconds}" />
<property name="defaultRunningTimeSeconds"
value="$GLOBAL{default.runtime.seconds}" />
+ <property name="allowedHttpHosts"
+ value="$GLOBAL{allowed.http.hosts}" />
<!-- Property values coming via common.conf -->
<property name="fake" value="$COMMON{fake.mode}" />
@@ -274,6 +276,13 @@
<property name="networksDir" value="$COMMON{conf.dir}/network-pools" />
<property name="macPrefix" value="$NETWORK{mac.prefix}" />
+ <property name="netSampleNetwork" value="$NETWORK{netsample.network}" />
+ <property name="netSampleResource"
+ value="$COMMON{persistence.dir}/control.netsample.txt" />
+ <property name="dhcpdEntriesResource"
+ value="$COMMON{persistence.dir}/dhcpd.entries" />
+ <property name="ipMacResource"
+ value="$COMMON{persistence.dir}/ip_macs.txt" />
</bean>
@@ -303,7 +312,8 @@
<!-- these modules can be null (InstanceResourceImpl) -->
<property name="accountingEventAdapter"
ref="nimbus-rm.accounting" />
- <property name="authzCallout"><null/></property>
+ <property name="authzCallout"
+ ref="nimbus-rm.service.binding.AuthorizationCallout" />
</bean>
<bean id="nimbus-rm.home.instance"
@@ -537,16 +547,30 @@
org.globus.workspace.spotinstances.* interfaces
=================================================================== -->
+ <bean id="nimbus-rm.spotinstances.pricingmodel"
+ class="$SI{si.pricingmodel}" />
+
<bean id="nimbus-rm.spotinstances.manager"
class="org.globus.workspace.spotinstances.SpotInstancesManagerImpl">
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.home.instance"/>
<constructor-arg ref="nimbus-rm.home.group"/>
+ <constructor-arg value="$SI{si.basic.minprice}" />
+ <constructor-arg ref="nimbus-rm.spotinstances.pricingmodel" />
<!-- set after object creation time to avoid circular dep -->
<property name="creationManager" ref="nimbus-rm.creation" />
+
+ <!-- Property values coming via spotinstances.conf -->
+ <property name="minReservedMem"
+ value="$SI{si.policies.minreservedmem}" />
+ <property name="maxUtilization"
+ value="$SI{si.policies.maxutilization}" />
+ <property name="instanceMem"
+ value="$SI{si.basic.mem}" />
+
</bean>
Oops, something went wrong.

0 comments on commit a21fc50

Please sign in to comment.