Skip to content

Complete redis Sentinel documentation in regards to authentication #6301

@iodbh

Description

@iodbh

Checklist

  • I have checked the issues list
    for similar or identical bug reports.
  • I have checked the pull requests list
    for existing proposed fixes.
  • I have checked the commit log
    to find out if the bug was already fixed in the master branch.
  • I have included all related issues and possible duplicate issues in this issue
    (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

  • None

Possible Duplicates

  • None

Description

I ran into an issue where connecting to redis sentinels with authentication enabled would fail, as some of the Redis requests sent by Celery would not be authenticated (I am not familiar enough with the codebase to know wheter this is intended behavior, but can create a separate issue if need be).

After a long debugging session, it turned out the solution was to provide the password sentinel_kwargs in app.conf.broker_transport_url as follows :

app.conf.broker_transport_options = { 'master_name': "mymaster", "sentinel_kwargs": {"password":  "mypassword"}}

(in addition of providing it in broker_url)

the sentinel_kwargs option and the apparent requirement to repeate the password there seem to be completely undocumented, and I could only figure it out by inspecting the code.

Additionally, I am not sure how to provide both redis master and sentinel passwords if they differ (using the same at the moment)

Suggestions

  • Add a section on sentinel_kwargs in the redis broker docs
  • If it is the intended behavior, specify that the sentinel password has to be repeated there
  • clarify the required configuration when both sentinel and master authentication are used

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions