Bug 1216889 - VM not getting auto power on after provisioning from CFME 3.1 if memory size is more than 4GB
Summary: VM not getting auto power on after provisioning from CFME 3.1 if memory size ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.5.0
Assignee: Brandon Dunne
QA Contact: Ramesh A
URL:
Whiteboard:
Depends On:
Blocks: 1240373
TreeView+ depends on / blocked
 
Reported: 2015-04-29 07:08 UTC by Nikhil Gupta
Modified: 2019-05-20 11:45 UTC (History)
6 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
After provisioning a virtual machine with more than 4 GB memory from CloudForms Management Engine 3.1, a virtual machine could not be powered on automatically. This happened because the memory reservation was larger than the allocated virtual machine memory. CloudForms 4.0 now validates memory reservation and reports an error message if it is larger than the allocated virtual machine's memory.
Clone Of:
: 1240373 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:06:25 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1432093 0 None None None Never
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Nikhil Gupta 2015-04-29 07:08:53 UTC
Description of problem:
VM not getting auto power on after provisioning from CFME 3.1 if memory size is more than 4GB

Version-Release number of selected component (if applicable):
cfme-5.3.3.2-1.el6cf.x86_64
RHEV 3.4

How reproducible:
Every time.

Steps to Reproduce:
1. Provision a VM using template
2. Increase the VM memory to 5 GB in Hardware section of 'Provision Virtual Machines' page.

Actual results:
VM is getting provisioned but it is not getting auto power on. Need to go on RHEV portal and start it manually.

Expected results:
VM should auto start.

Additional info:
Below error message is seen in logs:

automation.log-Apr23-6:
~~~
[2015-04-23T12:53:44.505643 #7957:9bb004]  INFO -- : Q-task_id([service_template_provision_task_1000000000008]) In State=[checkprovisioned], invoking [on_error] method=[update_serviceprovision_status(status => '[RhevmApiError]: [Cannot edit VM. Physical Memory Guaranteed cannot exceed Memory Size.]')]
~~~

engine.log:
~~~
2015-04-27 16:01:56,828 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-17) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: User admin logged in.
2015-04-27 16:01:57,696 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp-/127.0.0.1:8702-4) [45eead1f] CanDoAction of action UpdateVm failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM,ACTION_TYPE_FAILED_MIN_MEMORY_CANNOT_EXCEED_MEMORY_SIZE
2015-04-27 16:01:57,700 INFO  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp-/127.0.0.1:8702-4) [45eead1f] Lock freed to object EngineLock [exclusiveLocks= key: Unix_VM1 value: VM_NAME, sharedLocks= ]
2015-04-27 16:01:59,520 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-4) Operation Failed: [Cannot edit VM. Physical Memory Guaranteed cannot exceed Memory Size.]
~~~

Comment 1 Nikhil Gupta 2015-04-29 08:46:37 UTC
As a work around, added more memory options as below:

1) Login to CFME as admin
2) Click Automate > Customization
3) Provisioning Dialogs > Sample RedHat VM Provisioning Dialog
4) Configuration > Copy this dialog
5) Give a Unique name and description
6) Search for VM_memory in the code and add entries for high memory as per requirements
7) Save the Dialog and make proper attachment to Invoke the same for VM provisioning

Can we add more memory options in default view?
Same query is asked in BZ-1096244

Comment 2 Brandon Dunne 2015-05-06 18:44:30 UTC
Nikhil,

Are you using a custom dialog?  The default dialogs only show 1Gb, 2Gb and 4Gb for the memory selection.

From what I am reading in the RHEV log snippets that you pasted, it sounds like you are trying to reserve more memory for the VM than you have allocated to it.  Is that correct?

Comment 3 Nikhil Gupta 2015-05-18 14:19:25 UTC
Brandon,

1. This issue was raised by the one of our customers. Yes, by default dialogs only show 1Gb, 2Gb and 4Gb for the memory selection but there is an option to specify 'VM Reservations Memory (MB)'. 

2. Customer was selecting 4GB in memory selection and 5GB in VM Reservation section. Therefore he was getting below error:

automation.log-Apr23-6:
~~~
[2015-04-23T12:53:44.505643 #7957:9bb004]  INFO -- : Q-task_id([service_template_provision_task_1000000000008]) In State=[checkprovisioned], invoking [on_error] method=[update_serviceprovision_status(status => '[RhevmApiError]: [Cannot edit VM. Physical Memory Guaranteed cannot exceed Memory Size.]')]
~~~

3. So here requirement is to have more memory selection options in default dropdown list such as 1Gb, 2Gb, 3Gb, 4Gb, 5Gb at least till 8Gb. Which is already asked in following bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1096244

As this one is duplicate I will close it.

Comment 4 Nikhil Gupta 2015-05-18 14:20:40 UTC

*** This bug has been marked as a duplicate of bug 1096244 ***

Comment 5 Brandon Dunne 2015-05-21 20:22:25 UTC
Reopening because there should be a validation to prevent reservation from being larger than selected amount of memory

Comment 6 CFME Bot 2015-05-22 21:26:10 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/92ed583a370a52b9ee1392339202de8f7e466eea

commit 92ed583a370a52b9ee1392339202de8f7e466eea
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon May 18 15:23:09 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Fri May 22 15:16:31 2015 -0400

    Validate memory reservation is not larger than vm memory
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216889

 vmdb/app/models/miq_provision_virt_workflow.rb                      | 6 ++++++
 vmdb/app/models/miq_request_workflow.rb                             | 5 +++++
 vmdb/product/dialogs/miq_dialogs/miq_provision_dialogs-user.yaml    | 1 +
 vmdb/product/dialogs/miq_dialogs/miq_provision_dialogs.yaml         | 1 +
 .../miq_dialogs/miq_provision_dialogs_clone_to_template.yaml        | 1 +
 .../dialogs/miq_dialogs/miq_provision_dialogs_clone_to_vm.yaml      | 1 +
 .../product/dialogs/miq_dialogs/miq_provision_dialogs_template.yaml | 1 +
 .../miq_dialogs/miq_provision_redhat_dialogs_clone_to_vm.yaml       | 1 +
 .../dialogs/miq_dialogs/miq_provision_redhat_dialogs_template.yaml  | 1 +
 9 files changed, 18 insertions(+)

Comment 7 CFME Bot 2015-05-22 21:26:14 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/fba5714301a299a40eee813fcd522b921c8464d7

commit fba5714301a299a40eee813fcd522b921c8464d7
Author:     Brandon Dunne <bdunne>
AuthorDate: Wed May 20 16:09:51 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Fri May 22 15:16:51 2015 -0400

    Add specs for MiqRequestWorkflow#validate around validation_method
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216889

 vmdb/spec/factories/miq_dialog.rb             | 20 ++++++++++++++++++++
 vmdb/spec/factories/miq_provision_workflow.rb |  3 ---
 vmdb/spec/factories/miq_request_workflow.rb   | 10 ++++++++--
 vmdb/spec/models/miq_request_workflow_spec.rb | 27 +++++++++++++++++++++++++++
 4 files changed, 55 insertions(+), 5 deletions(-)
 delete mode 100644 vmdb/spec/factories/miq_provision_workflow.rb
 create mode 100644 vmdb/spec/models/miq_request_workflow_spec.rb

Comment 8 CFME Bot 2015-05-22 21:26:17 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/49d2026072cea5214244cac8591d107d19dee666

commit 49d2026072cea5214244cac8591d107d19dee666
Author:     Brandon Dunne <bdunne>
AuthorDate: Wed May 20 17:05:38 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Fri May 22 15:16:54 2015 -0400

    Add specs for MiqProvisionVirtWorkflow#validate_memory_reservation
    
    Move FactoryGirl definition into parent file
    Share let blocks between contexts
    Fix issues related to factory creating user and dialog
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216889

 vmdb/spec/factories/miq_provision_virt_workflow.rb |  3 --
 vmdb/spec/factories/miq_request_workflow.rb        |  2 ++
 .../models/miq_provision_virt_workflow_spec.rb     | 32 ++++++++++++++++------
 3 files changed, 25 insertions(+), 12 deletions(-)
 delete mode 100644 vmdb/spec/factories/miq_provision_virt_workflow.rb

Comment 9 CFME Bot 2015-06-22 15:29:40 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=edc741ef8067854fae7315c5bfa4ab723b850c52

commit edc741ef8067854fae7315c5bfa4ab723b850c52
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon May 18 15:23:09 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue May 26 12:19:48 2015 -0400

    Validate memory reservation is not larger than vm memory
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216889

 vmdb/app/models/miq_provision_virt_workflow.rb                      | 6 ++++++
 vmdb/app/models/miq_request_workflow.rb                             | 5 +++++
 vmdb/product/dialogs/miq_dialogs/miq_provision_dialogs-user.yaml    | 1 +
 vmdb/product/dialogs/miq_dialogs/miq_provision_dialogs.yaml         | 1 +
 .../miq_dialogs/miq_provision_dialogs_clone_to_template.yaml        | 1 +
 .../dialogs/miq_dialogs/miq_provision_dialogs_clone_to_vm.yaml      | 1 +
 .../product/dialogs/miq_dialogs/miq_provision_dialogs_template.yaml | 1 +
 .../miq_dialogs/miq_provision_redhat_dialogs_clone_to_vm.yaml       | 1 +
 .../dialogs/miq_dialogs/miq_provision_redhat_dialogs_template.yaml  | 1 +
 9 files changed, 18 insertions(+)

Comment 10 CFME Bot 2015-06-22 15:29:44 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=629ac972484831dfb4abf667424c699b7ad7482e

commit 629ac972484831dfb4abf667424c699b7ad7482e
Author:     Brandon Dunne <bdunne>
AuthorDate: Wed May 20 16:09:51 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue May 26 12:20:17 2015 -0400

    Add specs for MiqRequestWorkflow#validate around validation_method
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216889

 vmdb/spec/factories/miq_dialog.rb             | 20 ++++++++++++++++++++
 vmdb/spec/factories/miq_provision_workflow.rb |  3 ---
 vmdb/spec/factories/miq_request_workflow.rb   | 10 ++++++++--
 vmdb/spec/models/miq_request_workflow_spec.rb | 27 +++++++++++++++++++++++++++
 4 files changed, 55 insertions(+), 5 deletions(-)
 delete mode 100644 vmdb/spec/factories/miq_provision_workflow.rb
 create mode 100644 vmdb/spec/models/miq_request_workflow_spec.rb

Comment 11 CFME Bot 2015-06-22 15:29:48 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5a209f57d80c71c2709c223a71803dd634efa348

commit 5a209f57d80c71c2709c223a71803dd634efa348
Author:     Brandon Dunne <bdunne>
AuthorDate: Wed May 20 17:05:38 2015 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue May 26 12:20:19 2015 -0400

    Add specs for MiqProvisionVirtWorkflow#validate_memory_reservation
    
    Move FactoryGirl definition into parent file
    Share let blocks between contexts
    Fix issues related to factory creating user and dialog
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1216889

 vmdb/spec/factories/miq_provision_virt_workflow.rb |  3 --
 vmdb/spec/factories/miq_request_workflow.rb        |  2 ++
 .../models/miq_provision_virt_workflow_spec.rb     | 32 ++++++++++++++++------
 3 files changed, 25 insertions(+), 12 deletions(-)
 delete mode 100644 vmdb/spec/factories/miq_provision_virt_workflow.rb

Comment 12 Ramesh A 2015-10-30 07:11:33 UTC
Good to go.  Verified and working fine in 5.5.0.8-beta1.4.20151027164951_4ab7fea.

Appliance now throws validation message stating: " 'Hardware/Memory (MB)' Reservation is larger than VM Memory "

Comment 14 errata-xmlrpc 2015-12-08 13:06:25 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-2015:2551


Note You need to log in before you can comment on or make changes to this bug.