StackStorm / StackStorm/st2

st2ctl says it is ignoring content in a directory, but then warns of bad content in that directory

Open
#3,529 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

While running through the README for the sensu pack, I encountered the following WARNING message that confused me:

FYI, packs_base_path = /opt/stackstorm/packs.dev

(sensu) root@2e1d15fd5d07:/etc/sensu/handlers# st2ctl reload --register-all
Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-06-29 05:15:57,631 INFO [-] Connecting to database "st2" @ "mongo:27017" as user "None".
2017-06-29 05:15:57,765 INFO [-] =========================================================
2017-06-29 05:15:57,766 INFO [-] ############## Registering triggers #####################
2017-06-29 05:15:57,766 INFO [-] =========================================================
2017-06-29 05:16:07,033 WARNING [-] Pack "sensu" already found in "/opt/stackstorm/packs", ignoring content from "/opt/stackstorm/packs.dev"
2017-06-29 05:16:07,080 WARNING [-] Failed to register sensors: Failed to register trigger "/opt/stackstorm/packs.dev/stackstorm-sensu/triggers/event_handler.yaml" from pack "stackstorm-sensu": Model is in pack "stackstorm-sensu" but field "pack" is different: sensu
...
ValueError: Failed to register trigger "/opt/stackstorm/packs.dev/stackstorm-sensu/triggers/event_handler.yaml" from pack "stackstorm-sensu": Model is in pack "stackstorm-sensu" but field "pack" is different: sensu

I'll dig into this when I get a chance, unless someone has a ready explanation for this behavior.

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 with the sensu pack README steps and the st2ctl reload --register-all entry point, then trace how the duplicate pack paths are handled during registration. Done means the command's ignore behavior and subsequent registration warning are consistent and the reported scenario is covered by an appropriate test or documented explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.