Sensor disable on failure, config settings
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Additional config settings
- SENSOR_MAX_RESPAWN_COUNTS - should allow for infinite using -1
- SENSOR_SUCCESSFUL_START_THRESHOLD
- SENSOR_RESPAWN_DELAY
- PROCESS_EXIT_TIMEOUT
Disable sensor on failure.
Currently when the parent sensor process fails to restart a failing sensor it quietly stops trying after 2 tries. The parent process continues along without marking the child sensor as disabled or failed.
A simple solution is to disable the sensor on failure as this would give the users a way to enable and restart it.
Currently the only way to restart a single failed sensor is to restart the sensor parent service.
As a workaround for now I am creating a systemd script for each sensor in single-sensor mode and scheduling them in the OS. this way i can restart individual sensors on failure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at st2reactor/st2reactor/container/process_container.py around line 60 and trace how sensor respawn failures and the listed process settings are handled. Done means the requested settings are configurable, failed sensors are marked disabled or failed, and users can restart an individual sensor without restarting the parent service.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100