[osiris] Re: mod_ports and filtering irrelevancies
David Vasil
dmvasil at ornl.gov
Fri Jul 28 10:19:08 EDT 2006
Rob Munsch wrote:
> I meant, of course, ignoring inodes... not ignoring mod_ports. After
> looking at mod_ports a few dozen times my mental needle started
> skipping, i think...
>
> If ignoring inodes worked, i could stick with email alerting, as i've it
> set to do nothing with no detected changes. Has anyone hacked their way
> through this, or have any suggestions on where to start?
I have good news and bad news. Which do you want first?
Ok, the good news:
I spent the better part of this morning going through and adding in
craploads of debugging to the mod_ports.c, configuration.c and osirisd.c
source.
Initial debug statements in mod_ports.c showed that
"osi_bool inode_is_filtered( SCANNER *scanner )" *always* returned FALSE
no matter what variation of the config I tried. So I dug in further to
module parameters.
So here is what I know of module parameters so far. Module parameters
must be defined *after* a module is enabled, on a separate line from
"Include mod_ports" line. The reason why a config check passed for
"Include mod_ports param ignoreinode" is because configuration.c ignores
values given after the module name if it is part of a System|Module block.
Now we have something like this:
<Modules>
Include mod_ports
param mod_ports ignoreinode
</Modules>
But as we have seen before, this doesnt work as it returns a config
check error for the param line.
The root of the problem with getting ignoreinodes to work is this
function in src/libosiris/configuration.c:
osi_bool verify_param_values( string_list *modules, char *line )
This function expects there to be *at least* 3 values following a param
keyword. If 3 values do not follow the param keyword it returns FALSE
to the config check function.
So more good news... to get your ignoreinode working you should require
no code change, you just need to add another value to the param keyword
list. mod_ports.c gracefully ignores this extra keyword as far as I can
tell. In my tests, something like this works out great:
<Modules>
Include mod_ports
param mod_ports ignoreinode TRUE
</Modules>
In the long term, it may be a good idea to have verify_param_values()
actually verify the param values in a more graceful way.
The only bad news I had was making you read this overly explained email.
Anyhow, let me know if doing the param like that works for you.
--
| David Vasil <dmvasil at ornl.gov>
| Oak Ridge National Laboratory NCCS Division
| High Performance Computing Systems Administrator
More information about the osiris
mailing list