[From nobody Thu May 29 07:31:17 2014 From: "=?utf-8?b?VG9tw6HFoSBCxb5hdGVr?=" <reviewboard@gallagherhome.com> Precedence: list MIME-Version: 1.0 To: =?utf-8?b?VG9tw6HFoSBCxb5hdGVr?= <tbzatek@redhat.com>, Michal Minar <miminar@redhat.com>, OpenLMI Developers <openlmi-reviews@lists.fedorahosted.org> References: <20140523071747.379786.28899@ex-std-node115.prod.rhcloud.com> In-Reply-To: <20140523071747.379786.28899@ex-std-node115.prod.rhcloud.com> Date: Fri, 23 May 2014 14:48:10 -0000 Reply-To: =?utf-8?b?VG9tw6HFoSBCxb5hdGVr?= <tbzatek@redhat.com>, openlmi-reviews@lists.fedorahosted.org Message-ID: <20140523144810.379786.18286@ex-std-node115.prod.rhcloud.com> Content-Type: multipart/alternative; boundary="===============2132394056882941943==" Subject: Re: Review Request 1760: journald: Expose UID, GID, PID and syslog facility/severity fields Message: 30 --===============2132394056882941943== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > On May 23, 2014, 7:18 a.m., Michal Minar wrote: > > mof/60_LMI_Journald.mof, lines 228-242 > > <http://reviewboard-openlmi.rhcloud.com/r/1760/diff/1/?file=9986#file9986line228> > > > > Having 2 IDs signed and one unsigned looks weird. If I take a look at CIM schema, UserID and GroupID properties are strings but there's also CIM_UnixProcess with RealUserID and RealGroupID. They are uint64 properties. > > > > IMHO in this case there's no harm in sticking to CIM convention. Hmm, right, good idea. I'm tempted to use String to stay consistent but it's really odd. Besides, numbers allow easier range filtering in WQL/CQL and type conversion is easy in Python/lmishell. Anyway, changed to uint64. > On May 23, 2014, 7:18 a.m., Michal Minar wrote: > > mof/60_LMI_Journald.mof, lines 250-253 > > <http://reviewboard-openlmi.rhcloud.com/r/1760/diff/1/?file=9986#file9986line250> > > > > I don't know much about logging facilities, but is this information always known? I'm missing something like "unknown" in possible values. If the journal item field is unknown or missing, the property is simply not set. I've added more conditions to ensure values are in the range. - Tomáš ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/1760/#review2670 ----------------------------------------------------------- On May 23, 2014, 2:47 p.m., Tomáš Bžatek wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviewboard-openlmi.rhcloud.com/r/1760/ > ----------------------------------------------------------- > > (Updated May 23, 2014, 2:47 p.m.) > > > Review request for OpenLMI Developers. > > > Repository: openlmi-providers > > > Description > ------- > > This is useful e.g. for indication filtering. > > > Diffs > ----- > > mof/60_LMI_Journald.mof 938b3d282029d7b8c91d6ccc03efab150a79c22d > src/journald/instutil.c b3987bccf2b4a641e384ef96f3de260c58a5ac44 > > Diff: http://reviewboard-openlmi.rhcloud.com/r/1760/diff/ > > > Testing > ------- > > > Thanks, > > Tomáš Bžatek > > --===============2132394056882941943== MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit <html> <body> <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;"> <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> <tr> <td> This is an automatically generated e-mail. To reply, visit: <a href="http://reviewboard-openlmi.rhcloud.com/r/1760/">http://reviewboard-openlmi.rhcloud.com/r/1760/</a> </td> </tr> </table> <br /> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;"> <p style="margin-top: 0;">On May 23rd, 2014, 7:18 a.m. UTC, <b>Michal Minar</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;"> <table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;"> <thead> <tr> <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;"> <a href="http://reviewboard-openlmi.rhcloud.com/r/1760/diff/1/?file=9986#file9986line228" style="color: black; font-weight: bold; text-decoration: underline;">mof/60_LMI_Journald.mof</a> <span style="font-weight: normal;"> (Diff revision 1) </span> </th> </tr> </thead> <tbody> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">228</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> [ Implemented(true), Description (</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">229</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;Denotes numerical effective user ID of the process that sent the &quot;</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">230</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;message. This ID is system specific and usually maps to a local &quot;</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">231</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;POSIX account.&quot; ) ]</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">232</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> sint32 UserID;</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">233</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">234</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> [ Implemented(true), Description (</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">235</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;Denotes numerical effective group ID of the process that sent the &quot;</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">236</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;message. This ID is system specific and usually maps to a local &quot;</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">237</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;POSIX account.&quot; ) ]</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">238</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> sint32 GroupID;</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">239</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">240</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> [ Implemented(true), Description (</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">241</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;Denotes numerical ID of the process that sent the message.&quot; ) ]</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">242</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> uint32 ProcessID;</pre></td> </tr> </tbody> </table> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Having 2 IDs signed and one unsigned looks weird. If I take a look at CIM schema, UserID and GroupID properties are strings but there's also CIM_UnixProcess with RealUserID and RealGroupID. They are uint64 properties.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">IMHO in this case there's no harm in sticking to CIM convention.</p></pre> </blockquote> </blockquote> <pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Hmm, right, good idea. I'm tempted to use String to stay consistent but it's really odd. Besides, numbers allow easier range filtering in WQL/CQL and type conversion is easy in Python/lmishell. Anyway, changed to uint64.</p></pre> <br /> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;"> <p style="margin-top: 0;">On May 23rd, 2014, 7:18 a.m. UTC, <b>Michal Minar</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;"> <table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;"> <thead> <tr> <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;"> <a href="http://reviewboard-openlmi.rhcloud.com/r/1760/diff/1/?file=9986#file9986line250" style="color: black; font-weight: bold; text-decoration: underline;">mof/60_LMI_Journald.mof</a> <span style="font-weight: normal;"> (Diff revision 1) </span> </th> </tr> </thead> <tbody> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">250</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> Values { &quot;kern&quot;, &quot;user&quot;, &quot;mail&quot;, &quot;daemon&quot;, &quot;auth&quot;, &quot;syslog&quot;, &quot;lpr&quot;,</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">251</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;news&quot;, &quot;uucp&quot;, &quot;clock&quot;, &quot;authpriv&quot;, &quot;ftp&quot;, &quot;ntp&quot;, &quot;audit&quot;,</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">252</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;alert&quot;, &quot;cron&quot;, &quot;local0&quot;, &quot;local1&quot;, &quot;local2&quot;, &quot;local3&quot;,</pre></td> </tr> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">253</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> &quot;local4&quot;, &quot;local5&quot;, &quot;local6&quot;, &quot;local7&quot; } ]</pre></td> </tr> </tbody> </table> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">I don't know much about logging facilities, but is this information always known? I'm missing something like "unknown" in possible values.</p></pre> </blockquote> </blockquote> <pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">If the journal item field is unknown or missing, the property is simply not set. I've added more conditions to ensure values are in the range.</p></pre> <br /> <p>- Tomáš</p> <br /> <p>On May 23rd, 2014, 2:47 p.m. UTC, Tomáš Bžatek wrote:</p> <table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> <tr> <td> <div>Review request for OpenLMI Developers.</div> <div>By Tomáš Bžatek.</div> <p style="color: grey;"><i>Updated May 23, 2014, 2:47 p.m.</i></p> <div style="margin-top: 1.5em;"> <b style="color: #575012; font-size: 10pt;">Repository: </b> openlmi-providers </div> <h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0"> <tr> <td> <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">This is useful e.g. for indication filtering.</p></pre> </td> </tr> </table> <h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1> <ul style="margin-left: 3em; padding-left: 0;"> <li>mof/60_LMI_Journald.mof <span style="color: grey">(938b3d282029d7b8c91d6ccc03efab150a79c22d)</span></li> <li>src/journald/instutil.c <span style="color: grey">(b3987bccf2b4a641e384ef96f3de260c58a5ac44)</span></li> </ul> <p><a href="http://reviewboard-openlmi.rhcloud.com/r/1760/diff/" style="margin-left: 3em;">View Diff</a></p> </td> </tr> </table> </div> </body> </html> --===============2132394056882941943==-- ]