Bug 1427323

Summary: pvmove does not always print 100% when user specifies -i 1
Product: [Community] LVM and device-mapper Reporter: Tony Asleson <tasleson>
Component: lvm2Assignee: LVM Team <lvm-team>
lvm2 sub component: Command-line tools QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: unspecified    
Priority: high CC: agk, anprice, bmarzins, bmr, dlehman, heinzm, jbrassow, jonathan, lvm-team, msnitzer, prajnoha, thornber, zkabelac
Version: 2.02.167Keywords: Triaged
Target Milestone: ---Flags: rule-engine: lvm-technical-solution?
dlehman: needinfo? (agk)
rule-engine: lvm-test-coverage?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1563827 1595334 (view as bug list) Environment:
Last Closed: Type: Bug
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: 1425882, 1563827, 1595334    
Attachments:
Description Flags
Bash script used to reproduce the bug none

Description Tony Asleson 2017-02-27 22:10:45 UTC
Created attachment 1258193 [details]
Bash script used to reproduce the bug

Description of problem:

When you issue a

# pvmove /dev/sdb /dev/sdg -i 1

you occasionally get:

# pvmove /dev/sdb /dev/sdg -i 1
  /dev/sdb: Moved: 0.00%
# echo $?
0

I'm trying to differentiate between a pvmove that has completed and one that was aborted with a `pvmove --abort`.  Thus the reason I need the 100% output as pvmove exits with 0 in both cases.


Version-Release number of selected component (if applicable):
LVM version:     2.02.167(2) (2016-11-05)
Library version: 1.02.136 (2016-11-05)
Driver version:  4.35.0


How reproducible:
About 1 in 12ish

Steps to Reproduce:
I was able to reproduce this by utilizing a bash script which I have attached


Actual results:
pvmove exits while only outputting:
/dev/sdb: Moved: 0.00%


Expected results:
/dev/sdb: Moved: 100.00%


Additional info:
If you change pvmove to exit with a different exit code when it gets aborted I wouldn't require the output to be perfect.

Comment 1 Ondrej Kozina 2017-02-28 21:36:05 UTC
This sounds like a bug. Just to verify my blurry idea of what might went wrong: did you run it on a system with lvmpold enabled?

Comment 2 Tony Asleson 2017-03-01 13:31:16 UTC
(In reply to Ondrej Kozina from comment #1)
> This sounds like a bug. Just to verify my blurry idea of what might went
> wrong: did you run it on a system with lvmpold enabled?

Default configuration of F25, lvmpolld was enabled and running.

Comment 4 David Teigland 2018-12-17 15:55:03 UTC
"pvmove A B" moves all the PEs from A to B.  Before it begins there will be N PE's on A ("pvs -o used A"), and afteward there will be 0.  I think that the best way to check the result of this command is to see if there are 0 PEs on A (using pvs) after pvmove is done.