StackStorm / StackStorm/st2

Sensor disable on failure, config settings

Open
#5,033 11 comments 0 reactions 0 assignees View on GitHub

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

https://github.com/StackStorm/st2/blob/0e83fc5de7923aae7e4690d2cbb6b531c18143e5/st2reactor/st2reactor/container/process_container.py#L60

  1. SENSOR_MAX_RESPAWN_COUNTS - should allow for infinite using -1
  2. SENSOR_SUCCESSFUL_START_THRESHOLD
  3. SENSOR_RESPAWN_DELAY
  4. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.