fence_ifmib with snmp v3

yoyo1811

New Member
Aug 19, 2013
2
0
1
Hi,

i'm new to proxmox. I do a test HA cluster of 4 nodes with a managable switch and use fence_ifmib.
I test it with snmp v2 and it work well. But now i want to use snmp v3 but I can't make it work.

Here is the cluster info :


root@mox4:~# cat /etc/pve/cluster.conf
Code:
<?xml version="1.0"?>
<cluster config_version="22" name="cluster1">
  <cman keyfile="/var/lib/pve-cluster/corosync.authkey"/>
  <fencedevices>
    <fencedevice agent="fence_ifmib" ipaddr="10.50.1.120" name="fencesw" snmp_version="3" login="snmpUser" passwd="********" snmp_sec_level="authPriv" snmp_priv_passwd="********" snmp_priv_prot="DES" snmp_auth_prot="SHA" />
  </fencedevices>
  <clusternodes>
    <clusternode name="mox1" nodeid="1" votes="1">
      <fence>
        <method name="fence">
          <device action="off" name="fencesw" port="14"/>
        </method>
      </fence>
    </clusternode>
    <clusternode name="mox2" nodeid="2" votes="1">
      <fence>
        <method name="fence">
          <device action="off" name="fencesw" port="13"/>
        </method>
      </fence>
    </clusternode>
    <clusternode name="mox3" nodeid="3" votes="1">
      <fence>
        <method name="fence">
          <device action="off" name="fencesw" port="12"/>
        </method>
      </fence>
    </clusternode>
    <clusternode name="mox4" nodeid="4" votes="1">
      <fence>
        <method name="fence">
          <device action="off" name="fencesw" port="11"/>
        </method>
      </fence>
    </clusternode>
  </clusternodes>
  <rm>
    <pvevm autostart="1" vmid="100"/>
    <pvevm autostart="1" vmid="101"/>
    <pvevm autostart="1" vmid="102"/>
  </rm>
</cluster>


I try to do :

fence_ifmib -a 10.50.1.120 -d 3 -l snmpUser -p ********* -E anthPriv -b SHA -B DES -P *********** -n 1 -o off

it return :

Code:
root@mox4:~# fence_ifmib -a 10.50.1.120 -d 3 -l snmpUser -p ********* -E authPriv -b SHA -B DES -P *********** -n 1 -o off
Traceback (most recent call last):
  File "/usr/sbin/fence_ifmib", line 126, in <module>
    main()
  File "/usr/sbin/fence_ifmib", line 121, in main
    result = fence_action(FencingSnmp(options), options, set_power_status, get_power_status, get_outlets_status)
  File "/usr/share/fence/fencing.py", line 810, in fence_action
    status = get_multi_power_fn(tn, options, get_power_fn)
  File "/usr/share/fence/fencing.py", line 743, in get_multi_power_fn
    plug_status = get_power_fn(tn, options)
  File "/usr/sbin/fence_ifmib", line 64, in get_power_status
    (oid, status) = conn.get("%s.%d"%(STATUSES_OID, port_num))
  File "/usr/share/fence/fencing_snmp.py", line 106, in get
    cmd = "%s '%s'"% (self.prepare_cmd("snmpget"), self.quote_for_run(oid))
  File "/usr/share/fence/fencing_snmp.py", line 73, in prepare_cmd
    cmd += " -%s '%s'"% (item[1], self.quote_for_run(self.options["--" + item[1]]))
KeyError: '--a'

Regards