StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
6.04k stars 746 forks source link

st2 ha: packs/register command doesn't execute sensors reload on every node #5083

Open engineer-roman opened 3 years ago

engineer-roman commented 3 years ago

SUMMARY

I have HA installation of Stackstorm with three nodes and pipeline which deploys my packs over all the nodes. Same pipeline executes API call POST -> /api/v1/packs/register with all the packs and as far as I understand, this command causes sensors reloading. But this is not what happens all the time - sometimes sensor might be reloaded on some node and sometimes not. This leads to cases when:

Such behavior leads to completely upredictable behavior of your workflow based on sensors and actions.

STACKSTORM VERSION

st2 3.3.0, on Python 3.6.9

OS, environment, install method

VM, Ubuntu 18.04, custom install.

Steps to reproduce the problem

Expected Results

Single API call POST -> /api/v1/packs/register causes sensors reloading on every node in HA installation.

Actual Results

Sometimes one or two nodes continue running sensors (i can see it by updated log messages in sensor's code) with old code and logs of st2sensorcontainer doesn't contain anything about reloading

engineer-roman commented 3 years ago

I just realized it might be expected behavior since (if I understood it right) every node doesn't know about other nodes. Am i right? Issue is still actual but it would make whole case a bit more clear.