RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 608887 - fence_scsi overwrites its own logfile
Summary: fence_scsi overwrites its own logfile
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: fence-agents
Version: 6.0
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Ryan O'Hara
QA Contact: Cluster QE
URL:
Whiteboard:
: 622872 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-28 20:10 UTC by Ryan O'Hara
Modified: 2010-11-10 22:09 UTC (History)
4 users (show)

Fixed In Version: fence-agents-3.0.12-8.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 22:09:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix open flag for logfile to avoid truncate. (436 bytes, patch)
2010-06-28 20:14 UTC, Ryan O'Hara
no flags Details | Diff
Fix typo in agent where opens the logfile. (437 bytes, patch)
2010-08-10 16:11 UTC, Ryan O'Hara
no flags Details | Diff

Description Ryan O'Hara 2010-06-28 20:10:24 UTC
The fence_scsi agent keeps an optional logfile. This file is opened with incorrect flags, and each time the file is opened it is truncated.

If the logfile does not exist, the script should create it and write to it. If the logfile does exist, the script should append to it.

Comment 2 Ryan O'Hara 2010-06-28 20:14:13 UTC
Created attachment 427500 [details]
Fix open flag for logfile to avoid truncate.

This is a very simple fix. The problem was the the script was opening the file with '>' instead of '>>' flag. This patch fixes the problem.

Comment 3 RHEL Program Management 2010-06-28 20:22:52 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Ryan O'Hara 2010-06-28 21:02:45 UTC
Fixed in RHEL6.

commit 3d36ee013e11043800214f400fae6a6bebd2af41

Comment 7 Dean Jansa 2010-08-10 16:07:52 UTC
New build introduces failure:

[root@marathon-01 ~]# fence_scsi
syntax error at /usr/sbin/fence_scsi line 586, near ", >"
Execution of /usr/sbin/fence_scsi aborted due to compilation errors.
[root@marathon-01 ~]# rpm -qf /usr/sbin/fence_scsi
fence-agents-3.0.12-7.el6.x86_64

Comment 8 Ryan O'Hara 2010-08-10 16:09:34 UTC
*** Bug 622872 has been marked as a duplicate of this bug. ***

Comment 9 Ryan O'Hara 2010-08-10 16:11:46 UTC
Created attachment 437938 [details]
Fix typo in agent where opens the logfile.

Fix typo in agent where opens the logfile.

A typo in the script causes open of logfile to fail with syntax error.

Comment 12 Ryan O'Hara 2010-08-10 17:05:41 UTC
Fixed.

RHEL6 - commit fb73a65a93eb6e262e7988b724c0f1feed4beae5
RHEL60 - commit 734c1956e16c5afc6ac5f265e9b3ed396f9e4201
STABLE3 - commit 66fde5c0404772facee6d935e69530603a577f97

Comment 15 Dean Jansa 2010-08-12 20:40:33 UTC
Typo fixed in fence-agents-3.0.12-8.el6, fence_scsi no longer errors out, log file appended not overwritten.

Comment 16 releng-rhel@redhat.com 2010-11-10 22:09:03 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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