Bug 749333 - Consider renaming CPU type to be "CPU Core"
Summary: Consider renaming CPU type to be "CPU Core"
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.2
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: jon30-sprint8
TreeView+ depends on / blocked
 
Reported: 2011-10-26 18:14 UTC by Charles Crouch
Modified: 2024-03-04 13:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 749121 0 medium NEW (Sigar issue:) CPU core numbers on virtual hosts on AIX cause unmonitored CPUs, JVM frequent crashes and agent.log warni... 2022-03-31 04:28:49 UTC

Description Charles Crouch 2011-10-26 18:14:31 UTC
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 19:59:05 UTC
(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 20:33:30 UTC
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.

UPDATE RHQ_RESOURCE SET NAME='CPU Core 0' WHERE NAME='CPU 0'
UPDATE RHQ_RESOURCE SET NAME='CPU Core 1' WHERE NAME='CPU 1'
...
UPDATE RHQ_RESOURCE SET NAME='CPU Core 32' WHERE NAME='CPU 32'

Comment 3 Charles Crouch 2011-10-26 21:40:27 UTC
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 
change.

Comment 4 Lukas Krejci 2011-10-27 06:48:36 UTC
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 07:11:05 UTC
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 13:27:59 UTC
Deprioritized for upcoming release.


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