Project

Profile

Help

Issue #4046

makemigrations seems to ignore custom /etc/pulp/settings.py

Added by jsherril@redhat.com over 2 years ago. Updated about 1 year ago.

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

Description

Having a /etc/pulp/settings.py file with:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.dummy',
        'NAME': 'pulp',
        'USER': 'pulp',
        'HOST': 'foo',
        'PORT': '5432',
        'CONN_MAX_AGE': 0
    },
}

and running 'pulp-manager makemigrations pulp_app'

it seems that the command is still trying to connect to the local postgresql server

Associated revisions

Revision 617c916e View on GitHub
Added by dkliban@redhat.com over 2 years ago

Problem: database settings are not being used

Solution: load dynaconf in manage.py, wsgi.py, worker.py, and entry_points.py

This patch introduces a workaround for a dynaconf issue[0].

This patch also changes how Pulp is deployed on Travis. A non-default name is used for the database. That way we will know if the settings in the settings file are being used.

[0] https://github.com/rochacbruno/dynaconf/issues/89

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

Revision 617c916e View on GitHub
Added by dkliban@redhat.com over 2 years ago

Problem: database settings are not being used

Solution: load dynaconf in manage.py, wsgi.py, worker.py, and entry_points.py

This patch introduces a workaround for a dynaconf issue[0].

This patch also changes how Pulp is deployed on Travis. A non-default name is used for the database. That way we will know if the settings in the settings file are being used.

[0] https://github.com/rochacbruno/dynaconf/issues/89

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

History

#1 Updated by dkliban@redhat.com over 2 years ago

  • Status changed from NEW to POST
  • Assignee set to dkliban@redhat.com
  • Sprint set to Sprint 43
  • Tags Pulp 3 added

#2 Updated by dkliban@redhat.com over 2 years ago

  • Status changed from POST to ASSIGNED

The patch I posted earlier only works for the web server. The RQ worker is still not seeing custom database settings.

#3 Updated by dkliban@redhat.com over 2 years ago

  • Status changed from ASSIGNED to MODIFIED

#4 Updated by jsherril@redhat.com over 2 years ago

  • Tags Katello-P1 added
  • Tags deleted (Pulp 3)

#5 Updated by ttereshc about 2 years ago

  • Tags Pulp 3 added
  • Tags deleted (Katello-P1)

#6 Updated by daviddavis almost 2 years ago

  • Sprint/Milestone set to 3.0.0

#7 Updated by bmbouter almost 2 years ago

  • Tags deleted (Pulp 3)

#8 Updated by bmbouter about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF