GithubHelp home page GithubHelp logo

Sendgrid fails to send mail about lightbulb HOT 15 OPEN

ansible avatar ansible commented on September 17, 2024
Sendgrid fails to send mail

from lightbulb.

Comments (15)

tima avatar tima commented on September 17, 2024 1

I discovered using Ansible v2.2 that the sendgrid client library has made a number of breaking changes in the past calendar year.

https://github.com/sendgrid/sendgrid-python/issues/217

The module in v2.2 only works with versions of the library prior to v3.0. The latest is 3.6.3. If anyone does a pip install sendgrid they're going to get a library that will give them a stacktrace dump when they use the sender module. Annoying.

Users need to use pip install sendgrid==2.2.1 to get a version that will work with what ships in v2.2.

from lightbulb.

thisdavejohnson avatar thisdavejohnson commented on September 17, 2024

This is with Ansible 2.1.0 and the latest checkout of lightbulb.

from lightbulb.

thisdavejohnson avatar thisdavejohnson commented on September 17, 2024

This also fails with the same error on Ansible 2.0.0.2.

from lightbulb.

jsmartin avatar jsmartin commented on September 17, 2024

@thisdavejohnson I'm wondering if our playbooks are assuming we are using @defionscode 's fork of the sendgrid module: ansible/ansible-modules-extras#1275

from lightbulb.

jsmartin avatar jsmartin commented on September 17, 2024

Oh yes, it is obviously, I see the forked module already in the role. Maybe sendgrid has had an API change?

from lightbulb.

samdoran avatar samdoran commented on September 17, 2024

@thisdavejohnson Digging in to this since I'm doing a training engagement this week.

I am able to duplicate the original error (reported in Slack):

TASK [training_infra : Email Hosts file] ***************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'module' object has no attribute 'SendGridClient'

This happens with the latest (>=3.0) sendgrid module. Seems something changed there that needs to be updated.

Regarding the issue reported here, I'm unable to duplicate the error.

  • Python 2.7.11
  • macOS 10.11.5
  • Ansible 2.1.0.0
  • sendgrid library 2.1.1
  • custom sendgrid.py module included with the role

I'll have to try running it from a CentOS 7 control machine and see if that allows me to duplicate the problem.

from lightbulb.

smapjb avatar smapjb commented on September 17, 2024

I hit the problem on stock RHEL 7.2 - I downgraded sendgrid (upon reading this) and now it works ok

sudo pip install sendgrid==2.1.1

  • Python 2.7.5
  • RHEL 7.2
  • Ansible 2.1.1

from lightbulb.

thisdavejohnson avatar thisdavejohnson commented on September 17, 2024

I still have this problem with:

  • Python 2.7.5
  • RHEL 7.1
  • Ansible 2.1.1
  • sendgrid library 2.1.1
  • custom sendgrid.py modules included with the role

from lightbulb.

auden-rovellequartz avatar auden-rovellequartz commented on September 17, 2024

I have this issue (Running on Apache/2.4.7 (Ubuntu), Python 2.7.6)

from lightbulb.

samdoran avatar samdoran commented on September 17, 2024

@thisdavejohnson @auden-rovellequartz

I was able to successfully send email from CentOS 7.2 and Ubuntu 14.04.

Can you please try using branch wip-refactor-provisioner? Make sure to check out the README since several things have changed and you might need to change your extra_vars.yml slightly.

from lightbulb.

auden-rovellequartz avatar auden-rovellequartz commented on September 17, 2024

what version of Python are you using?

On Tue, Oct 25, 2016 at 9:07 AM, Sam Doran [email protected] wrote:

@thisdavejohnson https://github.com/thisdavejohnson @auden-rovellequartz
https://github.com/auden-rovellequartz

I was able to successfully send email from CentOS 7.2 and Ubuntu 14.04.

Can you please try using branch wip-refactor-provisioner? Make sure to
check out the README since several things have changed and you might need
to change your extra_vars.yml slightly.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#70 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMr3I0FUaXZUcqnkSbyQlDXolwmnkoiwks5q3g02gaJpZM4IzRgj
.

from lightbulb.

samdoran avatar samdoran commented on September 17, 2024

CentOS 7.2: Python 2.7.5
Ubuntu 14.04: Python 2.7.6

from lightbulb.

samdoran avatar samdoran commented on September 17, 2024

Is this still an issue with Ansible 2.2? I just tested with the built in sendgrid module on 2.2 and it works, but I'm a bad tester since I can't duplicate this.

from lightbulb.

tima avatar tima commented on September 17, 2024

Posted this as an issue here: ansible/ansible#19314

from lightbulb.

tima avatar tima commented on September 17, 2024

Bollocks! I just saw in the docs where the sendgrid version is flagged. Still it should be better handled than it is.

from lightbulb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.