Bug 1272175

Summary: lvconvert doesn't report progress while waiting for mirror to get synced with lvmpolld enabled
Product: [Fedora] Fedora Reporter: Ondrej Kozina <okozina>
Component: lvm2Assignee: Ondrej Kozina <okozina>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, bmarzins, bmr, dwysocha, heinzm, jonathan, lvm-team, msnitzer, prajnoha, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.133-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-30 16:01:55 UTC 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:

Description Ondrej Kozina 2015-10-15 16:22:04 UTC
Version-Release number of selected component (if applicable):
lvm2-2.02.132


How reproducible: always when source lv (xx/lv1 in example) is of segment type linear


Steps to Reproduce:
1. lvconvert --interval 1 --type mirror -m2 xx/lv1

Actual results:
No progress reported when using lvmpolld. While 
lvconvert --config "global { use_lvmpolld = 0 }" --interval 1 --type mirror -m2 xx/lv1 works as expected

Expected results:
[root@frawhide ~]# lvconvert --interval 1 --type mirror -m2 xx/lv1
  xx/lv1: Converted: 0,0%
  xx/lv1: Converted: 7,9%
  xx/lv1: Converted: 13,2%
  xx/lv1: Converted: 21,1%
  xx/lv1: Converted: 26,3%
  xx/lv1: Converted: 34,2%
  xx/lv1: Converted: 42,1%
  xx/lv1: Converted: 47,4%
  xx/lv1: Converted: 55,3%
  xx/lv1: Converted: 63,2%
  xx/lv1: Converted: 68,4%
  xx/lv1: Converted: 76,3%
  xx/lv1: Converted: 84,2%
  xx/lv1: Converted: 92,1%
  xx/lv1: Converted: 100,0

Comment 1 Ondrej Kozina 2015-10-16 13:30:01 UTC
Curiouser and curiouser... same command with --background option added won't contact lvmpolld at all!

Comment 2 Ondrej Kozina 2015-10-20 09:14:49 UTC
This one was a bit tricky.

While converting non-mirror type LV to mirror one the conversion is instant. In other words there's no need to poll the lvconvert operation when source LV is not a mirror type in the beginning of the lvconvert process. That's also the reason why with --background option lvmpolld is not even started. In such case the reported percentage in the foreground mode is not the percentage of conversion completed so far but in-sync progress info of both mirror legs instead. The lv status type in this particular case is not set to CONVERTING either.

On the other hand when we upconvert i.e. two leg mirror to a three leg one, the CONVERTING status is set (also visible in lvs output) and a real conversion is started. The conversion requires polling no matter if lvconvert is initiated in background mode or foreground mode because in the end of conversion the cleanup has to be done by lvmpolld initiated lvpoll command.