Bug 462628

Summary: fence_scsi: clear key_list after each use
Product: Red Hat Enterprise Linux 5 Reporter: Ryan O'Hara <rohara>
Component: cmanAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: bstevens, cluster-maint, djansa, edamato
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:52:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 462630    

Description Ryan O'Hara 2008-09-17 16:55:22 UTC
When fence_scsi attempts to fence a node (ie. remove a node's key from all devices), the agent first checks to see that the key to be removed is actually registered with the device. The reason for this is that if the key to be removed is not registered with a device, it will appear that fencing failed, when in reality there was nothing to do (since the key was not registered).

This check is done by getting a list of keys registered with a device and storing the list in a hash. This hash needs to be cleared each time we get a new list of keys for a device, otherwise we may have stale data in the hash. This could cause fence_scsi to incorrectly report failure.

Comment 2 RHEL Program Management 2008-09-17 17:21:31 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 Ryan O'Hara 2008-09-17 21:12:04 UTC
Fixed in RHEL5.

Turns out the problem was not that we needed to clear the key_list hash, but that the get_key_list subroutine did not correcntly declare the key_list. Because Perl does dynamic scoping, the undeclared key_list variable was assumed to be global. The result is/was that the key_list hash was never getting updated correctly.

Simple, one line fix.

Comment 6 errata-xmlrpc 2009-01-20 21:52:14 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 therefore 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-2009-0189.html