Bug 1274085 - pvs exit code 5 with missing PV when vgremove -f is running concurrently
Summary: pvs exit code 5 with missing PV when vgremove -f is running concurrently
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-21 21:06 UTC by Tony Asleson
Modified: 2017-07-25 19:50 UTC (History)
13 users (show)

Fixed In Version: v2_02_133
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-25 19:47:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Debug output from both commands using -vvvv (246.43 KB, text/plain)
2015-10-22 00:36 UTC, Tony Asleson
no flags Details

Description Tony Asleson 2015-10-21 21:06:53 UTC
Description of problem:

If you do the following:

# vgremove -f fubar & pvs

when the vg contains a number of LVs, then the pvs command runs and exits with exit code (5) and warning message:

Volume group "fubar" successfully removed
  WARNING: Volume Group fubar is not consistent.
  Volume group "fubar" not found
  Cannot process volume group fubar


Version-Release number of selected component (if applicable):

Don't believe this is applicable, but this is what I was running

LVM version:     2.02.132(2) (2015-09-22)
Library version: 1.02.110-git (2015-09-22)
Driver version:  4.33.0

How reproducible:

Always

Steps to Reproduce:

[root@localhost tools]# vgs
[root@localhost tools]# pvs
  PV         VG   Fmt  Attr PSize  PFree 
  /dev/sdb        lvm2 ---  18.00g 18.00g
  /dev/sdc        lvm2 ---  18.00g 18.00g
  /dev/sdd        lvm2 ---  18.00g 18.00g
  /dev/sde        lvm2 ---  18.00g 18.00g
[root@localhost tools]#  vgcreate fubar /dev/sdd
  Volume group "fubar" successfully created
[root@localhost tools]# lvcreate -L4m fubar
  Logical volume "lvol0" created.
[root@localhost tools]# lvcreate -L4m fubar
  Logical volume "lvol1" created.
[root@localhost tools]# lvcreate -L4m fubar
  Logical volume "lvol2" created.
[root@localhost tools]# lvcreate -L4m fubar
  Logical volume "lvol3" created.
[root@localhost tools]# vgremove -f fubar & pvs || echo $?
[2] 20159
  Logical volume "lvol0" successfully removed
  Logical volume "lvol1" successfully removed
  Logical volume "lvol2" successfully removed
  Logical volume "lvol3" successfully removed
  Volume group "fubar" successfully removed
  WARNING: Volume Group fubar is not consistent.
  Volume group "fubar" not found
  Cannot process volume group fubar
  PV         VG   Fmt  Attr PSize  PFree 
  /dev/sdb        lvm2 ---  18.00g 18.00g
  /dev/sdc        lvm2 ---  18.00g 18.00g
  /dev/sde        lvm2 ---  18.00g 18.00g
5

Actual results:

Exit code of 5 and a warning in stderr with one of the PVs missing

Expected results:

Exit code of 0 with all the PVs listed


Additional info:

Comment 1 Tony Asleson 2015-10-22 00:36:09 UTC
Created attachment 1085365 [details]
Debug output from both commands using -vvvv

Comment 3 Tony Asleson 2015-10-23 17:44:23 UTC
(In reply to David Teigland from comment #2)
> fixed here
> https://git.fedorahosted.org/cgit/lvm2.git/commit/
> ?id=1a74171ca5682a684d0e05c6090c3d33cab8795b

Fix removes the exit code 5 and the warning, but the PVs associated with the VG are still missing.  This is not an acceptable solution.

Comment 5 Jan Kurik 2016-02-24 13:51:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 6 Fedora End Of Life 2017-07-25 19:23:07 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Tony Asleson 2017-07-25 19:47:14 UTC
Tested, working as expected.


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