record profile data in /var/log/tower, not /var/lib/awx

This commit is contained in:
Ryan Petrello 2019-02-15 14:30:27 -05:00
parent eed94b641e
commit 6f43875e80
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777
5 changed files with 6 additions and 5 deletions

View File

@ -17,7 +17,7 @@ __all__ = ['DatabaseWrapper']
class RecordedQueryLog(object):
def __init__(self, log, db, dest='/var/lib/awx/profile'):
def __init__(self, log, db, dest='/var/log/tower/profile'):
self.log = log
self.db = db
self.dest = dest

View File

@ -6,7 +6,7 @@ from awx.main.tasks import profile_sql
class Command(BaseCommand):
"""
Enable or disable SQL Profiling across all Python processes.
SQL profile data will be recorded at /var/lib/awx/profile/
SQL profile data will be recorded at /var/log/tower/profile
"""
def add_arguments(self, parser):

View File

@ -34,7 +34,7 @@ perf_logger = logging.getLogger('awx.analytics.performance')
class TimingMiddleware(threading.local):
dest = '/var/lib/awx/profile'
dest = '/var/log/tower/profile'
def process_request(self, request):
self.start_time = time.time()

View File

@ -66,7 +66,7 @@ ENTRYPOINT ["/tini", "--"]
CMD /start_development.sh
# Pre-create things that we need to write to
RUN for dir in /var/lib/awx/ /projects /.ansible /var/log/nginx /var/lib/nginx /.local; \
RUN for dir in /var/lib/awx/ /var/log/tower/ /projects /.ansible /var/log/nginx /var/lib/nginx /.local; \
do mkdir -p $dir; chmod -R g+rwx $dir; chgrp -R root $dir; done
RUN for file in /etc/passwd /etc/supervisord.conf \

View File

@ -46,7 +46,8 @@ SOSREPORT_FORBIDDEN_PATHS = [
"/etc/tower/tower.key",
"/etc/tower/awx.key",
"/etc/tower/tower.cert",
"/etc/tower/awx.cert"
"/etc/tower/awx.cert",
"/var/log/tower/profile"
]
if LooseVersion(sos.__version__) >= LooseVersion('3.0'):