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

[BUG] Slack engine stopped working on September 28 #62812

Closed
gediminasz opened this issue Oct 5, 2022 · 2 comments · Fixed by #62957
Closed

[BUG] Slack engine stopped working on September 28 #62812

gediminasz opened this issue Oct 5, 2022 · 2 comments · Fixed by #62957
Labels
Bug broken, incorrect, or confusing behavior slack All salt stuff for slack Sulfur v3006.0 release code name and version

Comments

@gediminasz
Copy link
Contributor

gediminasz commented Oct 5, 2022

Description

Slack engine is no longer working. The following error is observed in Salt master logs:

2022-10-05 08:44:20,821 [slackclient.client:143 ][WARNING ][253055] Failed RTM connect
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/slackclient/client.py", line 140, in rtm_connect
    self.server.rtm_connect(use_rtm_start=with_team_state, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/slackclient/server.py", line 166, in rtm_connect
    self.parse_slack_login_data(login_data, use_rtm_start)
  File "/usr/local/lib/python3.6/dist-packages/slackclient/server.py", line 177, in parse_slack_login_data
    self.parse_channel_data(login_data["channels"])
KeyError: 'channels'

Possibly related: https://api.slack.com/changelog/2021-10-rtm-start-to-stop

Beginning September 27, 2022, rtm.start's current response will completely retire. To help most apps transition seamlessly, we will replace the response of rtm.start with that of its replacement, rtm.connect.

Setup

Set up Slack engine as described in docs: https://docs.saltproject.io/en/latest/ref/engines/all/salt.engines.slack.html

Example master config:

engines:
  - slack:
      token: 'XXXXXXXXXXXX'
      control: True
      fire_all: False
      groups:
        default:
          users:
            - '*'
          commands:
            - '*'

Steps to Reproduce the behavior

In Slack write !test.ping target=some-minion but nothing happens, bot does not respond.

Also tail /var/log/salt/master to observe the error mentioned above.

Expected behavior

Salt commands issued via Slack should be executed.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3004.2

Dependency Versions:
          cffi: 1.14.0
      cherrypy: unknown
      dateutil: 2.6.1
     docker-py: 5.0.0
         gitdb: 2.0.3
     gitpython: 2.1.8
        Jinja2: 2.10
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: 2.6.1
  pycryptodome: 3.4.7
        pygit2: Not Installed
        Python: 3.6.9 (default, Jun 29 2022, 11:45:57)
  python-gnupg: 0.4.1
        PyYAML: 3.12
         PyZMQ: 17.1.2
         smmap: 2.0.3
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.5

System Versions:
          dist: ubuntu 18.04 Bionic Beaver
        locale: UTF-8
       machine: x86_64
       release: 4.15.0-191-generic
        system: Linux
       version: Ubuntu 18.04 Bionic Beaver

Additional context

Perhaps Slack engine is deprecated and no longer maintained? For example, after each Salt version upgrade we still need to apply this manual workaround: #59612 (comment).

@gediminasz gediminasz added Bug broken, incorrect, or confusing behavior needs-triage labels Oct 5, 2022
@OrangeDog
Copy link
Contributor

we still need to apply this manual workaround

That change was released in 3004. Manual patching should not have been necessary since then.

@OrangeDog OrangeDog added the slack All salt stuff for slack label Oct 5, 2022
@gediminasz
Copy link
Contributor Author

gediminasz commented Oct 5, 2022

we still need to apply this manual workaround

That change was released in 3004. Manual patching should not have been necessary since then.

It's been a while and I would have to check again (maybe the next time I upgrade), but I'm fairly certain that workaround is in fact still required. It has also been mentioned in this comment: #59612 (comment)

Nevertheless, that question is probably out of scope of this particular issue, sorry for going offtopic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior slack All salt stuff for slack Sulfur v3006.0 release code name and version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants