Project

Profile

Help

Issue #6128

closed

ansible-pulp misconfigures static directory for nginx and apache

Added by dkliban@redhat.com about 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
Installer - Moved to GitHub issues
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

Also available in: Atom PDF