Bug 1644351

Summary: Quota for vm_reconfigure disk_remove fails sometimes
Product: Red Hat CloudForms Management Engine Reporter: William Fitzgerald <wfitzger>
Component: AutomateAssignee: William Fitzgerald <wfitzger>
Status: CLOSED ERRATA QA Contact: Ganesh Hubale <ghubale>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.8.4CC: akarol, dmetzger, mfeifer, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:03:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description William Fitzgerald 2018-10-30 15:32:33 UTC
Description of problem: Vm_reconfigure disk_remove fails sometimes.  I have seen this fail in two cases.  The disk_remove will sometimes ignore the request and quota requested will be incorrect because the disk_name doesn't match.  In the other case, it fails on the match and aborts.


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


How reproducible: Depends on the disk_name being removed.  Try a RHV instance, this will fail.


Steps to Reproduce:
1. Add disk(s) to a vm instance
2. Turn quota on
3. Try to remove the disk(s)

Actual results:
Request will fail (<AEMethod requested>   NoMethodError: undefined method `match' for nil:NilClass) or not match on disk_name.  If there is no match on disk_name, then the size of the disk will not be included for quota.    


Expected results:
Request should be successful and size of disk(s) should be included in quota requested.
Sample message of successful disk_remove : <AEMethod requested> VM Reconfigure storage change: -28311552 Bytes


Additional info:

Comment 2 William Fitzgerald 2018-10-30 16:28:53 UTC
https://github.com/ManageIQ/manageiq-content/pull/461

Comment 3 CFME Bot 2018-11-28 15:01:47 UTC
New commit detected on ManageIQ/manageiq-content/hammer:

https://github.com/ManageIQ/manageiq-content/commit/cd49be5e3cb81fcc2415fe59bc7d9f138fe96413
commit cd49be5e3cb81fcc2415fe59bc7d9f138fe96413
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Wed Nov 14 14:29:12 2018 -0500
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Wed Nov 14 14:29:12 2018 -0500

    Merge pull request #461 from billfitzgerald0120/quota_vm_reconfig_disk_remove

    Modified requested method for reconfigure disk_remove.

    (cherry picked from commit c88a344807a704f4e3f1c0c0a53a80245f7ee08b)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1644351

 content/automate/ManageIQ/System/CommonMethods/QuotaMethods.class/__methods__/requested.rb | 16 +-
 spec/automation/unit/method_validation/requested_spec.rb | 13 +-
 2 files changed, 20 insertions(+), 9 deletions(-)

Comment 5 errata-xmlrpc 2019-02-07 23:03:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2019:0212