Bug 462628 - fence_scsi: clear key_list after each use
fence_scsi: clear key_list after each use
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Ryan O'Hara
Cluster QE
:
Depends On:
Blocks: 462630
  Show dependency treegraph
 
Reported: 2008-09-17 12:55 EDT by Ryan O'Hara
Modified: 2009-04-16 18:45 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:52:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ryan O'Hara 2008-09-17 12:55:22 EDT
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 Product and Program Management 2008-09-17 13:21:31 EDT
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 17:12:04 EDT
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 16:52:14 EST
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

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