Skip to content

Commit

Permalink
record profile data in /var/log/tower, not /var/lib/awx
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpetrello committed Feb 15, 2019
1 parent eed94b6 commit 6f43875
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion awx/main/db/profiled_pg/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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
Expand Down
2 changes: 1 addition & 1 deletion awx/main/management/commands/profile_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion awx/main/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

class TimingMiddleware(threading.local):

dest = '/var/lib/awx/profile'
dest = '/var/log/tower/profile'

def process_request(self, request):
self.start_time = time.time()
Expand Down
2 changes: 1 addition & 1 deletion tools/docker-compose/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 2 additions & 1 deletion tools/sosreport/tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"/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'):
Expand Down

0 comments on commit 6f43875

Please sign in to comment.