Problem with block_lvm: Error executing poll.sh

Hello!
I am using Opennebula in Version 4.14.0 with kvm in Centos 7. I’m trying configure host like local storage using lvm. For such , i set up a datastore using block lvm. But when i create a vm with image stored in lvm datastore , get following error in status host:

Tue Dec 8 11:13:19 2015 : Error monitoring Host 10.0.0.2 (2): Error executing poll.sh

Deleting this vm with image stored in lvm datastore, host status back to “on”.

Here the following error log in /var/log/one/oned.log on frond-end machine:

 Command execution fail: 'if [ -x "/var/tmp/one/im/run_probes" ]; then /var/tmp/one/im/run_probes kvm /var/lib/one//datastores 4124 20 2 10.0.0.2; else                              exit 42; fi'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: Warning: Permanently added '10.0.0.2' (ECDSA) to the list of known hosts.
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: ../../vmm/kvm/poll:368:in `block in get_disk_usage': undefined method `match' for nil:NilClass (NoMethodError)
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from /usr/share/ruby/rexml/element.rb:905:in `block in each'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from /usr/share/ruby/rexml/xpath.rb:67:in `each'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from /usr/share/ruby/rexml/xpath.rb:67:in `each'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from /usr/share/ruby/rexml/element.rb:905:in `each'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from ../../vmm/kvm/poll:329:in `get_disk_usage'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from ../../vmm/kvm/poll:145:in `block in get_all_vm_info'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from ../../vmm/kvm/poll:129:in `each'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from ../../vmm/kvm/poll:129:in `get_all_vm_info'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from ../../vmm/kvm/poll:856:in `print_all_vm_template'
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: from ../../vmm/kvm/poll:908:in `<main>'
Tue Dec  8 11:22:46 2015 [Z0][InM][E]: Error executing poll.sh
Tue Dec  8 11:22:46 2015 [Z0][InM][E]: Error executing collectd-client_control.sh
Tue Dec  8 11:22:46 2015 [Z0][InM][I]: ExitCode: 1

Can someone help me?

  1. Can you verify that “oneadmin” can ssh passwordless to the host/node.
  2. You may turn-off selinux and test again.
  3. Might be bugs in the code.

Hi MaxAlmelda,

The vmm_mad/poll script is designed to handle only CEPH rbd and file devices.

In our addon I have a patch to extend the ‘get_disk_usage’ function to handle block devices too.

Can you give it a try? You need only these two files:
kvm-poll.patch

poll_disk_info

Apply them as follow:

cd /var/lib/one/remotes
patch -p1 < /path/to/kvm-poll.patch
cp /path/to/poll_disk_info /var/lib/one/remotes/vmm/kvm/

and as oneadmin flush the change to the hosts:

su - oneadmin
onehost sync --force

The patch is changing vmm/kvm/poll script to use the external tool poll_disk_info for devices of type block
The tool is designed mostly to handle StorPool block devices, but there is fallback(honestly I don’t know why I’ve made it) to “blockdev -q --getsize64” if it is not StorPool device. If your OS does not have the ‘–getsize64’ argument, check for other proper one for your case in blockdev’s man page or use any other tool/script to report the disk size. The response from poll_disk_info is a simple XML that is parsed by the patched vmm/kvm/poll.

Once vmm/kvm/poll is patched you can design your own script to fit your needs. Feel free to use any bit of the code as inspiration for your own development.

Cheers,
Anton Todorov

  1. Yes , already.
  2. I will try this

Thanks for reply =)

Thanks for support atodorov_storpool , i will try this proceedings. I will repply the results as soon as possible.