Host monitoring reporting incorrect allocation

Hello,

A couple of our hosts in open nebula are reporting incorrect values for allocated CPU/Memory.

onehost and sunstone both show the correct allocations for the vm, and the vm is associated with the host correctly.

I have searched the forums and couldn’t find any help as well as restarted services on the controller machine.

Any ideas?

Thanks,

Gary

Example of onehost output:
oneadmin@one-controller /root $ onehost show one-compute1
HOST 6 INFORMATION
ID : 6
NAME : one-compute1
CLUSTER : Nebula
STATE : MONITORED
IM_MAD : kvm
VM_MAD : kvm
VN_MAD : dummy
LAST MONITORING TIME : 11/13 09:18:46

HOST SHARES
TOTAL MEM : 378.5G
USED MEM (REAL) : 230.3G
USED MEM (ALLOCATED) : 64G
TOTAL CPU : 2400
USED CPU (REAL) : 247
USED CPU (ALLOCATED) : 400
RUNNING VMS : 5

LOCAL SYSTEM DATASTORE #0 CAPACITY
TOTAL: : 1.8T
USED: : 711.9G
FREE: : 1018.4G

MONITORING INFORMATION
ARCH="x86_64"
CPUSPEED="2600"
HOSTNAME="one-compute1"
HYPERVISOR="kvm"
MODELNAME="Intel® Xeon® CPU E5-2630 v2 @ 2.60GHz"
NETRX="2988549349574"
NETTX=“682570381514"
RESERVED_CPU=”“
RESERVED_MEM=”"
VERSION=“4.12.1”

VIRTUAL MACHINES

ID USER     GROUP    NAME            STAT UCPU    UMEM HOST             TIME

120 oneadmin oneadmin vm1 runn 19 16G one-compute1 27d 07h09
134 icherpak cgeng vm2 runn 31 62G one-compute1 129d 18h36
136 syablons cgeng vm3 runn 31 62G one-compute1 101d 18h13
187 agriniuk cgeng vm4 runn 22 64G one-compute1 69d 19h42
193 dmeads cgeng vm5 runn 9 64G one-compute1 50d 20h50

Hi,

If the allocated mem/cpu has wrong values, it may be due to a crash, DB write problems, or a bug. In these cases you can use the fsck tool to fix the consistency of those values.

http://docs.opennebula.org/4.14/administration/references/onedb.html

Hi,

I probably should have responded, I figured this out eventually.

Basically, somehow, the host ID numbers ended up getting changed. originally they were say, 0-3, but during a previous upgrade they somehow got changed to 4-7.

Running onedb fsck printed out the guests that had nonexistent host IDs assigned to them in their metadata. After I knew which VMs were incorrectly assigned I shutdown oned and manually updated the body column in the opennebula.vm_pool for each vm with the proper host ID. After restarting oned allocation numbers were correct.

I find it strange that the VMs still showed up under the host, even though the ID was incorrect.

Thanks,

Gary