Skip to content

[2016.3.0] Slack engine fails when directory contains deleted users #33618

Closed

Description

@toabi

Description of Issue/Question

Slack API does not return 'is_bot' key for deleted users. This leads to an KeyError. I guess it's the same error which was fixed in this other projects commit: django-slackin: fix 'is_bot' KeyError.

Setup

Have a slack engine configured in the master settings.

Steps to Reproduce Issue

Start the salt master with the new engine configuration

2016-05-30 11:00:36,336 [salt.utils.process][INFO    ][9598] Process <class 'salt.engines.Engine'> (10829) died with exit status None, restarting...  
2016-05-30 11:00:38,061 [salt.engines     ][CRITICAL][10830] Engine <salt.loader.LazyLoader object at 0x7fc42bad7790> could not be started! Error: 'is_bot'  

Versions Report

Salt Version:

       Salt: 2016.3.0

Dependency Versions:

       cffi: 0.8.6
   cherrypy: Not Installed
   dateutil: 2.2
      gitdb: 0.5.4
  gitpython: 0.3.2 RC1
      ioflo: Not Installed
     Jinja2: 2.7.3
    libgit2: Not Installed
    libnacl: Not Installed
   M2Crypto: Not Installed
       Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: 1.2.3
  pycparser: 2.10
   pycrypto: 2.6.1
     pygit2: Not Installed
     Python: 2.7.9 (default, Mar  1 2015, 12:57:24)
python-gnupg: Not Installed
     PyYAML: 3.11
      PyZMQ: 14.4.0
       RAET: Not Installed
      smmap: 0.8.2
    timelib: Not Installed
    Tornado: 4.2.1
        ZMQ: 4.0.5

System Versions:

       dist: debian 8.4 
    machine: x86_64
    release: 3.16.0-4-amd64
     system: Linux
    version: debian 8.4 

Activity

  1. Ch3LL commented on May 31, 2016

    @Ch3LL
    Contributor

    @toabi looks like we could possibly add some logic to detect deleted users and use the .get method instead so we don't get this key error. Thanks

  2. added
    bug
    P4
    severity-medium
    RIoT
    on May 31, 2016
  3. added this to the Approved milestone on May 31, 2016
  4. mchugh19 commented on Jun 3, 2016

    @mchugh19
    Contributor

    This was corrected as part of recent pr #33601. Currently it is in develop so you can update from there but I'd suggest it get marked for a back port to a point release. @garethgreenaway

  5. toabi commented on Jul 28, 2016

    @toabi
    Author

    Will this fix make it to any release soon?

  6. tedohayer commented on Aug 16, 2016

    @tedohayer

    A coworker disabled a Slack user's account last night, I believe it caused my master (2016.3.2) to go down. It kept trying to restart the engine until it hit ulimit, and caused the master log to fill up the drive.

    Please backport to 2016.3 if possible.

  7. toabi commented on Dec 22, 2016

    @toabi
    Author

    I deployed the 2016.11.1 master and it works! Jey.

  8. Ch3LL commented on Dec 22, 2016

    @Ch3LL
    Contributor

    Awesome glad it works. Will see about getting this backported in 2016.3 since this is still a supported branch.

  9. stale commented on Aug 10, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

    If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4RIoTbugseverity-mediumstale

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions