StackStorm / StackStorm/st2

"unknown file" reported as module when exceptions raised by sensor

Open
#5,061 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

Error messages generated by sensor result in "unknown file" instead of module names on python 3 systems, e.g.

2020-10-15 08:22:43,653 139699041297216 ERROR (unknown file) [-] File "/opt/stackstorm/packs/openstack/sensors/messaging_sensor.py", line 52, in poll

STACKSTORM VERSION

3.3dev and 3.2.0

OS, environment, install method

Ubuntu 18.04, Single node install from ansible.

Steps to reproduce the problem

One easy way to get an exception from sensor:

  1. Install StackStorm
  2. Install OpenStack pack - but don't configure it's config file
  3. The openstack sensor will raise an exception as it can't locate the OS parametrs.
  4. Examine the /var/log/st2/st2sensorcontainer.log

Expected Results

Log the exception message in the test should not report "unknown file" for module.

Actual Results

"unknown file" is reported on the ERROR lines, eg


2020-10-15 08:22:43,653 139699041297216 ERROR (unknown file) [-] File "/opt/stackstorm/packs/openstack/sensors/messaging_sensor.py", line 52, in poll

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the OpenStack pack sensor and an unconfigured config file, then inspect the sensor exception logging path that produces st2sensorcontainer.log. Compare the reported Python 3 output with the expected module name and verify that the error line no longer says "unknown file".

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.