Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1414862

Summary: getVgInfo not returning updated information on allocated extents on a PV
Product: [oVirt] vdsm Reporter: Avihai <aefrat>
Component: CoreAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: Avihai <aefrat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: ---CC: amureini, bugs, laravot, tnisan
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: 4.20.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:40:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine and vdsm logs none

Description Avihai 2017-01-19 15:41:19 UTC
Description of problem:
After deleing a disk on an iscsi domain linux pvs Alloc is updated but VDSM (via vdsm client) is not updating its PE_ALLOC to the same value as expected.

Version-Release number of selected component (if applicable):
oVirt Engine Version: 4.1.0.1-0.4.master.20170118134729.gitf34da1f.el7.centos
vdsm-4.19.2-1.el7.centos.x86_64

How reproducible:
100%


Steps to Reproduce:
1. Create iscsi domain with 1 lun on it 
2. Create a disk with size X
3. Install vdsClient (yum install vdsm-cli) 
4. Before deleting the disk check:

a) pvs stats via :
> pvs -o pv_name,pv_size,pv_free,pv_used,pv_pe_count,pv_pe_alloc_count

b) vdsClient stats
> vdsClient -s 0 getVGInfo <VG-UUID>

5.delete the disk .

6. check again the pvs & vdsclient.

Actual results:
pvs & vdsclient is not the same.
Alloc on pvs is updated to 0 but PE_ALLOC on vdsclient stays the same.


Expected results:
pvs & vdsclient is the same.
Alloc on pvs = PE_ALLOC on vdsclient = 0 


Additional info:
This is happening because pvs cache is not flushed until storage domain is in maintenance.

Comment 1 Avihai 2017-01-19 15:43:05 UTC
Bug was opened after a discussion with Liron R on bug 1410182 with his approval

Comment 2 Avihai 2017-01-19 15:59:02 UTC
Created attachment 1242520 [details]
engine and vdsm logs

Comment 3 Yaniv Kaul 2017-01-22 09:58:53 UTC
vdsClient is deprecated. Liron - please sync with Irit on the new client.

Comment 4 Liron Aravot 2017-01-22 11:16:20 UTC
Thanks Avihai/Yaniv,
This bug is caused by internal logic in vdsm that avoids refresh of the vg data when the domain is active, regardless of the client used to execute it.
Removing the vdsClient from the header.

Comment 5 Liron Aravot 2017-02-07 16:05:10 UTC
Postponing to 4.2, as this bug isn't affecting any flow that is using getVGInfo on 4.1.

Comment 6 Avihai 2017-07-10 12:23:26 UTC
Verified .

Engine:
4.2.0-0.0.master.20170707124946.gitf15a6d9.el7.centos

VDSM:
4.20.1-158.gita94febd

Comment 7 Sandro Bonazzola 2017-12-20 11:40:03 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.