Description of problem: The current fence_apc script requires outlets to be named in the default "Outlet <digit>" fashion. This patch allows customizing the name, for example naming the outlet after hostname of the machine plugged in. Version-Release number of selected component (if applicable): fence-1.32.6-0 Additional info: Here's the version banner from the actual device, shown immediately after login: User Name : apc Password : ******** American Power Conversion Network Management Card AOS v2.6.4 (c) Copyright 2004 All Rights Reserved Rack PDU APP v2.6.5 And here's the output of 3- System, 7- About System: About System Model Number : AP7900 Serial Number : ZA0535002003 NMC Serial Number : ZA0533021109 Manufacture Date : 08/23/2005 Hardware Revision : B2 MAC Address : 00 C0 B7 78 74 61 Flash Type : TOS TC58FVM5B2 Press <ENTER> to continue... ----------------------------------------------------------------------- Module Information Description : Rack PDU APP ----------------------------------------------------------------------- Name : rpdu Type : StatApp Version : 265 Sector : 12 Date : 11/16/2004 Time : 16:19:58 CRC16 : CFC1 Press <ENTER> to continue... Description : Network Management Card AOS ----------------------------------------------------------------------- Name : aos Type : APC OS Version : 264 Sector : 51 Date : 11/12/2004 Time : 19:40:33 CRC16 : C476
Created attachment 120596 [details] patch to fence_apc script to allow custom outlet names
A couple of concerns here: 1) what if more than one outlet were named the same name? 2) The apc scripts are so fragile - every apc update to firmware really wreaks havoc with them. So, these are not stoppers in terms of this feature by any means...but maybe there is a better alternative to patching the scripts: An 'alias' attribute could be added to the fence_apc (or any fence agent instance that uses port numbers) which could be set through the UI...kind of like an optional annotation field. if you wish to remember that port 4 is power supply B on the itanium node, then the user could enter 'IA pwr supply B' in the annotation field, and this would be stored in cluster.conf as 'alias="IA pwr supply B" port="4" in this fence instance block. The script or the apc device would never have to know. This would exist at the highest user level only. Would this satisfy the desired requirement that this ticket describes?
The patch I submitted modifies the script to only look for the plug number in the UI, regardless of the name string. It works with duplicate names, so concern #1 is not an issue. Concern #2 is a general issue that won't be addressed by either my patch or your proposed alias mechanism. So in conclusion, I'd say the alias mechanism is not needed, at least for the APC device.
Will review patch.
Devel ACK for 4.5.
The apc agent has been refactored to address this issue and is checked in.
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-2007-0138.html