0

I have a OpenNebula cluster: frontend, 2 nodes for VM KVM, datastore on LVM. And I want run my VMs on a working node, when other node is not available.

I added to the /etc/one/oned.conf the HOST_HOOK:

HOST_HOOK = [
name = “error”,
on = “ERROR”,
command = “ft/host_error.rb”,
arguments = “$ID -m -p 5”,
remote = “no” ]

Other setting for HOST_HOOK I didn't do.

But, when i stop one my node and restart a VM it doesn’t boot again:

Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/121/73/deployment.1

In the log - /var/log/one/host_error.log i see:

[HOST 3][I] Hook launched
[HOST 3][I] hostname: node1
[HOST 3][I] Wait 5 cycles.
[HOST 3][I] Sleeping 900 seconds.
[HOST 3][I] Fencing enabled
[HOST 3][E] Fence host not configured, please edit ft/fence_host.sh
[HOST 3][E]
[HOST 3][E] Fencing error
[HOST 3][E] Exiting due to previous error.

Maybe someone configured a Opennebula HOST_HOOK and can help me?

Why am I getting an error with fence and how to configuration it?

perrfect
  • 65
  • 1
  • 7

1 Answers1

0

You should edit also file /var/lib/one/remotes/hooks/ft/fence_host.sh

There you may notice a lines:

To enable remove this line

echo ""Fence host not configured, please edit ft/fence_host.sh"" && exit 1

If you comment this [echo...] line out you fence mechanism will work a bit better. But you should also configure which address will be used as $FENCE_IP

The authors of OpenNebula means you should configure variable $FENCE_IP with ILO or such IP address of you host.