cut power to a node

sotocad

New Member
Aug 12, 2013
2
0
1
Good afternoon,

I installed Proxmox 3.0, creating a cluster with two servers dell R520, working with drbd and fencing, which has idrac cards 7.
I used the manuals, which are the site, creating a cluster with 2 nodes, configuration and settings drbd fencing with IPMI agent. I had no problem in the installation and operation of the cluster, all ok.
I have begun to realize the testing, failure of a node, and the virtual machine (KVM), switch to the other node automatic, achieving this goal.
I have checked the reference manual: https://alteeve.ca/w/2-Node_Red_Hat_KVM_Cluster_Tutorial, with regard to the test of fencing.
I managed to get the virtual machine (KVM), switch to automatic to another node, when I cut the power electico to a node, or root disconnect the electrical service, in the log I see the other node, the activation of the fence agent, but it fails, because the node offline, is without electric power, so idrac card, is also without feeding. Fencing there any settings that allows for automatic change to another node, the virtual machine (KVM), with this type of failure.
Below left my cluster.conf settings.

<?xml version="1.0"?>
<cluster config_version="38" name="VM-SHIPCOM">
<fence_daemon clean_start="0" post_fail_delay="60" post_join_delay="30"/>
<cman expected_votes="1" keyfile="/var/lib/pve-cluster/corosync.authkey" two_node="1"/>
<clusternodes>
<clusternode name="proxmox1" nodeid="1" votes="1">
<fence>
<method name="1">
<device action="reboot" name="fence_shipcom1"/>
</method>
</fence>
</clusternode>
<clusternode name="proxmox2" nodeid="2" votes="1">
<fence>
<method name="1">
<device action="reboot" name="fence_shipcom2"/>
</method>
</fence>
</clusternode>
</clusternodes>
<fencedevices>
<fencedevice agent="fence_ipmilan" ipaddr="idrac1" lanplus="1" login="root" name="fence_shipcom1" passwd="XXXX" power_wait="5"/>
<fencedevice agent="fence_ipmilan" ipaddr="idrac2" lanplus="1" login="root" name="fence_shipcom2" passwd="XXXX" power_wait="5"/>
</fencedevices>
<rm>
<pvevm autostart="1" vmid="100"/>
<failoverdomains>
<failoverdomain name="failovercluster" nofailback="1" ordered="1" restricted="1">
<failoverdomainnode name="proxmox1" priority="1"/>
<failoverdomainnode name="proxmox2" priority="1"/>
</failoverdomain>
</failoverdomains>
</rm>
</cluster>
 
when I cut the power electico to a node, or root disconnect the electrical service, in the log I see the other node, the activation of the fence agent, but it fails, because the node offline, is without electric power, so idrac card, is also without feeding.

Fencing with such cards does not work without electric power, so that only makes sense if you have a very reliable power source. But most people prefer to use independent fencing devices (UPS).
 
Thanks to your suggestion, I began to check the wiki again, the issue of fencing, multiple methods for a node.
Create a script, which was stored in /sbin/myfence. (Reference:
http://www.linickx.com/3191/redhat-cluster-how-to-disable-fencing)

#!/bin/bash

echo "success: myfence $2"

exit 0




Below agrege a new method to the nodes and the agent call fencing. with which I managed, if the machine fails and there is electric power, fencing reboot the node, making either automatically change the operating node. And if the node does not respond by total cutting power, fencing runs the script, which effected either automatically change the operating node.
Here let cluster.conf, end.

<?xml version="1.0"?>
<cluster config_version="40" name="VM-SHIPCOM">
<fence_daemon clean_start="0" post_fail_delay="60" post_join_delay="30"/>
<cman expected_votes="1" keyfile="/var/lib/pve-cluster/corosync.authkey" two_node="1"/>
<clusternodes>
<clusternode name="proxmox1" nodeid="1" votes="1">
<fence>
<method name="1">
<device action="reboot" name="fence_shipcom1"/>
</method>
<method name="2">
<device nodename="proxmox1" name="myfence"/>
</method>
</fence>
</clusternode>
<clusternode name="proxmox2" nodeid="2" votes="1">
<fence>
<method name="1">
<device action="reboot" name="fence_shipcom2"/>
</method>
<method name="2">
<device nodename="proxmox2" name="myfence"/>
</method>
</fence>
</clusternode>
</clusternodes>
<fencedevices>
<fencedevice agent="fence_ipmilan" ipaddr="idrac1" lanplus="1" login="root" name="fence_shipcom1" passwd="xxxx" power_wait="5"/>
<fencedevice agent="fence_ipmilan" ipaddr="idrac2" lanplus="1" login="root" name="fence_shipcom2" passwd="xxxx" power_wait="5"/>
<fencedevice agent="myfence" name="myfence"/>
</fencedevices>
<rm>
<pvevm autostart="1" vmid="100"/>
<failoverdomains>
<failoverdomain name="failovercluster" nofailback="1" ordered="1" restricted="1">
<failoverdomainnode name="proxmox1" priority="1"/>
<failoverdomainnode name="proxmox2" priority="1"/>
</failoverdomain>
</failoverdomains>
</rm>
</cluster>
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!