[ARVADOS] updated: 3da10f0c0f5a0c0c91d49436a5995c890b03d228
git at public.curoverse.com
git at public.curoverse.com
Tue Oct 20 11:05:24 EDT 2015
Summary of changes:
sdk/python/tests/nginx.conf | 2 +-
sdk/python/tests/run_test_server.py | 21 +++++++++++++++------
2 files changed, 16 insertions(+), 7 deletions(-)
via 3da10f0c0f5a0c0c91d49436a5995c890b03d228 (commit)
via 6b1b4d80445f0e03f89c46a167bebefe7bcf97c0 (commit)
via 329da35b297dc38f3f32198ed1c7e09bbace7c0e (commit)
via 716d6859bda672865c1266818bbc9814cfa9e64e (commit)
via 89b0d40ef05354a2b298a96ec3fc7a879f7f5328 (commit)
from d379c467be58c66b2f1e7acafc97634b269a1542 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 3da10f0c0f5a0c0c91d49436a5995c890b03d228
Merge: d379c46 6b1b4d8
Author: Brett Smith <brett at curoverse.com>
Date: Tue Oct 20 11:04:29 2015 -0400
Merge branch 'pr/28'
Closes #7324.
commit 6b1b4d80445f0e03f89c46a167bebefe7bcf97c0
Author: Brett Smith <brett at curoverse.com>
Date: Tue Oct 20 11:03:55 2015 -0400
Clean redundant except: blocks in run_test_server.
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 87b6f9a..ca13fc7 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -55,9 +55,7 @@ def find_server_pid(PID_PATH, wait=10):
with open(PID_PATH, 'r') as f:
server_pid = int(f.read())
good_pid = (os.kill(server_pid, 0) is None)
- except IOError:
- good_pid = False
- except OSError:
+ except EnvironmentError:
good_pid = False
now = time.time()
@@ -92,9 +90,7 @@ def kill_server_pid(pidfile, wait=10, passenger_root=False):
os.getpgid(server_pid)
time.sleep(0.1)
now = time.time()
- except IOError:
- pass
- except OSError:
+ except EnvironmentError:
pass
def find_available_port():
commit 329da35b297dc38f3f32198ed1c7e09bbace7c0e
Author: Brett Smith <brett at curoverse.com>
Date: Tue Oct 20 11:02:51 2015 -0400
7324: Tighten exception ignoring in run_test_server start_nginx.
We just want to make sure the FIFO's gone. Ignore the OSError that
says "can't remove it because it's already gone," and re-raise all
others.
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index d5d7166..87b6f9a 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -3,6 +3,7 @@
from __future__ import print_function
import argparse
import atexit
+import errno
import httplib2
import os
import pipes
@@ -456,8 +457,9 @@ def run_nginx():
try:
os.remove(nginxconf['ACCESSLOG'])
- except OSError:
- pass
+ except OSError as error:
+ if error.errno != errno.ENOENT:
+ raise
os.mkfifo(nginxconf['ACCESSLOG'], 0700)
nginx = subprocess.Popen(
commit 716d6859bda672865c1266818bbc9814cfa9e64e
Author: Colin Nolan <colin.nolan at sanger.ac.uk>
Date: Fri Oct 16 14:15:09 2015 +0100
7324: Implemented deletion of previous nginx access log fifo before creation,
as discussed with @jrandall to address issue raised by @brettcs
(see: https://github.com/curoverse/arvados/pull/28#discussion_r39689972).
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index a38066a..d5d7166 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -453,6 +453,12 @@ def run_nginx():
env = os.environ.copy()
env['PATH'] = env['PATH']+':/sbin:/usr/sbin:/usr/local/sbin'
+
+ try:
+ os.remove(nginxconf['ACCESSLOG'])
+ except OSError:
+ pass
+
os.mkfifo(nginxconf['ACCESSLOG'], 0700)
nginx = subprocess.Popen(
['nginx',
commit 89b0d40ef05354a2b298a96ec3fc7a879f7f5328
Author: Joshua C. Randall <jcrandall at alum.mit.edu>
Date: Mon Sep 14 10:19:20 2015 +0000
7324: fixes /dev/stderr issue by creating and catting a fifo for nginx access_log
diff --git a/sdk/python/tests/nginx.conf b/sdk/python/tests/nginx.conf
index 6196605..d8a207f 100644
--- a/sdk/python/tests/nginx.conf
+++ b/sdk/python/tests/nginx.conf
@@ -3,7 +3,7 @@ error_log stderr info; # Yes, must be specified here _and_ cmdline
events {
}
http {
- access_log /dev/stderr combined;
+ access_log {{ACCESSLOG}} combined;
upstream arv-git-http {
server localhost:{{GITPORT}};
}
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 1c5162b..a38066a 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -441,6 +441,7 @@ def run_nginx():
nginxconf['GITSSLPORT'] = find_available_port()
nginxconf['SSLCERT'] = os.path.join(SERVICES_SRC_DIR, 'api', 'tmp', 'self-signed.pem')
nginxconf['SSLKEY'] = os.path.join(SERVICES_SRC_DIR, 'api', 'tmp', 'self-signed.key')
+ nginxconf['ACCESSLOG'] = os.path.join(TEST_TMPDIR, 'nginx_access_log.fifo')
conftemplatefile = os.path.join(MY_DIRNAME, 'nginx.conf')
conffile = os.path.join(TEST_TMPDIR, 'nginx.conf')
@@ -452,12 +453,16 @@ def run_nginx():
env = os.environ.copy()
env['PATH'] = env['PATH']+':/sbin:/usr/sbin:/usr/local/sbin'
+ os.mkfifo(nginxconf['ACCESSLOG'], 0700)
nginx = subprocess.Popen(
['nginx',
'-g', 'error_log stderr info;',
'-g', 'pid '+_pidfile('nginx')+';',
'-c', conffile],
env=env, stdin=open('/dev/null'), stdout=sys.stderr)
+ cat_access = subprocess.Popen(
+ ['cat', nginxconf['ACCESSLOG']],
+ stdout=sys.stderr)
_setport('keepproxy-ssl', nginxconf['KEEPPROXYSSLPORT'])
_setport('arv-git-httpd-ssl', nginxconf['GITSSLPORT'])
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list