Bug 1534520
Summary: | [RHV] VM Reconfigure: Down VM Memory increase fail on cannot exceed maximum memory | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Ilanit Stein <istein> | ||||||||||
Component: | Providers | Assignee: | Moti Asayag <masayag> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Angelina Vasileva <anikifor> | ||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | high | ||||||||||||
Version: | 5.9.0 | CC: | bodnopoz, cpelland, gblomqui, jfrey, jhardy, jzmeskal, mperina, obarenbo | ||||||||||
Target Milestone: | GA | Keywords: | Regression, TestOnly, ZStream | ||||||||||
Target Release: | 5.10.0 | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | rhv:vm reconigure | ||||||||||||
Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | |||||||||||||
: | 1553384 1565358 (view as bug list) | Environment: | |||||||||||
Last Closed: | 2019-02-11 14:05:16 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | Bug | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | RHEVM | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 1553384, 1565358 | ||||||||||||
Attachments: |
|
Description
Ilanit Stein
2018-01-15 12:22:08 UTC
Created attachment 1381404 [details]
CFME_Service_Requests.png
See Request 5
Created attachment 1381405 [details]
evm.log
Created attachment 1381406 [details]
automation.log
Created attachment 1381407 [details]
rhevm.log
It doesn't seem to me as a blocker moving to 5.9.1 I also noticed that the same behaviour can be seen on CFME 5.8.3.4. Reproduction steps: 1. Provisiong a VM with memory 2GB and max memory 8GB 2. Try to reconfigure that VM to memory 10 GB Result: Error: Fault reason is "Operation Failed". Fault detail is "[Cannot edit VM. Memory size (10240MB) cannot exceed maximum memory size (8192MB).]". HTTP response code is 409. Should a clone of this bug for 5.8 be created? We don't have maximum memory available in CloudForms and maximum memory is set automatically only when VM is created as mentioned in BZ1430795, but no automatic changes are made when VM is updated. So we need to simulate the same behavior which exists in the webadmin: 1. Fetch actual VM from RHV to get current max memory 2. If new actual memory is higher than existing max memory, we need also to update max memory when updating VM in RHV using following algorithm: a. If actual memory is lesser than 1 TB, then set max memory to 4 * actual memory b. If actual memory equals or greater than 1TB, set max memory the same value as actual memory New commit detected on ManageIQ/manageiq-providers-ovirt/master: https://github.com/ManageIQ/manageiq-providers-ovirt/commit/42bfd8aef417935c99380c527bf6fa5852133adb commit 42bfd8aef417935c99380c527bf6fa5852133adb Author: Moti Asayag <masayag> AuthorDate: Thu Mar 8 05:18:21 2018 -0500 Commit: Moti Asayag <masayag> CommitDate: Thu Mar 8 05:18:21 2018 -0500 Provide max memory on VM reconfigure Since ManageIQ doesn't support max memory, there is a need to provider a value for it when modifying the vm memory limit. The max memory will be calculated as follow: 1. Fetch actual VM from RHV to get current max memory 2. If new actual memory is higher than existing max memory, the max memory will be updated as well: a. If actual memory is lesser than 1 TB, then set max memory to 4 * actual memory b. If actual memory equals or greater than 1TB, set max memory the same value as actual memory Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1534520 app/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4.rb | 37 +- spec/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4_spec.rb | 66 +- 2 files changed, 98 insertions(+), 5 deletions(-) Verified on: CFME 5.10.0.15 Verification steps: 1. Have a CFME appliance with RHV provider 2. Provision a VM from template. In Hardware tab, fill this in: Memory (MB) == 2048 VM Limits -> Memory (MB) == 8192 After provision, such VM has there attributes on RHV: Memory Size == 2048 MB Maximum Memory == 8192 MB 3. Shut this VM down. 4. In CFME UI, go to your VM's detail page. 5. Click Configuration -> Reconfigure this VM. 6. Increase Memory to 10 GB and submit your reconfiguration request. 7. Wait for the request to be successfully finished. 8. Go to RHV webadmin UI and check that Memory Size == 10 GB for you VM. 9. SSH to your VM and check that the memory is actually 10 GB (e.g. using "free" command) Verified also case: b. If actual memory equals or greater than 1TB, set max memory the same value as actual memory: For a RHV down VM with 4G and 8G Max memory, VM reconfigure, and set memory to 2T. The VM was updated to 2T memory, and 2T Max memory. |