Bug #710
Scheduler, VM requirements with custom var from the Information Manager
Status: | Closed | Start date: | 07/07/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: | Pull request: | |||
Affected Versions: |
Description
Hi,
Sorry for the cut and paste from IRC #opennebula
[15:12] <jpi_> i can not get the "requirement" statement in VM template to work
[15:12] <jpi_> I have defined a custom script to monitor the load of the hosts in my cluster
[15:13] <jpi_> and want to schedule VMs on a "not so loaded" node
[15:13] <jpi_> my syntax is : REQUIREMENTS = "LOAD15 < 1";
[15:14] <jpi_> but now all my new VMs are kept in the pending state
[15:15] <jpi_> do the "requierement" thing work ? If so is the manual (http://www.opennebula.org/documentation:rel2.2:img) up to date ?
[15:16] <jpi_> my custom variable (load15) is correctly reported when I issue the "onehost show 0" command
However, if in my requirement statement I use only builtin variables (TOTALCPU, TOTALMEMORY, FREEMEMORY, FREECPU, USEDMEMORY, USEDCPU) it works, my VMs are scheduled.
Can you confirm this bug ? If not, can you provide an example of a script to be put in remotes/im/kvm.d and a requirement statement to be defined on the VM template ? Thanks a lot :)
History
#1 Updated by Ruben S. Montero almost 10 years ago
- Status changed from New to Closed
Hi,
Here it is working. In my setup:
MONITORING INFORMATION CPUSPEED=2.2GHz FREECPU=800 FREEMEMORY=16777216 HOSTNAME=dummy03 HYPERVISOR=dummy LOAD15=4 LOAD30=0.75 TOTALCPU=800 TOTALMEMORY=16777216 USEDCPU=0 USEDMEMORY=0
and in the VM
REQUIREMENTS = "LOAD15 < 5"
Uses that hosts. Note that hosts where the metric is not defined assumes a value of 0. In the previous example hosts without LOAD15 would match the requirements.
I am closing this one
Cheers
Ruben