[Linux-cluster] fence_ovh - Fence agent for OVH (Proxmox 3)

Adrian Gibanel adrian.gibanel at btactic.com
Wed Jun 26 17:55:13 UTC 2013


  I've improved my former fence_ovh script so that it works in Proxmox 3 and so that it uses suds library as I was suggested in the linux-cluster mailing list.

1) What is fence_ovh 

fence_ovh is a fence agent based on python for the big French datacentre provider OVH. You can get information about OVH on: http://www.ovh.co.uk/ . I also wanted to make clear that I'm not part of official OVH staff. 

2) Features 
The script has two main functions: 

* Reboot into rescue mode (action=off) 
* Reboot into the hard disk (action=on;action=reboot) 

3) Technical details 
So as you might deduce the classical fence mechanism which turns off the other node is not actually done by turning off the machine but by rebooting it into a rescue mode. 

Another particular thing to mention is that the script checks if the machine has rebooted ok into rescue mode thanks to an OVH API which reports the date when the server rebooted. By the way the OVH API is also used in the main function that consists in rebooting the machine into rescue mode. 

4) How to use it 

4.1) Make sure python-suds package is installed (Debian/Ubuntu).
4.2) Save fence_ovh in /usr/sbin 
4.3) Run: ccs_update_schema so that new metadata is put into cluster.rng 
4.4) If needed validate your configuration: 
ccs_config_validate -v -f /etc/pve/cluster.conf.new 
4.5) Here's an example of how to use it in cluster.conf:

<?xml version="1.0"?>
<cluster name="ha-008-010" config_version="3">

<cman keyfile="/var/lib/pve-cluster\
/corosync.authkey" transport="udpu" \
two_node="1" expected_votes="1">
</cman>

<fencedevices>
        <fencedevice agent="fence_ovh" \
name="fence008" email="myadmin at domain.com" \
ipaddr="ns1234" login="ab12345-ovh" passwd="MYSECRET" />
        <fencedevice agent="fence_ovh" \
name="fence010" email="myadmin at domain.com" \
ipaddr="ns5678" login="ab12345-ovh" passwd="MYSECRET" />
</fencedevices>

  <clusternodes>
<clusternode name="nodeA.your.domain" nodeid="1" votes="1">
  <fence>
    <method name="1">
      <device name="fence008" action="off"/>
    </method>
  </fence>
</clusternode>
<clusternode name="nodeB.your.domain" nodeid="2" votes="1">
  <fence>
    <method name="1">
      <device name="fence010" action="off"/>
    </method>
  </fence>
</clusternode>
</clusternodes>



</cluster>



Finally I attach to this email the first version of fence_ovh script for Proxmox 3.

The original thread from Proxmox forum from which I adapted original secofor script: http://forum.proxmox.com/threads/11066-Proxmox-HA-Cluster-at-OVH-Fencing?p=75152#post75152 

-- 

-- 
Adrián Gibanel 
I.T. Manager 

+34 675 683 301 
www.btactic.com 



Ens podeu seguir a/Nos podeis seguir en: 

i 


Abans d´imprimir aquest missatge, pensa en el medi ambient. El medi ambient és cosa de tothom. / Antes de imprimir el mensaje piensa en el medio ambiente. El medio ambiente es cosa de todos. 

AVIS: 
El contingut d'aquest missatge i els seus annexos és confidencial. Si no en sou el destinatari, us fem saber que està prohibit utilitzar-lo, divulgar-lo i/o copiar-lo sense tenir l'autorització corresponent. Si heu rebut aquest missatge per error, us agrairem que ho feu saber immediatament al remitent i que procediu a destruir el missatge . 

AVISO: 
El contenido de este mensaje y de sus anexos es confidencial. Si no es el destinatario, les hacemos saber que está prohibido utilizarlo, divulgarlo y/o copiarlo sin tener la autorización correspondiente. Si han recibido este mensaje por error, les agradeceríamos que lo hagan saber inmediatamente al remitente y que procedan a destruir el mensaje . 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fence_ovh
Type: text/x-python
Size: 6224 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20130626/8c7aa707/attachment.py>


More information about the Linux-cluster mailing list