Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action alias doesn't respond with execution content #3661

Closed
bartwalczak1 opened this issue Aug 9, 2017 · 3 comments
Closed

action alias doesn't respond with execution content #3661

bartwalczak1 opened this issue Aug 9, 2017 · 3 comments

Comments

@bartwalczak1
Copy link

bartwalczak1 commented Aug 9, 2017

Hi Folks,

I came across an issue today, while working on action aliases for aws. I took sample action alias from aws pack (ec2_get_all_instances.yaml):

---
name: "ec2_get_all_instances"
pack: "aws"
description: "get all instances"
action_ref: "aws.ec2_get_all_instances"
formats:
  - "aws ec2 get"
ack:
  enabled: true
  append_url: false
  format: "ack"
result:
  extra:
    slack:
      color: "#00ad52" # aka Slack 'good'
      footer: "AWS Pack"
  format: |
    {% if execution.status == 'succeeded' %}
    {% for line in execution.result.result %}
       {% for ec2 in line -%}
       {{ ec2.id }}  - {{ ec2.state }} -- {{ ec2.tags.Name }} -- {{ ec2.ip_address }}
       {% endfor %}
    {% endfor %}
    {% else %}
    Error: {{execution.result.stdout}}{~}See {{execution.id}} for more details.
    {% endif %}

Only changed ack enabled to true and added format to it. Had to make those changes as I was seeing an error: ERROR: 'ActionAliasExecution' object has no attribute 'message'

Next tried to execute with following result:

st2 action-alias execute "aws ec2 get"
Started execution, id '598b23e7f1509608cca9cf77'
ack

I would normally see instance id followed by state etc? or at least an error? It worked for me when I was testing hubot, but I don't think it has anything to do with the actual bot?

Please help! Thanks :)

@bartwalczak1
Copy link
Author

issue explained to @armab on st2 Slack channel. Gonna try on fresh instance just to confirm.

@bartwalczak1
Copy link
Author

@armab identified 2 issues:
2 problems from your messages:

  enabled: false

doesn't silence ack message (bug)

  1. Actual message is not posted in chat room (probably some kind of misconfiguration here)
    For 2, try https://docs.stackstorm.com/troubleshooting/basic_chatops_troubleshooting.html this for debugging. Also check st2 and chatops logs for any errors.

For 2) issue seems to be happening only with errbot. Message is posted to chat room when using hubot

@arm4b
Copy link
Member

arm4b commented Aug 10, 2017

This seems to be figured out in #community.
2) worked in Hubot after some https://docs.stackstorm.com/troubleshooting/basic_chatops_troubleshooting.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants