Project

Profile

Help

Issue #3980

closed

Issue #3981: Switch Pulp3 settings to Dynaconf

Redis only works on localhost

Added by bmbouter about 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Problem

While deploying Pulp to openshift my Redis was in another container on another IP, not localhost. I correctly configured my server.yaml file so that it should connect to the other hostname (not localhost). Everytime I started RQ it would tell me: error cannot connect to localhost:6379.

Root Cause

We are expecting to configure Redis through the PulpWorker, but Redis doesn't work that way. Even before RQ instantiates the custom worker class, i.e. pulpcore.tasking.worker.PulpWorker, it attempts to connect to RQ and clean out previous old data. Thus how we are configuring RQ is incorrect.

Solution

1. Have RQ use its own config file like it wants to. I tested this and it works well. See "Using a config file" here: http://python-rq.org/docs/workers/

Lingering Problems

The pulp config file is yaml and it also needs these settings so users now need to put the same data in two places.

Also available in: Atom PDF