Bug 1240373 - 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.4.1
Assignee: Brandon Dunne
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On: 1216889
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-06 17:45 UTC by Brandon Dunne
Modified: 2019-05-20 11:46 UTC (History)
9 users (show)

Fixed In Version: 5.4.1.0
Doc Type: Bug Fix
Doc Text:
In the previous version of CloudForms Management Engine, virtual machines provisioned on Red Hat Enterprise Virtualization (RHEV) did not auto start after provisioning if the memory allocated to the virtual machine was greater then virtual machine memory setting. This bug was fixed by validating that the memory reserved for the virtual machine is not larger then the virtual machine memory setting. Virtual machines now auto start correctly after provisioning in the new version of CloudForms Management Engine.
Clone Of: 1216889
Environment:
Last Closed: 2015-07-30 13:12:09 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of provision dialog (48.70 KB, image/png)
2015-07-22 08:54 UTC, Nandini Chandra
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1432093 0 None None None Never
Red Hat Product Errata RHBA-2015:1511 0 normal SHIPPED_LIVE CFME 5.4.1 bug fixes, and enhancement update 2015-07-30 17:10:05 UTC

Description Brandon Dunne 2015-07-06 17:45:56 UTC
+++ This bug was initially created as a clone of Bug #1216889 +++

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.]
~~~

--- Additional comment from Nikhil Gupta on 2015-04-29 04:46:37 EDT ---

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

--- Additional comment from Brandon Dunne on 2015-05-06 14:44:30 EDT ---

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?

--- Additional comment from Nikhil Gupta on 2015-05-18 10:19:25 EDT ---

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.

--- Additional comment from Nikhil Gupta on 2015-05-18 10:20:40 EDT ---



--- Additional comment from Brandon Dunne on 2015-05-21 16:22:25 EDT ---

Reopening because there should be a validation to prevent reservation from being larger than selected amount of memory

--- Additional comment from CFME Bot on 2015-05-22 17:26:10 EDT ---

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(+)

--- Additional comment from CFME Bot on 2015-05-22 17:26:14 EDT ---

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

--- Additional comment from CFME Bot on 2015-05-22 17:26:17 EDT ---

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

--- Additional comment from CFME Bot on 2015-06-22 11:29:40 EDT ---

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(+)

--- Additional comment from CFME Bot on 2015-06-22 11:29:44 EDT ---

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

--- Additional comment from CFME Bot on 2015-06-22 11:29:48 EDT ---

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 2 Nandini Chandra 2015-07-22 08:54:48 UTC
Created attachment 1054670 [details]
screenshot of provision dialog

Comment 3 Nandini Chandra 2015-07-22 08:55:13 UTC
Verified in 5.4.1

Comment 5 errata-xmlrpc 2015-07-30 13:12:09 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://rhn.redhat.com/errata/RHBA-2015-1511.html


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