<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I'd like to propose a simple change to naming our mof files to make
their installation more reliable. There is a small shortcoming in
sfcb mof registration scripts. They are parsed only once sorted by
their name. If there occurs one class/instance or any other object
in this compilation process, that does not have some of its
dependencies (like parent class or property qualifier) already
compiled, the compilation stops.<br>
<br>
Consider the following example:<br>
<ul>
<li><font face="Courier New, Courier, monospace">LMI_Qualifiers.mof</font>
- defines <font face="Courier New, Courier, monospace">Implemented</font>
qualifier used by mof files of at least storage and software
profiles.</li>
</ul>
<ul>
<li><font face="Courier New, Courier, monospace">LMI_Jobs.mof</font>
- defines base classes for asynchronous job management supposed
to be inherited by other classes of particular profile. It uses
<font face="Courier New, Courier, monospace">Implemented</font>
qualifier. Therefore it depends on <font face="Courier New,
Courier, monospace">LMI_Qualifiers.mof.</font></li>
<li><font face="Courier New, Courier, monospace">LMI_Software.mof<font
face="sans-serif"> - the one and only mof file of software
profile.</font></font> Also uses <font face="Courier New,
Courier, monospace">Implemented</font> qualifier and moreover
it inherits some classes from <font face="Courier New, Courier,
monospace">LMI_Jobs.mof</font>.</li>
<ul>
<li>Therefore it depends on both <font face="Courier New,
Courier, monospace">LMI_Qualifiers.mof</font> and <font
face="Courier New, Courier, monospace">LMI_Jobs.mof</font>.</li>
</ul>
</ul>
<p>If we sort these mof files by name we get: <font face="Courier
New, Courier, monospace">LMI_Jobs.mof, </font><font
face="Courier New, Courier, monospace">LMI_Software.mof, </font><font
face="Courier New, Courier, monospace">LMI_Qualifiers.mof.<br>
<font face="sans-serif">Upon invocation of</font><br>
$ sfcbrepos -f<br>
<font face="sans-serif">We get a lot of errors like this one:</font><br>
error in
/var/lib/sfcb/stage/mofs/root/cimv2/LMI_Software.mof line 106
near true: Implemented is not a known qualifier<br>
<br>
<font face="sans-serif">Because Implemented would come as last -
a lot later, than it is needed. If <font face="Courier New,
Courier, monospace">LMI_Software.mof</font> had a name <font
face="Courier New, Courier, monospace">LMI_Applications.mof</font>
instead, it would miss definitions from two files and so on.</font><br>
</font></p>
<p><font face="Courier New, Courier, monospace"><font
face="sans-serif"><b>Note</b> that this is only problem of
sfcb cimom, pegasus is smarter.<br>
</font></font></p>
<p><font face="Courier New, Courier, monospace"><font
face="sans-serif">I searched for a way to avoid this and found
out, that even sfcb's own mof files located in<br>
<font face="Courier New, Courier, monospace">/var/lib/sfcb/stage/mofs/root/interop<br>
</font>are named with pattern <b><font face="Courier New,
Courier, monospace">NN_name.mof</font></b>, where <b>NN</b>
are digits ensuring corrent order of files upon<br>
compilation.<br>
</font></font></p>
<p><font face="Courier New, Courier, monospace"><font
face="sans-serif">I guess, that we will share more common
definitions across our providers in the near future. So I
think, that it would be desirable to establish a convention
for naming mof files, that would ensure their correct
installation in "not so smart" cimoms. And we should do it
soon.<br>
</font></font></p>
<p><font face="Courier New, Courier, monospace"><font
face="sans-serif">My proposal is: let's do it like sfcb:<br>
<font face="Courier New, Courier, monospace"><b>NN_LMI_ProfileName.mof<br>
</b></font></font></font></p>
<p>And let's also specify some advisable numbers. For example:<br>
</p>
<ul>
<li>05 - 10 - qualifiers and other simple mofs without any
dependencies on LMI or anything outside of cim-schema
(05_LMI_Qualifiers.mof). These will be shipped with
openlmi-providers.</li>
<li>20 - 40 - mofs with base classes for our providers (30_LMI_Jobs.mof).
Also shipped with openlmi-providers.</li>
<li><font face="Courier New, Courier, monospace"><font
face="sans-serif"><font face="Courier New, Courier,
monospace"><font face="sans-serif">50 - 80 - mofs of our
profiles shipped in their own package (60_LMI_Software.mof).</font></font></font></font></li>
</ul>
<p>This is a request for comments. Please share your own ideas on
how to solve this issue.<br>
</p>
<p>Michal Minar<br>
</p>
</body>
</html>