Bug 1513086 - Openstack instances have no cores but have multiple sockets
Summary: Openstack instances have no cores but have multiple sockets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Scott Seago
QA Contact: Matouš Mojžíš
URL:
Whiteboard: ui:openstack:instance
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-14 17:45 UTC by Matouš Mojžíš
Modified: 2020-01-02 11:02 UTC (History)
9 users (show)

Fixed In Version: 5.10.0.14
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:00:39 UTC
Category: Bug
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
no cores used (159.77 KB, image/png)
2017-11-14 17:45 UTC, Matouš Mojžíš
no flags Details
sockets values swapped with cores values (185.58 KB, image/png)
2018-10-15 12:39 UTC, Matouš Mojžíš
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:00:46 UTC

Description Matouš Mojžíš 2017-11-14 17:45:20 UTC
Created attachment 1352088 [details]
no cores used

Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1. Add rhos cloud provider
2. Go to any instance's dashboard
3.

Actual results:
In container field there are no cores used for instance.

Expected results:


Additional info:

Comment 2 Scott Seago 2018-08-29 01:31:59 UTC
PR with fix for master is here: https://github.com/ManageIQ/manageiq-providers-openstack/pull/341

Comment 3 CFME Bot 2018-08-29 10:53:12 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/4d0c9df33fedef10b29d9edcf8f9fa1a755c63f7
commit 4d0c9df33fedef10b29d9edcf8f9fa1a755c63f7
Author:     Scott Seago <sseago>
AuthorDate: Tue Aug 28 21:22:20 2018 -0400
Commit:     Scott Seago <sseago>
CommitDate: Tue Aug 28 21:22:20 2018 -0400

    bug 1513086: add cores per socket to OpenStack cloud inventory parser

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

    For OpenStack cloud, cpu_cores_per_socket was always set to 1 in the legacy refresh_parser
    since OpenStack flavors only have a single "number of CPUs" param. The new inventory
    parser was not setting this param at all, though, leaving it as nil.

 app/models/manageiq/providers/openstack/inventory/parser/cloud_manager.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 4 Matouš Mojžíš 2018-09-13 11:20:47 UTC
Still the same. I think this issue starts in Flavors. Flavors also have multiple CPUs and single core.

Comment 5 Scott Seago 2018-09-17 12:43:10 UTC
I'm not sure what you mean by "starts in Flavors". The flavors model doesn't even have an attribute for "cores per CPU" (it only has # of cpus), so the refresh code hard-codes this value to 1. When I reproduced this in my development environment, the problem I found was that this was only being done in the legacy refresh_parser. The new inventory parser wasn't setting this value to anything at all.

If you're still seeing the problem, assuming your environment has my fix, I'm guessing that you're hitting another bug that for some reason isn't reproducing in my environment. In my env, without this fix I'm seeing the "no cores" problem but with the fix I don't see it. Can you confirm that you're testing in an env with this fix and, if so, could you provide a screenshot showing exactly what you're seeing now?

Comment 6 Matouš Mojžíš 2018-10-15 12:39:12 UTC
Okay,
I added another screenshot as attachment.
The only thing changed is that it has 1 core instead of 0 cores.
When I provision an instance with 4 Cores it shows in its summary that it uses 4 sockets instead of 4 cores and 1 core instead of 1 socket.

Comment 7 Matouš Mojžíš 2018-10-15 12:39:52 UTC
Created attachment 1494034 [details]
sockets values swapped with cores values

Comment 8 Scott Seago 2018-10-15 13:01:03 UTC
It looks like you are seeing the code working as intended now. OpenStack flavors don't model multi-core CPUs. The bug reported was that we were failing to show cores at all, since the existing code that set the number of cores per socket to one for OpenStack flavors was missing in the newly redesigned refresh code. If a flavor has "4 CPUs", this gets pulled into ManageIQ as 4 CPUs with one core per CPU.

Comment 12 Matouš Mojžíš 2018-12-12 14:57:12 UTC
Verified in 5.10.0.28.
Cores and sockets are displayed correctly.

Comment 13 errata-xmlrpc 2019-02-07 23:00:39 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


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