-
Notifications
You must be signed in to change notification settings - Fork 310
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomponent: core
Milestone
Description
intelmqctl check checks if all bots have their executables in $PATH so they can be started:
intelmq/intelmq/bin/intelmqctl.py
Lines 958 to 963 in 9bfe9bf
| for group in utils.list_all_bots().values(): | |
| for bot_id, bot in group.items(): | |
| if subprocess.call(['which', bot['module']], stdout=subprocess.DEVNULL, | |
| stderr=subprocess.DEVNULL): | |
| check_logger.error('Incomplete installation: Executable %r for %r not found in $PATH (%r).', | |
| bot['module'], bot_id, os.getenv('PATH')) |
The list of bots is generated by
Lines 915 to 919 in 9bfe9bf
| bots[module_name.split('.')[2].capitalize()[:-1]][name] = { | |
| "module": mod.__name__, | |
| "description": "Missing description" if not getattr(mod.BOT, '__doc__', None) else textwrap.dedent(mod.BOT.__doc__).strip(), | |
| "parameters": keys, | |
| } |
The module used here is not the entry point/executable, but the module that's behind the entry point.
For example, if the extension bot is packaged as mybots.bots.experts.example and the entrypoint and executable is intelmq.bots.experts.example, then the check searches for the executable mybots.bots.experts.example instead of intelmq.bots.experts.example.
I think "module": bot.name would be correct.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomponent: core