You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ja...@apache.org on 2015/02/06 23:02:18 UTC

[1/7] trafficserver-qa git commit: Limit make -j to num CPUs

Repository: trafficserver-qa
Updated Branches:
  refs/heads/master 2c0bfaf4c -> 5f3f5fb2a


Limit make -j to num CPUs


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/7339d9e6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/7339d9e6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/7339d9e6

Branch: refs/heads/master
Commit: 7339d9e68a56e520c9dcdcb8eb71f085e2530e6b
Parents: 2c0bfaf
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:20:33 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:20:33 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/7339d9e6/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index 7af94bb..9e166ab 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -6,6 +6,7 @@ import shutil
 import tsqa.utils
 import sys
 import time
+import multiprocessing
 
 import tsqa.configs
 import tsqa.utils
@@ -146,7 +147,7 @@ class EnvironmentFactory(object):
             tsqa.utils.run_sync_command(args, **kwargs)
 
             # make
-            tsqa.utils.run_sync_command(['make', '-j'], **kwargs)
+            tsqa.utils.run_sync_command(['make', '-j{0}'.format(multiprocessing.cpu_count())], **kwargs)
             installdir = tempfile.mkdtemp(dir=self.env_cache_dir)
 
             # make install


[6/7] trafficserver-qa git commit: Re-enable full check

Posted by ja...@apache.org.
Re-enable full check


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/4a6eac15
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/4a6eac15
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/4a6eac15

Branch: refs/heads/master
Commit: 4a6eac15fc31ec7e0b17914450673b88d53d7db9
Parents: 615ccb2
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:51:06 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:51:06 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/4a6eac15/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index 8df6b04..a5265b5 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -330,9 +330,8 @@ class Environment:
         admin_port = tsqa.utils.bind_unused_port()[1]
 
         self.hostports = [('127.0.0.1', http_server_port),
-                          # TODO: re-enable after jpeach's patch lands to fix proxy.config.admin.user_id
-                          #('127.0.0.1', manager_mgmt_port),
-                          #('127.0.0.1', admin_port),
+                          ('127.0.0.1', manager_mgmt_port),
+                          ('127.0.0.1', admin_port),
                           ]
 
         # overwrite a few things that need to be changed to have a unique env


[5/7] trafficserver-qa git commit: Add some more debugging options

Posted by ja...@apache.org.
Add some more debugging options


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/615ccb2f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/615ccb2f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/615ccb2f

Branch: refs/heads/master
Commit: 615ccb2fe0165c127f200411ff76a82c12ee6d94
Parents: b9d980e
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:50:24 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:50:24 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/615ccb2f/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index 1e8cce4..8df6b04 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -347,9 +347,20 @@ class Environment:
             'proxy.config.http.server_ports': str(http_server_port),  # your own listen port
             'proxy.config.process_manager.mgmt_port': manager_mgmt_port,  # your own listen port
             'proxy.config.admin.autoconf_port': admin_port,
-            'proxy.config.diags.show_location': 1,
             'proxy.config.admin.user_id': '#-1',
 
+            # a bunch of debug options
+            'proxy.config.diags.show_location': 1,
+            'proxy.config.diags.output.diag': 'OL',
+            'proxy.config.diags.output.debug': 'OL',
+            'proxy.config.diags.output.status': 'OL',
+            'proxy.config.diags.output.note': 'OL',
+            'proxy.config.diags.output.warning': 'OL',
+            'proxy.config.diags.output.error': 'OL',
+            'proxy.config.diags.output.fatal': 'OL',
+            'proxy.config.diags.output.alert': 'OL',
+            'proxy.config.diags.output.emergency': 'OL',
+
             # set the process_server timeouts to 0 (faster startup)
             'proxy.config.lm.pserver_timeout_secs': 0,
             'proxy.config.lm.pserver_timeout_msecs': 0,


[3/7] trafficserver-qa git commit: Switch back to traffic_cop

Posted by ja...@apache.org.
Switch back to traffic_cop


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/67dc45a2
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/67dc45a2
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/67dc45a2

Branch: refs/heads/master
Commit: 67dc45a2b2b1cb36f31a578c41178351b7bf5757
Parents: 692d1d8
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:39:09 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:39:09 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/67dc45a2/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index c11ac2d..e9543cc 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -239,11 +239,8 @@ class Environment:
         return environ
 
     def __exec_cop(self):
-        # TODO: re-enable after jpeach's patch lands to fix proxy.config.admin.user_id
-        #path = os.path.join(self.layout.bindir, 'traffic_cop')
-        #cmd = [path, '--debug', '--stdout']
-
-        cmd = [os.path.join(self.layout.bindir, 'traffic_server')]
+        path = os.path.join(self.layout.bindir, 'traffic_cop')
+        cmd = [path, '--debug', '--stdout']
 
         with open(os.path.join(self.layout.logdir, 'cop.log'), 'w+') as logfile:
             self.cop = subprocess.Popen(cmd,
@@ -293,7 +290,7 @@ class Environment:
         """
         # First, make the prefix directory.
         if self.layout is None:
-            self.layout = Layout(tempfile.mkdtemp(prefix=os.environ.get('TSQA_LAYOUT_PREFIX', '')))
+            self.layout = Layout(tempfile.mkdtemp(prefix=os.environ.get('TSQA_LAYOUT_PREFIX', 'tsqa.env.')))
         else:
             os.makedirs(self.layout.prefix)
         os.chmod(self.layout.prefix, 0777)  # Make the tmp dir readable by all


[4/7] trafficserver-qa git commit: re-enable no change uid

Posted by ja...@apache.org.
re-enable no change uid


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/b9d980e1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/b9d980e1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/b9d980e1

Branch: refs/heads/master
Commit: b9d980e1b1e56248950d011b259fbaad8a0320bb
Parents: 67dc45a
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:43:30 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:43:30 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/b9d980e1/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index e9543cc..1e8cce4 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -348,7 +348,7 @@ class Environment:
             'proxy.config.process_manager.mgmt_port': manager_mgmt_port,  # your own listen port
             'proxy.config.admin.autoconf_port': admin_port,
             'proxy.config.diags.show_location': 1,
-            #'proxy.config.admin.user_id': '#-1',
+            'proxy.config.admin.user_id': '#-1',
 
             # set the process_server timeouts to 0 (faster startup)
             'proxy.config.lm.pserver_timeout_secs': 0,


[2/7] trafficserver-qa git commit: Add Mac support to shell_env()

Posted by ja...@apache.org.
Add Mac support to shell_env()


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/692d1d83
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/692d1d83
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/692d1d83

Branch: refs/heads/master
Commit: 692d1d83d1eb731ef144d9072f6732fc78427b99
Parents: 7339d9e
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:26:11 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:26:11 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/692d1d83/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index 9e166ab..c11ac2d 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -228,10 +228,14 @@ class Environment:
         environ = copy.copy(os.environ)
         environ['TS_ROOT'] = self.layout.prefix
 
-        if environ.has_key('LD_LIBRARY_PATH') and self.layout.libdir not in environ['LD_LIBRARY_PATH'].split(':'):
-            environ['LD_LIBRARY_PATH'] = self.layout.libdir + ':' + environ['LD_LIBRARY_PATH']
-        else:
-            environ['LD_LIBRARY_PATH'] = self.layout.libdir
+        for env_key in ('LD_LIBRARY_PATH',  # for *nix
+                        'DYLD_LIBRARY_PATH',  # for mac
+                        ):
+            if environ.has_key(env_key) and self.layout.libdir not in environ[env_key].split(':'):
+                environ[env_key] = self.layout.libdir + ':' + environ[env_key]
+            else:
+                environ[env_key] = self.layout.libdir
+
         return environ
 
     def __exec_cop(self):


[7/7] trafficserver-qa git commit: Add negative cachine to EnvironmentFactory

Posted by ja...@apache.org.
Add negative cachine to EnvironmentFactory

Previously if there was a failed build requested N times we would attempt to build N times, instead of remembering that it failed. This adds a negative cache that is in memory only


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/5f3f5fb2
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/5f3f5fb2
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/5f3f5fb2

Branch: refs/heads/master
Commit: 5f3f5fb2a1615fa7eec34b22bd6b481ce256bec2
Parents: 4a6eac1
Author: Thomas Jackson <ja...@gmail.com>
Authored: Wed Jan 28 20:04:42 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Wed Jan 28 20:04:42 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 66 ++++++++++++++++++++++++++++--------------------
 1 file changed, 38 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/5f3f5fb2/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index a5265b5..15580a6 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -21,6 +21,10 @@ class EnvironmentFactory(object):
     and will return copies of these in environments to callers
     '''
     class_environment_stash = None
+
+    # key -> exception
+    negative_cache = {}
+
     def __init__(self,
                  source_dir,
                  env_cache_dir,
@@ -128,34 +132,40 @@ class EnvironmentFactory(object):
 
         # if we don't have it built already, lets build it
         if key not in self.environment_stash:
-            self.autoreconf()
-            builddir = tempfile.mkdtemp()
-
-            kwargs = {
-                'cwd': builddir,
-                'env': env,
-                'stdout': subprocess.PIPE,
-                'stderr': subprocess.PIPE
-            }
-
-            if log.isEnabledFor(logging.DEBUG):
-                kwargs['stdout'] = sys.stdout.fileno()
-                kwargs['stderr'] = sys.stderr.fileno()
-
-            # configure
-            args = [os.path.join(self.source_dir, 'configure'), '--prefix=/'] + tsqa.utils.configure_list(configure)
-            tsqa.utils.run_sync_command(args, **kwargs)
-
-            # make
-            tsqa.utils.run_sync_command(['make', '-j{0}'.format(multiprocessing.cpu_count())], **kwargs)
-            installdir = tempfile.mkdtemp(dir=self.env_cache_dir)
-
-            # make install
-            tsqa.utils.run_sync_command(['make', 'install', 'DESTDIR={0}'.format(installdir)], **kwargs)
-
-            shutil.rmtree(builddir)  # delete builddir, not useful after install
-            # stash the env
-            self.environment_stash[key] = installdir
+            if key in EnvironmentFactory.negative_cache:
+                raise EnvironmentFactory.negative_cache[key]
+            try:
+                self.autoreconf()
+                builddir = tempfile.mkdtemp()
+
+                kwargs = {
+                    'cwd': builddir,
+                    'env': env,
+                    'stdout': subprocess.PIPE,
+                    'stderr': subprocess.PIPE
+                }
+
+                if log.isEnabledFor(logging.DEBUG):
+                    kwargs['stdout'] = sys.stdout.fileno()
+                    kwargs['stderr'] = sys.stderr.fileno()
+
+                # configure
+                args = [os.path.join(self.source_dir, 'configure'), '--prefix=/'] + tsqa.utils.configure_list(configure)
+                tsqa.utils.run_sync_command(args, **kwargs)
+
+                # make
+                tsqa.utils.run_sync_command(['make', '-j{0}'.format(multiprocessing.cpu_count())], **kwargs)
+                installdir = tempfile.mkdtemp(dir=self.env_cache_dir)
+
+                # make install
+                tsqa.utils.run_sync_command(['make', 'install', 'DESTDIR={0}'.format(installdir)], **kwargs)
+
+                shutil.rmtree(builddir)  # delete builddir, not useful after install
+                # stash the env
+                self.environment_stash[key] = installdir
+            except Exception as e:
+                EnvironmentFactory.negative_cache[key] = e
+                raise
 
         # create a layout
         layout = Layout(self.environment_stash[key])