Bug 1510384

Summary: iSCSI Storage domain's size after executing 'reduceluns' via REST API or 'Remove LUNs' via UI doesn't seem to be updated
Product: [oVirt] ovirt-engine Reporter: shani <sleviim>
Component: BLL.StorageAssignee: shani <sleviim>
Status: CLOSED CURRENTRELEASE QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0CC: bugs, tnisan, ylavi
Target Milestone: ovirt-4.2.1Keywords: EasyFix
Target Release: ---Flags: rule-engine: ovirt-4.2+
ylavi: exception+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:49:59 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:

Description shani 2017-11-07 10:00:12 UTC
Description of problem:
After executing on iSCSI storage domain a 'reduceluns' command via REST API, the storage domain's size seems to remain the same, although it should be reduced. 

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

How reproducible:
100%

Steps to Reproduce:
1. create an iSCSI storage domain with some luns.
2. pay attention to the storage doamin's size. 
3. Using the REST API, run the following:

Method:
-------
POST

URL:
----
https://xxxx.xxxx.xxxx.com/ovirt-engine/api/storageDomains/<SD_ID>/reduceluns

Body:
-----
 <action>
   <logical_units>
     <logical_unit id="<LUN_ID>"/>
   </logical_units>
 </action>


Actual results:
Size doesn't seem to be updated - same as before reducing luns.

Expected results:
Size should be reduces.

Additional info:
-

Comment 1 Allon Mureinik 2017-11-08 15:39:09 UTC
When extending a domain, GetVGInfo is called to update the information in the engine after the domain is manipulated on the storage side.

It seems that this isn't done when reducing a domain, and probably should be in order to solve this BZ.
While this isn't a very high priority, it seems like a relatively easy win, and if we intend to expose this action in the GUI, we'd better fix all the GUI hickups.

Comment 2 shani 2018-01-02 10:07:08 UTC
Update Description of problem

Comment 3 Yosi Ben Shimon 2018-01-09 13:23:00 UTC
Tested both via REST API and 'Remove LUNs' via UI.
Both update the size of the SD.

Moving to VERIFIED

Comment 4 Sandro Bonazzola 2018-02-12 11:49:59 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

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