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.08k stars 747 forks source link

cannot import name strip_last_newline_char #1994

Closed DoriftoShoes closed 9 years ago

DoriftoShoes commented 9 years ago

Reported by community user. packs.reload failed with the following error:

"traceback": " File \"/usr/lib/python2.7/dist-packages/st2actions/worker.py\", line 106, in _run_action\n result = self.container.dispatch(liveaction_db)\n File \"/usr/lib/python2.7/dist-packages/st2actions/container/base.py\", line 55, in dispatch\n runner = get_runner(runnertype_db.runner_module)\n File \"/usr/lib/python2.7/dist-packages/st2actions/runners/init.py\", line 50, in get_runner\n raise ActionRunnerCreateError(e)\n", "error": "cannot import name strip_last_newline_char”

lattwood commented 9 years ago

Community user reporting in.

Here's my /usr/lib/python2.7/dist-packages/st2common/util/misc.py

https://gist.github.com/lattwood/24de666b15e39dffff17

manasdk commented 9 years ago

Running st2ctl restart fixed the issue. The odd part is that st2actionrunners were running new code but the referenced method from st2common was missing i.e. still old code. This should not really happen but it oddly did - how could we end up in this situation where st2action module is updated but st2common is not?

lattwood commented 9 years ago

It was updated @manasdk. I believe st2ctl restart wasn't issued during the setup wizard in the web gui after the stackstorm packages were updated.

Start-Date: 2015-09-15  21:21:12
Commandline: /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install st2common=0.13.2-5
Upgrade: st2common:amd64 (0.13.1-4, 0.13.2-5)
End-Date: 2015-09-15  21:21:13
Start-Date: 2015-09-15  21:21:25
Commandline: /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install python-st2client=0.13.2.5-1
Upgrade: python-st2client:amd64 (0.13.1.4-1, 0.13.2.5-1)
End-Date: 2015-09-15  21:21:25
lakshmi-kannan commented 9 years ago

Closing. If this happens again, please re-open. I believe this has been fixed in recent installer versions.