Project

Profile

Help

Issue #3980

closed

Issue #3981: Switch Pulp3 settings to Dynaconf

Redis only works on localhost

Added by bmbouter almost 6 years ago. Updated over 4 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.

Actions #1

Updated by bmbouter almost 6 years ago

  • Parent issue set to #3981
Actions #2

Updated by CodeHeeler almost 6 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by amacdona@redhat.com almost 6 years ago

  • Sprint set to Sprint 43
Actions #4

Updated by bmbouter almost 6 years ago

  • Sprint deleted (Sprint 43)

This will be resolved by the epic 3981.

Actions #5

Updated by dkliban@redhat.com almost 6 years ago

  • Status changed from NEW to POST
  • Assignee set to dkliban@redhat.com

Added by Bruno Rocha almost 6 years ago

Revision e1fcdda1 | View on GitHub

Problem: Pulp can't be configured using environment variables

Solution: use dynaconf to manage all of Pulp configuration settings

This patch also adds pulpcore.rqconfig module that is dynamically generated from the Django settings generated by dynaconf. The rq workers use this module for their configuration.

The default location of the config file is now at /etc/pulp/settings.py. Pulp can operate without by relying on environment variables.

closes: #3981 https://pulp.plan.io/issues/3981

closes: #3879 https://pulp.plan.io/issues/3879

closes: #3980 https://pulp.plan.io/issues/3980

closes #3618 https://pulp.plan.io/issues/3618

closes: #3943 https://pulp.plan.io/issues/3943

Added by Bruno Rocha almost 6 years ago

Revision e1fcdda1 | View on GitHub

Problem: Pulp can't be configured using environment variables

Solution: use dynaconf to manage all of Pulp configuration settings

This patch also adds pulpcore.rqconfig module that is dynamically generated from the Django settings generated by dynaconf. The rq workers use this module for their configuration.

The default location of the config file is now at /etc/pulp/settings.py. Pulp can operate without by relying on environment variables.

closes: #3981 https://pulp.plan.io/issues/3981

closes: #3879 https://pulp.plan.io/issues/3879

closes: #3980 https://pulp.plan.io/issues/3980

closes #3618 https://pulp.plan.io/issues/3618

closes: #3943 https://pulp.plan.io/issues/3943

Actions #6

Updated by Anonymous almost 6 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by daviddavis about 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #8

Updated by bmbouter about 5 years ago

  • Tags deleted (Pulp 3)
Actions #9

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF