Host state 'ERROR' but still working?

Hello. I am testing out opennebula for the first time and have 1 Host connected to the front-end. The OS running on both of them are

Front-end: CentOS 7.2
Node : CentOS 6.8

I am having the node display ‘ERROR’ state but everything is working fine and it is able to spawn VMs normally through the opennebula sunstone interface. The error states the following

Wed Jan 11 23:45:16 2017 : Error monitoring Host 192.168.103.7 (2): …/…/vmm/kvm/poll:225:in round': wrong number of arguments (1 for 0) (ArgumentError) from ../../vmm/kvm/poll:225:inget_cpu_info’ from …/…/vmm/kvm/poll:223:in each' from ../../vmm/kvm/poll:223:inget_cpu_info’ from …/…/vmm/kvm/poll:131:in get_all_vm_info' from ../../vmm/kvm/../lib/poll_common.rb:99:inprint_all_vm_template’ from …/…/vmm/kvm/poll:482 ERROR MESSAGE --8<------ Error executing poll.sh ERROR MESSAGE ------>8-- ARCH=x86_64 MODELNAME=“Intel® Xeon® CPU E5620 @ 2.40GHz” HYPERVISOR=kvm TOTALCPU=1600 CPUSPEED=2400 TOTALMEMORY=99051524 USEDMEMORY=5073844 FREEMEMORY=93977680 FREECPU=1600 USEDCPU=0 NETRX=9994836 NETTX=5274939 DS_LOCATION_USED_MB=47229 DS_LOCATION_TOTAL_MB=50269 DS_LOCATION_FREE_MB=481 DS = [ ID = 0, USED_MB = 47229, TOTAL_MB = 50269, FREE_MB = 481 ] DS = [ ID = 101, USED_MB = 47229, TOTAL_MB = 50269, FREE_MB = 481 ] DS = [ ID = 103, USED_MB = 47229, TOTAL_MB = 50269, FREE_MB = 481 ] VM=[ID=23,POLL="DISK_SIZE=[ID=0,SIZE=604] DISK_SIZE=[ID=1,SIZE=1] "] VM=[ID=29,POLL="DISK_SIZE=[ID=0,SIZE=604] DISK_SIZE=[ID=1,SIZE=1] "] VM=[ID=33,POLL="DISK_SIZE=[ID=0,SIZE=1451] DISK_SIZE=[ID=1,SIZE=1] "] DS = [ ID = 104, USED_MB = 47229, TOTAL_MB = 50269, FREE_MB = 481 ] DS = [ ID = 105, USED_MB = 47229, TOTAL_MB = 50269, FREE_MB = 481 ] VM=[ID=35,POLL="DISK_SIZE=[ID=0,SIZE=604] DISK_SIZE=[ID=1,SIZE=1] "] HOSTNAME=node1.opennebula

Does anyone have an idea why is this happening? Because of this error the VMs go in an ‘Unknown’ state instead of ‘Running’ but when I actually connect to the VMs via VNC, they are working fine.

You’re using OpenNebula 5.x and it does not support CentOS 6.8. The problem here is the ruby version that is too old.

You can fix the problem changing in the file /var/lib/one/remotes/vmm/kvm/poll line 225 from:

cpu[pid] = ( cpu[pid] * multiplier ).round(2)

to

cpu[pid] = ( cpu[pid] * multiplier ).round

Still, I’m sure you’ll find more problems because the ruby version. You should upgrade your hypervisors.

Hey thanks a lot for your reply!
Sorry my bad I installed 5.2 version on CentOS 6.8. But most of my servers are on CentOS 6.x version while I plan on putting the front-end onto a CentOS 7.x

Should I install opennebula-node-kvm 4.x version for the nodes but use 5.x version on the Front-end? Will this cause any issues? Should I install only 5.x or 4.x version on all nodes + front-end or could I mix and match according to their compatibility?

The scripts that perform actions and monitor the hosts are not installed by the node packages but by the frontend server package. You may make it work changing some code but it will be a lot of work IMO.

You’d better upgrade ruby but it’s better to upgrade the OS version in the nodes.