Fencing with HP switch 1910

yena

Renowned Member
Nov 18, 2011
380
5
83
Hi,
i have a 3 node cluster in staging.
I'm testing fencing with an HP 1910 Switch.

Someone can tell me howto configure the HP for proxmox fencing with ACL ?
( User password, SNMP .. )

I have read this:
http://pve.proxmox.com/wiki/Fencing

Now i can connect and manage the switch from Proxmox servers:

---------------------------------
root@proxmox-1:~# fence_ifmib --action=off -c private -a 192.168.1.207 -n 3
Success: Powered OFF
root@proxmox-1:~#
root@proxmox-1:~#
root@proxmox-1:~# fence_ifmib -o list -c private -a 192.168.1.207 -n switch -d 2c
NULL0,NULL0 Interface
Vlan-interface1,Vlan-interface1 Interface
GigabitEthernet1/0/1,GigabitEthernet1/0/1 Interface
GigabitEthernet1/0/3,GigabitEthernet1/0/3 Interface
GigabitEthernet1/0/2,GigabitEthernet1/0/2 Interface
GigabitEthernet1/0/5,GigabitEthernet1/0/5 Interface
GigabitEthernet1/0/4,GigabitEthernet1/0/4 Interface
GigabitEthernet1/0/7,GigabitEthernet1/0/7 Interface
GigabitEthernet1/0/6,GigabitEthernet1/0/6 Interface
GigabitEthernet1/0/9,GigabitEthernet1/0/9 Interface
GigabitEthernet1/0/8,GigabitEthernet1/0/8 Interface
root@proxmox-1:~# fence_ifmib --action=off -c private -a 192.168.1.207 -n 2
Success: Powered OFF
root@proxmox-1:~# fence_ifmib --action=on -c private -a 192.168.1.207 -n 2
-----------------------------------------------


I have tried this cluster config:
---------------------------------------
<?xml version="1.0"?>
<cluster name="TestCluster2" config_version="6">
<cman expected_votes="2" keyfile="/var/lib/pve-cluster/corosync.authkey" two_node="0"/>
<fencedevices>
<fencedevice agent="fence_ifmib" community="private" ipaddr="192.168.1.207" name="hp1910" snmp_version="2c"/>
</fencedevices>
<clusternodes>
<clusternode name="proxmox-1" nodeid="1" votes="1">
<fence>
<method name="fence">
<device action="off" name="hp1910" nodename="proxmox-1" port="1"/>
</method>
</fence>
</clusternode>
<clusternode name="proxmox-2" nodeid="2" votes="1">
<fence>
<method name="fence">
<device action="off" name="hp1910" nodename="proxmox-2" port="2"/>
</method>
</fence>
</clusternode>
<clusternode name="proxmox-3" votes="1" nodeid="3"/></clusternodes>
</cluster>
--------------------------------------------------------


But i have Unknow 500 error when i try to activate it...

Thanks!
 
Last edited:
change:
<device action="off" name="hp1910" nodename="proxmox-1" port="1"/>
to:
<device action="off" name="hp1910" port="1"/>
change:
<device action="off" name="hp1910" nodename="proxmox-2" port="2"/>
to:
<device action="off" name="hp1910" port="2"/>

Besides node 3 does not include a fence paragraph?
 
OK Now is accepted:
-----------------------------
root@proxmox-2:~# cat /etc/pve/cluster.conf.new
<?xml version="1.0"?>
<cluster config_version="7" name="TestCluster2">
<cman expected_votes="2" keyfile="/var/lib/pve-cluster/corosync.authkey" two_node="0"/>
<fencedevices>
<fencedevice agent="fence_ifmib" community="private" ipaddr="192.168.1.207" name="hp1910" snmp_version="2c"/>
</fencedevices>
<clusternodes>
<clusternode name="proxmox-1" nodeid="1" votes="1">
<fence>
<method name="fence">
<device action="off" name="hp1910" port="1"/>
</method>
</fence>
</clusternode>
<clusternode name="proxmox-2" nodeid="2" votes="1">
<fence>
<method name="fence">
<device action="off" name="hp1910" port="2"/>
</method>
</fence>
</clusternode>
<clusternode name="proxmox-3" nodeid="3" votes="1"/>
</clusternodes>
<rm>
<pvevm autostart="1" vmid="104"/>
</rm>
</cluster>
-----------------------------------------------

I Have tryed to simulate a broken node stopping the network on proxmox-1 ( my first node ).
Fence works and my VM was moved to proxmox-2.
Now i have a problem:
When i fix the broken node (proxmox-1) and i reboot it or restart networking, i have the Virtual Machines
on Both nodes.
I think that the correct procedure in this case is to stop the VM in the fanced failed node and than
add the fixed node to the cluster.
But When i try to stop the VM on the broken node (fenced) i can't:
---------------------------------
root@proxmox-1:~# qm stop 104
Executing HA stop for VM 104
Could not connect to cluster service
command 'clusvcadm -d pvevm:104' failed: exit code 1
---------------------------------

what is the correct procedure ?
Thanks!

-- Yena --
 
To ensure proper fence behavior a fenced node should always be rebooted (the easiest) or every proxmox related daemon must be restarted as part of reactivating the node in the cluster again. Why? Because reactivating a node in cluster must force synchronization from other node in cluster to the former fenced node. A fenced nodes cluster configuration is invalid and therefore must be initialized again.
 
I have done this procedure on the failed node because when o reboot the server, the VM still start and i cant stop it:

/etc/init.d/cman stop
umount -f /etc/pve
pmxcfs --local
/etc/init.d/pve-cluster stop
umount /etc/pve
/etc/init.d/cman stop
mkdir /etc/pve
rm /etc/cluster/cluster.conf
rm -rf /var/lib/pve-cluster/*
pvecm updatecerts --force

reboot
--------------------------
Then a have added the node ..

Right ?
 
There must be something wrong in your setup somewhere because the procedure I describe before always works here.
You are sure you have remember to activate the port again before you reboot the server?