Bug 447414 - fence_apc_snmp failed to verify action string.
Summary: fence_apc_snmp failed to verify action string.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: fence
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jim Parsons
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-19 20:38 UTC by Dean Jansa
Modified: 2009-04-16 20:12 UTC (History)
2 users (show)

Fixed In Version: RHBA-2008-0801
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-25 19:17:13 UTC
Embargoed:


Attachments (Terms of Use)
New version of apc snmp agent (11.23 KB, text/plain)
2008-06-24 15:11 UTC, Jim Parsons
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0801 0 normal SHIPPED_LIVE Fence bug fix and enhancement update 2008-07-25 19:16:39 UTC

Description Dean Jansa 2008-05-19 20:38:21 UTC
Description of problem:
I ran:  /sbin/fence_apc_snmp -a link-apc -n 1:1 -o staus 

(note staus typo)

And got the following output:

Error turning outlet off


I would have expected the fence agent to error out if it is given an action (-o)
it doesn't understand, rather than defaulting to powering off the outlet.

I tried this again with a different typo and got different results:

[root@link-13 fence]# /sbin/fence_apc_snmp -a marathon-apc -n 6  -o status 
Outlet "6" - 6 is on

[root@link-13 fence]# /sbin/fence_apc_snmp -a marathon-apc -n 6  -o stat
Usage:

Options:
  -h               Usage
  -a <ip>          IP address or hostname of fence device
  -u <udpport>     UDP port to use (default 161)
  -c <community>   SNMP community (default 'private')
  -n <num>         Outlet name/number to act on
  -o <string>      Action: Reboot (default), On, Off and Status
  -v               Verbose mode - write to /tmp/apclog
  -V               Version
Error in packet.
Reason: (genError) A general failure occured
snmpset failed

Comment 1 Dean Jansa 2008-05-19 20:39:49 UTC
fence-1.32.57-1



Comment 2 RHEL Program Management 2008-05-19 20:41:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Jim Parsons 2008-06-24 15:11:22 UTC
Created attachment 310155 [details]
New version of apc snmp agent

Please try this

Comment 4 Dean Jansa 2008-07-14 21:14:30 UTC
Not good -- I ran the command below and it powered off my node!

[root@marathon-01 tmp]# ./fence_apc_snmp -a marathon-apc -n 1 -o bogus
Usage:

Options:
  -h               Usage
  -a <ip>          IP address or hostname of fence device
  -u <udpport>     UDP port to use (default 161)
  -c <community>   SNMP community (default 'private')
  -n <num>         Outlet name/number to act on
  -o <string>      Action: Reboot (default), On, Off and Status
  -v               Verbose mode - write to /tmp/apclog
  -V               Version





Comment 7 Dean Jansa 2008-07-21 21:25:06 UTC
Still fails, it once again powered off the node on port one:

[root@taft-01 tmp]# fence_apc_snmp -V
1.32.62

Copyright (C) Red Hat, Inc.  2004  All rights reserved.

(built Mon Jul 21 16:43:35 EDT 2008)

[root@taft-01 tmp]# fence_apc_snmp -a marathon-apc -n 1 -o bogus
Usage:

Options:
  -h               Usage
  -a <ip>          IP address or hostname of fence device
  -u <udpport>     UDP port to use (default 161)
  -c <community>   SNMP community (default 'private')
  -n <num>         Outlet name/number to act on
  -o <string>      Action: Reboot (default), On, Off and Status
  -v               Verbose mode - write to /tmp/apclog
  -V               Version

Looking in the APC log the apc is getting the commands to turn that port off,
then on when I gave the "-o bogus"



07/21/2008	15:23:07	Switched Rack PDU: Outlet #1 (marathon-01) on.	
07/21/2008	15:23:07	Switched Rack PDU: Outlet #1 (marathon-01) off.



Comment 8 Nate Straz 2008-07-22 15:36:23 UTC
The problem with the fence script is that there is a sys.exit(3) in a
try..except block.  See how it doesn't work as expected in some example code:

$ cat tryexit.py 
import sys

try:
  print "try"
  sys.exit(3)
except:
  print "except"
$ python tryexit.py 
try
except


Comment 10 Dean Jansa 2008-07-22 22:10:09 UTC
verified w/fence-1.32.63-1

Comment 12 errata-xmlrpc 2008-07-25 19:17:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0801.html



Note You need to log in before you can comment on or make changes to this bug.