Juha Heinanen writes:
> any idea why trying to load mod_py breaks sems startup?
i converted DBGs to INFOs in DSMFactory::preloadModules and
DSMChartReader::importModule and added some infos. that produced to
syslog:
Sep 17 16:01:14 lohi sems[14949]: [#7f39c1316740] [preloadModules, DSM.cpp:878]
INFO: preloading 'mod_py'...
Sep 17 16:01:14 lohi sems[14949]: [#7f39c1316740] [importModule,
DSMChartReader.cpp:257] INFO: loaded module 'mod_py' from
'/usr/lib/sems/dsm/mod_py.so'
Sep 17 16:01:14 lohi sems[14949]: [#7f39c1316740] [preloadModules, DSM.cpp:884]
INFO: checking last_loaded
Sep 17 16:01:14 lohi sems[14949]: [#7f39c1316740] [preloadModules, DSM.cpp:886]
INFO: checking last_loaded->preload
the only explanation that i can come up with is that
last_loaded->preload() never returns.
-- juha
int DSMFactory::preloadModules(AmConfigReader& cfg, string& res, const string&
ModPath) {
string preload_mods = cfg.getParameter("preload_mods");
vector<string> preload_names = explode(preload_mods, ",");
if (preload_names.size()) {
for (vector<string>::iterator it=
preload_names.begin(); it != preload_names.end(); it++) {
INFO("preloading '%s'...\n", it->c_str());
if (!preload_reader.importModule("import("+*it+")", ModPath)) {
res = "importing module '"+*it+"' for preload\n";
return -1;
}
DSMModule* last_loaded = preload_reader.mods.back();
INFO("checking last_loaded\n");
if (last_loaded) {
INFO("checking last_loaded->preload\n");
if (last_loaded->preload()) {
INFO("check passed\n");
res = "Error while preloading '"+*it+"'\n";
return -1;
}
INFO("check failed\n");
}
INFO("next module if any\n");
}
}
INFO("done with preloading modules\n");
return 0;
}
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems