Merge lp:~kelvin.li/rnr-server/log-enhancement into lp:rnr-server

Proposed by Kelvin Li
Status: Merged
Approved by: Kelvin Li
Approved revision: 316
Merged at revision: 314
Proposed branch: lp:~kelvin.li/rnr-server/log-enhancement
Merge into: lp:rnr-server
Diff against target: 56 lines (+4/-13)
2 files modified
django_project/settings_base.py (+3/-5)
django_project/settings_devel.py (+1/-8)
To merge this branch: bzr merge lp:~kelvin.li/rnr-server/log-enhancement
Reviewer Review Type Date Requested Status
Fabián Ezequiel Gallina (community) Approve
Review via email: mp+279721@code.launchpad.net

Commit message

enhance the log setting for devel;
removed the additonal folder creation for run test;

Description of the change

enhance the log setting for devel;
removed the additonal folder creation for run test;

When run the `fab test`, it will use the `tmp` folder as the log dir instead of create the new one under www-logs

Cleanup some useless configs for devel.

The changes were tested in both of local run:
https://pastebin.canonical.com/145558/

To post a comment you must log in.
Revision history for this message
Fabián Ezequiel Gallina (fgallina) wrote :

LGTM.

Just a comment about something that was introduced earlier: I find RNR_HOST_DIR name a bit misleading, if I gather that correctly it's a dir to place the launchpadlib cache dir mostly, so maybe we can rename it to better reflect that.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (70.8 KiB)

The attempt to merge lp:~kelvin.li/rnr-server/log-enhancement into lp:rnr-server failed. Below is the output from the failed tests.

echo 'cleaning virtualenv...'
cleaning virtualenv...
rm -rf /mnt/tarmac/cache/rnr-server/merges/trunk/virtualenv
echo 'creating new virtualenv...'
creating new virtualenv...
virtualenv --clear --system-site-packages /mnt/tarmac/cache/rnr-server/merges/trunk/virtualenv
Not deleting /mnt/tarmac/cache/rnr-server/merges/trunk/virtualenv/bin
New python executable in /mnt/tarmac/cache/rnr-server/merges/trunk/virtualenv/bin/python
Installing setuptools, pip...done.
make sanitize-sourcedeps
make[1]: Entering directory `/mnt/tarmac/cache/rnr-server/merges/trunk'
sed -e '1,/# Dependencies/d;s/^rnr-server/./g;s/bazaar.isd/bazaar.launchpad.net/g' config-manager.txt > config-manager.txt.tmp
make[1]: Leaving directory `/mnt/tarmac/cache/rnr-server/merges/trunk'
make CONFIGMANAGER=config-manager.txt.tmp build
make[1]: Entering directory `/mnt/tarmac/cache/rnr-server/merges/trunk'
/usr/lib/config-manager/cm.py update config-manager.txt.tmp
make[1]: Leaving directory `/mnt/tarmac/cache/rnr-server/merges/trunk'
touch branches/last_build
[ -d branches/wheels ] && (cd branches/wheels && bzr pull) || (bzr branch lp:~ubuntuone-pqm-team/rnr-server/dependencies branches/wheels)
bzr version-info --format=python > lib/versioninfo.py
/mnt/tarmac/cache/rnr-server/merges/trunk/virtualenv/bin/python /mnt/tarmac/cache/rnr-server/merges/trunk/virtualenv/bin/pip install --find-links=branches/wheels --no-index -r requirements.txt
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking amqp==1.4.5 (from -r requirements.txt (line 1))
Downloading/unpacking django==1.6.10 (from -r requirements.txt (line 2))
Downloading/unpacking django-openid-auth==0.6 (from -r requirements.txt (line 3))
Downloading/unpacking django-pgtools==0.2 (from -r requirements.txt (line 4))
Downloading/unpacking django-preflight==0.1.5 (from -r requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): python-openid==2.2.5 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 7))
Downloading/unpacking oauthlib==0.6.3 (from -r requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): oops==0.0.13 in /usr/lib/pymodules/python2.7 (from -r requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): oops-amqp==0.0.7 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 10))
Downloading/unpacking oops-datedir-repo==0.0.20 (from -r requirements.txt (line 11))
Downloading/unpacking oops-dictconfig==0.0.4 (from -r requirements.txt (line 12))
Downloading/unpacking oops-wsgi==0.0.11 (from -r requirements.txt (line 13))
Downloading/unpacking requests-oauthlib==0.5.0 (from -r requirements.txt (line 15))
Downloading/unpacking south==1.0.2 (from -r requirements.txt (line 16))
Downloading/unpacking txstatsd==1.0.0 (from -r requirements.txt (line 17))
Downloading/unpacking whitenoise==2.0.4 (from -r requirements.txt (line 18))
Downloading/unpacking gunicorn==19.3.0 (from -r requirements.txt (line 19))
Downloading/unpacking rnrclient (from -r requirements.txt (line 21))
Do...

316. By Kelvin Li

revert to use StaticFilesStorage for devel to have the test running without issue

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django_project/settings_base.py'
2--- django_project/settings_base.py 2015-10-19 08:46:18 +0000
3+++ django_project/settings_base.py 2015-12-14 07:43:14 +0000
4@@ -4,13 +4,11 @@
5 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
6 SRC_DIR = os.path.join(BASE_DIR, 'src')
7 HOST_DIR = os.path.abspath(
8- os.getenv('RNR_HOST_DIR', os.path.abspath(
9+ os.getenv('RNR_LP_CACHE_HOST_DIR', os.path.abspath(
10 os.path.join(BASE_DIR, os.path.pardir, os.path.pardir))))
11 LOGS_DIR = os.path.abspath(
12- os.getenv('RNR_LOGS_DIR', os.path.abspath(
13- os.path.join(BASE_DIR, os.path.pardir)) + '-logs'))
14+ os.getenv('RNR_LOGS_DIR', os.path.join(BASE_DIR, 'tmp')))
15 OOPS_DIR = os.path.join(LOGS_DIR, 'www-oops')
16-APP_LOGS_DIR = os.path.join(LOGS_DIR, 'www-logs')
17
18 ABSOLUTE_URL_OVERRIDES = {}
19 ADMINS = []
20@@ -259,7 +257,7 @@
21 'formatter': 'simple',
22 'class': 'logging.FileHandler',
23 'filters': '',
24- 'filename': os.path.join(APP_LOGS_DIR, 'rnr.log'),
25+ 'filename': os.path.join(LOGS_DIR, 'rnr.log'),
26 },
27 },
28 'incremental': False,
29
30=== modified file 'django_project/settings_devel.py'
31--- django_project/settings_devel.py 2015-10-20 15:09:20 +0000
32+++ django_project/settings_devel.py 2015-12-14 07:43:14 +0000
33@@ -1,7 +1,6 @@
34 import os
35
36-os.environ.setdefault('RNR_HOST_DIR', '.')
37-os.environ.setdefault('RNR_LOGS_DIR', '/tmp')
38+os.environ.setdefault('RNR_LP_CACHE_HOST_DIR', '/tmp')
39
40 from django_project.settings_base import * # noqa
41
42@@ -9,12 +8,6 @@
43 CSRF_COOKIE_SECURE = False
44 DEBUG = True
45 FORCE_HTTPS_IN_ENVIRONMENT = False
46-LAUNCHPADLIB_DIR = os.path.join(LOGS_DIR, '.launchpadlib')
47-if not os.path.exists(APP_LOGS_DIR):
48- os.mkdir(APP_LOGS_DIR)
49-LOGGING['handlers']['file']['filename'] = os.path.join(
50- APP_LOGS_DIR, 'rnr.log')
51-OOPSES['publishers'][0]['error_dir'] = os.path.join(LOGS_DIR, 'rnr-oopses')
52 SECRET_KEY = 'CHANGEME'
53 TEMPLATE_DEBUG = True
54 TEMPLATE_DIRS = [
55
56=== added directory 'tmp'

Subscribers

People subscribed via source and target branches

to all changes: