Project

Profile

Help

Issue #6128

ansible-pulp misconfigures static directory for nginx and apache

Added by dkliban@redhat.com 7 months ago. Updated 4 months ago.

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

Description

The request below is possible because nginx and apache are configured to serve the 'pulp_webserver_static_dir' at the root[0, 1]. However, the value of this variable is set to {{ pulp_install_dir }}/site-packages/rest_framework[2, 3].

The pulp_webserver_static_dir should always be /var/lib/pulp/assets/. nginx and apache should be configured to serve it at /static/.

$ http http://localhost/apps.py
HTTP/1.1 200 OK
Accept-Ranges: bytes
Connection: Keep-Alive
Content-Length: 255
Date: Tue, 11 Feb 2020 15:18:19 GMT
ETag: "ff-59638f8639473"
Keep-Alive: timeout=5, max=10000
Last-Modified: Thu, 31 Oct 2019 18:25:13 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5

from django.apps import AppConfig


class RestFrameworkConfig(AppConfig):
    name = 'rest_framework'
    verbose_name = "Django REST framework"

    def ready(self):
        # Add System checks
        from .checks import pagination_system_check  # NOQA



[0] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/templates/nginx.conf.j2#L43 [1] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/templates/pulp-vhost.conf.j2#L5 [2] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/tasks/nginx.yml#L24 [3] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/tasks/apache.yml#L16

Associated revisions

Revision 7c631232 View on GitHub
Added by Fabricio Aguiar 6 months ago

Changing STATIC_URL

https://pulp.plan.io/issues/6128 ref #6128

Revision dbbfc4c9 View on GitHub
Added by Fabricio Aguiar 6 months ago

Making nginx/apache points to django.STATIC_ROOT

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

Revision dbbfc4c9 View on GitHub
Added by Fabricio Aguiar 6 months ago

Making nginx/apache points to django.STATIC_ROOT

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

History

#1 Updated by fao89 7 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 66

#2 Updated by rchan 7 months ago

  • Sprint changed from Sprint 66 to Sprint 67

#3 Updated by rchan 7 months ago

  • Sprint changed from Sprint 67 to Sprint 68

#4 Updated by fao89 6 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89

#6 Updated by rchan 6 months ago

  • Sprint changed from Sprint 68 to Sprint 69

#7 Updated by Anonymous 6 months ago

  • Status changed from POST to MODIFIED

#8 Updated by Anonymous 6 months ago

#9 Updated by ttereshc 5 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Sprint/Milestone set to 3.3.0

#10 Updated by bmbouter 4 months ago

  • Category set to Installer
  • Tags deleted (Pulp 3 installer)

Please register to edit this issue

Also available in: Atom PDF