FREECPU/FREE_CPU inconsistencies (core/sunstone/doc)
|Assignee:||Carlos Martín||% Done:|
|Target version:||Release 4.6|
|Affected Versions:||OpenNebula 4.4|
We were using FREECPU for VM placement with OpenNebula 4.2.0. Since Feature #2145 and OpenNebula 4.4 it doesn't work anymore. Looking at source code, it looks we have to use FREE_CPU instead. But the documentation and Sunstone wizard booth make use of FREECPU.
This is really confusing !
Just run a grep FREECPU and grep FREE_CPU on the source code tree to figure it out...
Is there any mean to easily replace this parameter inside all running VM instances and templates ?
#4 Updated by Carlos Martín almost 7 years ago
- Status changed from New to Closed
- Resolution set to fixed
Thanks a lot for letting us know. When we cleaned the monitoring attributes in #2145, we didn't realize we were using them ourselves in sunstone and the doc.
The documentation for the rank/requirements has been updated, and a note in the known issues added.
The "good" values, that you can find in HOST/HOST_SHARE with onehost show -x, are:
=============== =============== 4.2 4.4 =============== =============== TOTALCPU MAX_CPU TOTALMEMORY MAX_MEM FREECPU FREE_CPU FREEMEMORY FREE_MEM USEDCPU USED_CPU USEDMEMORY USED_MEM =============== ===============
The upgrade process to 4.6 will scan existing Templates and replace these strings.
Unfortunately, this is not of much help for your existing 4.4 installation... Maybe I can cook a special onedb fsck tool for this, I'll get back to you.
#5 Updated by Carlos Martín almost 7 years ago
Try this fsck file, it has an extra section to change the wrong metric attributes: https://gist.github.com/carlosms/9394393
Copy it into /usr/lib/one/ruby/onedb/fsck.rb, and then follow the fsck procedure described here: