Skip to contentSkip to conversation

LVM2 ./WHATS_NEW test/t-partial-activate.sh to ...

PATCH [email protected] 1 participant 1 message Apr 22, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-04-22 17:00:31

Modified files:

	.              : WHATS_NEW 
	test           : t-partial-activate.sh 
	tools          : vgreduce.c 

Log message:
Fix vgreduce --removemissing failure exit code.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1093&r2=1.1094
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-partial-activate.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.46 - 
 ================================
+  Fix vgreduce --removemissing failure exit code.
   Fix remote metadata backup for clvmd.
   Alloc PV internal structure from VG mempool if possible.
   Fix metadata backup to run after vg_commit always.
test/t-partial-activate.sh +1 -2
@@ -6,7 +6,6 @@
 lvchange -a n $vg/mirror
 disable_dev $dev1
 
-# FIXME should this return an error code due to that big fat WARNING?
-vgreduce --removemissing $vg
+not vgreduce --removemissing $vg
 not lvchange -v -a y $vg/mirror
 lvchange -v --partial -a y $vg/mirror
tools/vgreduce.c +4 -2
@@ -556,11 +556,13 @@
 		}
 		backup(vg);
 
-		if (fixed)
+		if (fixed) {
 			log_print("Wrote out consistent volume group %s",
 				  vg_name);
+			ret = ECMD_PROCESSED;
+		} else
+			ret = ECMD_FAILED;
 
-		ret = ECMD_PROCESSED;
 	} else {
 		if (!vg_check_status(vg, EXPORTED_VG | LVM_WRITE | RESIZEABLE_VG))
 			goto out;