Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 607229

Summary: gfs2_edit restoremeta should not return 0 on failure
Product: Red Hat Enterprise Linux 5 Reporter: Jaroslav Kortus <jkortus>
Component: gfs2-utilsAssignee: Robert Peterson <rpeterso>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.5CC: adas, bmarzins, rpeterso, swhiteho
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gfs2-utils-0.1.62-25.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 607321 (view as bug list) Environment:
Last Closed: 2011-01-13 23:21:02 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: 607321    
Attachments:
Description Flags
Patch to fix the problem none

Description Jaroslav Kortus 2010-06-23 14:48:56 UTC
Description of problem:
gfs2_edit restoremeta <metadata> <device> returns 0 even if the metadata could not be fully written to the destination device.

Version-Release number of selected component (if applicable):
gfs2-utils-0.1.62-20.el5

How reproducible:

gfs2_edit restoremeta datavol03.meta /dev/vedder/vedder0 ; echo $?
There are 53311488 blocks of 4096 bytes in the destination file system.

440846 metadata blocks (1722MB) restored.    Error: File system is too small to restore this metadata.
File system is 53311488 blocks, Restore block = 53345526
File datavol03.meta-bz519049 restore error.
0

  
Actual results:
exit code == 0

Expected results:
exit code != 0 if error has occured

Additional info:

Comment 1 Robert Peterson 2010-06-23 14:59:28 UTC
This should be easy to fix; requesting ack flags for inclusion
into 5.6.

Comment 2 Robert Peterson 2010-06-23 19:43:03 UTC
Created attachment 426372 [details]
Patch to fix the problem

Here is the patch to fix the problem.  I tested it on roth-01.

Comment 3 Robert Peterson 2010-06-29 14:19:45 UTC
I pushed the patch to the RHEL56 branch of the cluster git
tree for inclusion into RHEL 5.6.  The upstream equivalent
has already been pushed by way of another bugzilla record.
This was tested on roth-01.  Changing status to POST until
we build it.

Comment 4 Robert Peterson 2010-09-17 15:58:00 UTC
Build 2768496 successful.  Changing status to Modified.
This fix is in gfs2-utils-0.1.62-25.el5.

Comment 7 errata-xmlrpc 2011-01-13 23:21:02 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-2011-0135.html