Bug 221921

Summary: vgreduce gives wrong return code after successful removal of failed mirror log device
Product: Red Hat Enterprise Linux 4 Reporter: Jonathan Earl Brassow <jbrassow>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: agk, dwysocha, jbrassow, mbroz, prockai, rkenna
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0287 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-08 00:15:19 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:
Attachments:
Description Flags
Output of vgreduce --removemissing
none
Patch that fixes problem none

Description Jonathan Earl Brassow 2007-01-08 22:58:49 UTC
$SUBJECT causes problems for dmeventd when it tries to determine whether the
command failed or succeeded.

The problem seems to be that lib/metadata/mirror.c:reconfigure_mirror_images
removes the log_lv and then tools/vgreduce.c:_make_vg_consistent tries again. 
The last one fails (because it isn't there) and terminates the command with an
error exit code.

The only ill side-effects of this is misleading (very concerning) messages in
the log:
Jan  8 14:19:46 neo-04 dmeventd[4475]: vgreduce operation failed (5).
Jan  8 14:19:46 neo-04 dmeventd[4475]: Failed to remove faulty devices in vg-lv

Comment 1 Jonathan Earl Brassow 2007-01-08 22:58:50 UTC
Created attachment 145116 [details]
Output of vgreduce --removemissing

Comment 2 Jonathan Earl Brassow 2007-01-08 23:01:36 UTC
Created attachment 145118 [details]
Patch that fixes problem

Patch checks for lv in vg before issuing the removal.

Comment 6 Jonathan Earl Brassow 2007-01-09 16:00:02 UTC
reassigning to agk so he can look at (?include?) this short patch

Comment 7 Alasdair Kergon 2007-01-09 23:15:25 UTC
added upstream for next release

Comment 9 Corey Marthaler 2007-01-24 17:07:15 UTC
fix verified in lvm2-2.02.19-1.el4.

Jan 24 06:12:16 link-08 lvm[4627]: Completed: vgreduce --removemissing vg
Jan 24 06:12:16 link-08 lvm[4627]: vg-corey_mirror is now in-sync
Jan 24 06:12:18 link-08 lvm[4627]: No longer monitoring mirror device
vg-corey_mirror for events


Comment 14 Red Hat Bugzilla 2007-05-08 00:15:19 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 the 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-2007-0287.html