Project

Profile

Help

Issue #4046

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

Added by jsherril@redhat.com about 1 year ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 43

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 about 1 year 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 issue0.

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 about 1 year 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 issue0.

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 about 1 year 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 issue0.

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 about 1 year 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 about 1 year 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 about 1 year ago

  • Status changed from ASSIGNED to MODIFIED

#4 Updated by jsherril@redhat.com about 1 year ago

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

#5 Updated by ttereshc 11 months ago

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

#6 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#7 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF