Bug 1184990 - VMware VM & Template refresh doesn't properly set cores and sockets
Summary: VMware VM & Template refresh doesn't properly set cores and sockets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Insight
Version: 5.3.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.4.0
Assignee: Brandon Dunne
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks: 1196326
TreeView+ depends on / blocked
 
Reported: 2015-01-22 16:13 UTC by Josh Carter
Modified: 2019-02-15 14:03 UTC (History)
7 users (show)

Fixed In Version: 5.4.0.0.11
Doc Type: Bug Fix
Doc Text:
The VMware workflow was trying to set the cores and sockets based on the templates values. However, the data refreshed from vSphere was incorrectly saving the core and socket counts. As a result, VMware VM & template refresh did not properly set the cores and sockets. This bug was fixed by updating the refresh logic to add numCoresPerSocket when available and calculating and storing the cores per socket if available. Cores and socket values are now set correctly.
Clone Of:
: 1196326 (view as bug list)
Environment:
Last Closed: 2015-06-16 12:48:21 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Josh Carter 2015-01-22 16:13:04 UTC
Description of problem:

Vmware template with virtual sockets=1 & cores per socket=4 will be provisioned using the lifecycle dialog as virtual sockets=4 & cores per socket=1. Looking at the dialog "Hardware" it shows the swap between the two. 

The template details shows the template as to having 4 Processors not 1. 

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


How reproducible:
very

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Brandon Dunne 2015-02-10 03:16:41 UTC
Josh, I tested against vSphere 5.1 and wasn't able to reproduce the problem.  I assigned 2 sockets and 4 cores and that is what was provisioned.  Is this a specific version of vSphere?

Comment 3 Brandon Dunne 2015-02-16 17:04:37 UTC
After talking to Josh, I found out that the bug is reporting that the default options in the dialog for Sockets and Cores are not the same numbers as the source template.  These defaults are pulled from static values in the dialog config.  

The dialog defaults can be changed by navigating to Automate / Customization and selecting the appropriate dialog.  Then search for :number_of_sockets: and :cores_per_socket: and modifying the :default: values under each of them.

Comment 5 Brandon Dunne 2015-02-17 14:22:22 UTC
The vmware workflow is trying to set the cores and sockets based on the templates values.  The problem is that the data refreshed from vSphere is incorrectly saving the core and socket counts.  To correctly gather the core and socket counts, we need to dig deeper into the advanced settings of the VM.  We do not currently gather this information in the normal refresh because of the additional amount of data that will be pulled back and the performance impact of this.  As a workaround, you can run a smart state scan on the template and that will pull back the advanced settings and should properly display them in the Lifecycle / Provision dialog.

vSphere 5.0 has the core and socket data available in another location of the VM config.  I will see if we can pull this back on a refresh without too much of a performance impact.

Comment 6 CFME Bot 2015-02-25 16:51:15 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/69b5637ec063ebc6002280b0add35b9182fc5cba

commit 69b5637ec063ebc6002280b0add35b9182fc5cba
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Feb 23 16:09:59 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue Feb 24 11:37:27 2015 -0500

    Update refresh logic to add numCoresPerSocket when available
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1184990

 lib/VMwareWebService/MiqVimInventory.rb   |  2 ++
 lib/VMwareWebService/MiqVimVm.rb          | 18 ++++++++++--------
 lib/VMwareWebService/VimPropMaps.rb       |  1 +
 vmdb/app/models/ems_refresh/vc_updates.rb |  1 +
 4 files changed, 14 insertions(+), 8 deletions(-)

Comment 7 CFME Bot 2015-02-25 16:51:19 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/340f9b45fdb5e42fa4e498fa162abe69ae58be89

commit 340f9b45fdb5e42fa4e498fa162abe69ae58be89
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Feb 24 11:33:22 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue Feb 24 11:51:45 2015 -0500

    Calculate and store the cores per socket if available
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1184990

 vmdb/app/models/ems_refresh/parsers/vc.rb       | 15 ++++++++-----
 vmdb/spec/models/ems_refresh/parsers/vc_spec.rb | 30 +++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 5 deletions(-)
 create mode 100644 vmdb/spec/models/ems_refresh/parsers/vc_spec.rb

Comment 8 CFME Bot 2015-02-25 17:10:48 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e52350d142b1453b0426282a4234d751ddbad7c8

commit e52350d142b1453b0426282a4234d751ddbad7c8
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Feb 23 16:09:59 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Feb 25 12:09:17 2015 -0500

    Update refresh logic to add numCoresPerSocket when available
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1184990

 lib/VMwareWebService/MiqVimInventory.rb   |  2 ++
 lib/VMwareWebService/MiqVimVm.rb          | 18 ++++++++++--------
 lib/VMwareWebService/VimPropMaps.rb       |  1 +
 vmdb/app/models/ems_refresh/vc_updates.rb |  1 +
 4 files changed, 14 insertions(+), 8 deletions(-)

Comment 9 CFME Bot 2015-02-25 17:10:51 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d51fd204297cf0fbe350e2752d88ecfadfa161bc

commit d51fd204297cf0fbe350e2752d88ecfadfa161bc
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Feb 24 11:33:22 2015 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Feb 25 12:09:17 2015 -0500

    Calculate and store the cores per socket if available
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1184990

 vmdb/app/models/ems_refresh/parsers/vc.rb       | 15 ++++++++-----
 vmdb/spec/models/ems_refresh/parsers/vc_spec.rb | 30 +++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 5 deletions(-)
 create mode 100644 vmdb/spec/models/ems_refresh/parsers/vc_spec.rb

Comment 11 Pete Savage 2015-04-17 08:09:52 UTC
This appears to now be working as expected

Verified in 5.4.0.0.19

Comment 13 errata-xmlrpc 2015-06-16 12:48:21 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-1100.html


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