Bug 607321

Summary: gfs2_edit restoremeta should not return 0 on failure
Product: Red Hat Enterprise Linux 6 Reporter: Robert Peterson <rpeterso>
Component: clusterAssignee: Robert Peterson <rpeterso>
Status: CLOSED CURRENTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: adas, bmarzins, ccaulfie, cluster-maint, jkortus, lhh, rpeterso, ssaha, swhiteho, teigland
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cluster-3.0.12-9.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 607229 Environment:
Last Closed: 2010-11-15 13:52: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: 607229    
Bug Blocks:    

Description Robert Peterson 2010-06-23 19:44:39 UTC
+++ This bug was initially created as a clone of Bug #607229 +++

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:

--- Additional comment from rpeterso on 2010-06-23 10:59:28 EDT ---

This should be easy to fix; requesting ack flags for inclusion
into 5.6.

--- Additional comment from rpeterso on 2010-06-23 15:43:03 EDT ---

Created an attachment (id=426372)
Patch to fix the problem

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

Comment 1 Robert Peterson 2010-06-28 21:43:45 UTC
I pushed the fix to the master branch of the gfs2-utils git
tree, and the STABLE3 and RHEL6 branches of the cluster git
tree for inclusion into RHEL6.0.  Changing status to POST
until we get it built.

Comment 4 releng-rhel@redhat.com 2010-11-15 13:52:02 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.