[dev.icinga.com #2569] add nebmodule version / name check for idomod within core, set module info in idomod, deny to load old idomod.o #955
Comments
Updated by mfriedrich on 2012-04-30 14:40:49 +00:00 for testing, i've set IDO_VERSION to 1.7.0-foo and installed that.
so this allows implicit version dependencies for the future, as we keep idomod updated with that version info. for the old module with 1.6.x which does not export the version explicitely, we will deny to load 'idomod.o' for now. |
Updated by mfriedrich on 2012-04-30 14:47:27 +00:00
|
Updated by mfriedrich on 2012-04-30 14:53:32 +00:00
|
Updated by mfriedrich on 2012-04-30 16:05:30 +00:00
|
Updated by Tommi on 2012-05-03 19:54:50 +00:00 looks good.
But i think we need also a check if the version supplied by idomod is the same as ido2db. This (more exact:the datastructures) must match. Maybe a feature for the next release. |
Updated by mfriedrich on 2012-05-05 10:03:22 +00:00
dunno how that could be checkable - unless you change the initial handshake marker where it already exposes and checkes the api version. so you might add a feature request to the idoutils section then. the initial check works for me - with the slight adaption of unloading idomod.o after it has been loaded - otherwise the called unload neb module functionality could cause regression. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2569
Created by mfriedrich on 2012-04-30 14:09:42 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2012-05-05 10:03:22 +00:00)
Target Version: 1.7
Last Update: 2012-05-05 10:03:22 +00:00 (in Redmine)
as shown in helloworld.c the nebmodule_init function should call neb_set_module_info in order to populate the info array with some more specifics on the module.
the core does not do anything with that currently. since the recent changes with idomod.o transition to idomod.so such an information would be pretty awesome to be checked. furthermore, it will allow required versions to be set, meaning to allow a forced unload if not matching.
within nebmodule_init in idomod.c being set, this information can be fetched after dlopen as well as dlsym fetched the function pointer to the init function of the neb module - plus a call onto it. after that the validation information is shared in memory and can be accessed for further (version) comparison.
Changesets
2012-04-30 14:58:11 +00:00 by mfriedrich 732cf30
2012-05-03 09:35:33 +00:00 by mfriedrich bf4d0f8
Relations:
The text was updated successfully, but these errors were encountered: