Bug 749333 - Consider renaming CPU type to be "CPU Core"
Consider renaming CPU type to be "CPU Core"
Status: NEW
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
Unspecified Unspecified
low Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
Blocks: jon30-sprint8
  Show dependency treegraph
Reported: 2011-10-26 14:14 EDT by Charles Crouch
Modified: 2018-01-30 12:56 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Charles Crouch 2011-10-26 14:14:31 EDT
I'd like to do a quick analysis to see whether renaming the CPU platform service type to be CPU Core would make it a better description of whats actually being monitored.

Steps required:
a) Double check the current CPU resources, really do map to core not sockets. I believe after https://bugzilla.redhat.com/show_bug.cgi?id=536022 that they should do.
b) Determine if we should be using the patched version of Sigar that has fixes for the issue described here: https://bugzilla.redhat.com/show_bug.cgi?id=714249. If there is too much risk in the new Sigar version, then that can be pushed.
c) Determine if the are any unexpected side-effects from updating the resource type name. Maybe we should consider updating the default resource name too?
Comment 1 John Mazzitelli 2011-10-26 15:59:05 EDT
(In reply to comment #1)
> c) Determine if the are any unexpected side-effects from updating the resource
> type name. Maybe we should consider updating the default resource name too?

this isn't as simple as "just edit rhq-plugin.xml and change "CPU" to "CPU Core". because of existing resources, we might have to play with some db-upgrade stuff. Changing type names will look as though we REMOVED the one type and ADDED the new type (we have no way of indicating "rename CPU to CPU Core". It only looks like the "CPU" type is gone and this new one called "CPU Core" now exists. This is a known limitation with plugin metadata upgrade.
Comment 2 John Mazzitelli 2011-10-26 16:33:30 EDT
We could change the resource NAME that we discover. That's easy to do in the platform plugin Java code. The resource TYPE name can still be CPU, but rather than name them "CPU 0" or "CPU 1" we can name them "CPU Core 0" or "CPU Core 1". The type name stays the same so the metadata doesn't change. Its only new resources that are discovered get new names.

We coudl add db-upgrade script to change existing names like CPU 0 to CPU Core 0.

Comment 3 Charles Crouch 2011-10-26 17:40:27 EDT
Add a needsinfo on luikas to comment on the resource type changes, given his 
experience with apache.
Depending on how he responds then we could look at just doing the resource name 
Comment 4 Lukas Krejci 2011-10-27 02:48:36 EDT
As John said, there is no easy way of renaming a resource type apart from playing games in db-upgrade.

As for the renaming the names of the existing resources, there is a "hidden" feature of the ResourceUpgradeFacet that enables that. The ResourceUpgradeFacet can supply a new name of an existing resource, but on the server we don't apply it because it was deemed an unnecessary complication (what about resources that were renamed by the user?).

So on the server side, there is a system setting called RESOURCE_GENERIC_PROPERTIES_UPGRADE which defaults to false (and is currently defined as read-only and not visible in the UI). If that switch is flipped to true, the server will start to accept the resource name suggestions from the resource upgrades.

Of course it is perfectly possible to use db-upgrade for that as well. I just wanted to highlight the other (cleaner?) way. If that switch was visible, the user could still have an option of saying "no, i don't want my resources renamed by some stupid plugins".
Comment 5 Heiko W. Rupp 2011-10-27 03:11:05 EDT
See also https://bugzilla.redhat.com/show_bug.cgi?id=749121 about an issue of core counting in our Sigar version.
Comment 6 Charles Crouch 2011-10-31 09:27:59 EDT
Deprioritized for upcoming release.

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