Bug 1127399

Summary: Cannot compile sample OpenPegasus providers "Error adding class CIM_Component to the repository"
Product: Red Hat Enterprise Linux 7 Reporter: Sean Stewart <Sean.Stewart>
Component: tog-pegasusAssignee: Vitezslav Crhonek <vcrhonek>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: amahdal, jscotka, Sean.Stewart, vcrhonek
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tog-pegasus-2.14.1-3.el7 Doc Type: Bug Fix
Doc Text:
Previously, it was not possible to compile sample OpenPegasus providers, and the following error occurred: Error adding class CIM_Component to the repository This bug has been fixed, and providers are now able to compile successfully.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 11:08:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
workaround patch none

Description Sean Stewart 2014-08-06 19:58:07 UTC
Description of problem:
I've installed tog-pegasus-devel, and am trying to compile the sample providers, so I can use them and the sample clients to work on writing my own providers/clients.  But when I run the "make setupSDK" command, I get the following, appearing that it's missing a CIM class that I can not find any reference to, except in the documentation.  I've installed every openlmi or pegasus related pacakge I can find:

root@wica-fo-freestate:/usr/share/Pegasus/samples# make setupSDK
make[1]: Entering directory `/usr/share/Pegasus/samples/Providers/Load'
+++++ Creating SDKExamples/DefaultCXX namespace ...
+++++ Loading SDK_CIM_Schema.mof into SDKExamples/DefaultCXX namespace ...
Warning:  Class CIM_ManagedElement already exists in the repository
Warning:  Class CIM_ManagedSystemElement already exists in the repository
Warning:  Class CIM_LogicalElement already exists in the repository
Parsing error: parse error: Error adding class CIM_Component to the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_AbstractComponent
make[1]: *** [createCXXrepository] Error 250
make[1]: Leaving directory `/usr/share/Pegasus/samples/Providers/Load'
make: *** [setupSDK] Error 2

Version-Release number of selected component (if applicable):
tog-pegasus-2.12.1-16.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install tog-pegasus, tog-pegasus-devel, and related packages
2. cd /usr/share/Pegasus/samples
3. make setupSDK

Actual results:
Error complaining that CIM_AbstractComponent can't be found

Expected results:
Providers should be able to compile out of the box

Additional info:

Comment 2 Vitezslav Crhonek 2014-08-07 12:08:50 UTC
Seems to be caused by two facts - we ship and use newer schema than was originally packed in tog-pegasus's tarball (because the old one is missing some classes needed by OpenLMI providers) and default interop namespace has been changed to root/interop instead of original root/PG_InterOp (e.g. because of compatibility with SFCB CIMOM).

Until it's fixed, you can workaround the issue:

1. copy CIM_AbstractComponent.mof shipped in cim-schema package to the sample providers:
# cp /usr/share/mof/cimv2.33.0/Core/CIM_AbstractComponent.mof /usr/share/Pegasus/samples/Providers/Load/CIM233/DMTF/Core/

2. patch /usr/share/Pegasus/samples/Providers/Load/Makefile and
/usr/share/Pegasus/samples/Providers/Load/SDK_CIM_Schema.mof
with attached patch (registers missing class, enables registering experimental classes and changes interop)

Hope this helps, then it should work as expected.

Comment 3 Vitezslav Crhonek 2014-08-07 12:10:32 UTC
Created attachment 924892 [details]
workaround patch

Comment 4 Sean Stewart 2014-08-07 15:20:31 UTC
Thanks for the quick response.

I patched the file and am still getting an error:
Could not open include file DMTF/Core/CIM_AbstractComponent.mof

What package is supposed to install this file?  I think I've installed everything I can think of and it still seems to be missing.

Comment 5 Sean Stewart 2014-08-07 15:24:13 UTC
Oops, it helps if I read the entire comment. :)

Thanks again!

Comment 11 Alois Mahdal 2015-09-24 02:12:02 UTC
Scheduled automated test: TJ#1092255

Comment 12 Alois Mahdal 2015-09-24 04:01:51 UTC
Works on all except ppc64le, where it complains:

    mak/config.mak:84: *** PEGASUS_PLATFORM environment variable undefined. Please set to one of the following:  LINUX_PPC_E500_GNU   LINUX_ZSERIES_GNU   LINUX_GNU   LINUX_SH4_GNU   LINUX_IX86_GNU   LINUX_X86_64_CLANG   LINUX_IX86_CLANG   LINUX_PPC64_GNU   LINUX_AARCH64_GNU   LINUX_IA64_GNU   LINUX_PPC_GNU   LINUX_ZSERIES64_GNU   LINUX_X86_64_GNU  .  Stop.

Should it even work out-of-the-box?  If so, should this be reassigned or logged as separate bug?  Or it's matter of documentation?

Comment 13 Vitezslav Crhonek 2015-09-24 11:22:57 UTC
Please file it as a new bug. It probably never worked on ppc64le and its support needs to be added.

Comment 14 Alois Mahdal 2015-09-24 20:33:51 UTC
Thank you for explanation; the issue is now filed as bug 1266235.

As I said, the rest of archs is OK so the original problem is fixed.

Comment 15 errata-xmlrpc 2015-11-19 11:08:36 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-2314.html

Comment 16 Alois Mahdal 2016-01-21 23:25:57 UTC
Missing 'Fixed In Version' value added based on Erratum.