[MediaWiki-commits] [Gerrit] Script to test Toolserver redirects - change (operations/software)

2014-01-19 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/108467


Change subject: Script to test Toolserver redirects
..

Script to test Toolserver redirects

Bug: 60238
Change-Id: I71adf356d18b59a9bc9e6d2a1a568b8252cafd18
---
A toolserver/test-redirects.py
1 file changed, 63 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/67/108467/1

diff --git a/toolserver/test-redirects.py b/toolserver/test-redirects.py
new file mode 100755
index 000..efc04d9
--- /dev/null
+++ b/toolserver/test-redirects.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+
+# This script tests whether a host given as a command line argument
+# correctly redirects Toolserver URLs to their new homes.
+
+import argparse
+import httplib
+import sys
+
+# Parse command line arguments.
+parser = argparse.ArgumentParser(
+description='Test host for correct Toolserver redirects.')
+parser.add_argument('host', help='Host to test')
+args = parser.parse_args()
+
+# Hosts that the redirector should recognize.
+TestHosts = ['toolserver.org',
+ 'www.toolserver.org',
+ 'ortelius.toolserver.org',
+ 'wolfsbane.toolserver.org']
+
+# The following URLs will be tested.  The keys are the paths of the
+# URL to be tested for each of TestHosts, the values are the correct
+# redirects.  Each URL will be tested for http and https, so the
+# redirects don't include schemes.
+TestURLs = {'/': 'meta.wikimedia.org/wiki/Toolserver',
+'/~timl/wikilint': 'tools.wmflabs.org/wikilint',
+'/~timl/wikilint/': 'tools.wmflabs.org/wikilint/',
+'/~timl/wikilint/abc': 'tools.wmflabs.org/wikilint/abc',
+'/~timl/wikilint/abc?a=1b=2': 
'tools.wmflabs.org/wikilint/abc?a=1b=2',
+'/~timl/wikilintabc': 'meta.wikimedia.org/wiki/Toolserver',
+'/~daniel/potd/': 'tools.wmflabs.org/potd-feed/',
+'/~pietrodn/intersectContribs.php': 
'tools.wmflabs.org/intersect-contribs/',
+'/~pietrodn/sectionLinks.php': 'tools.wmflabs.org/section-links/'}
+
+# Exit status.
+exitstatus = 0
+
+def TestRedirects(conn, scheme, hosts, testurls):
+global exitstatus
+
+for host in hosts:
+for path, redirect in testurls.iteritems():
+conn.request('GET', path, headers={'Host': host})
+response = conn.getresponse()
+response.read()   # Discard body.
+if response.status != 301 or response.getheader('Location') != 
(scheme + '://' + redirect):
+print %s://%s%s should have redirected to %s, but returned 
\%s %s (%s) % (scheme, host, path, redirect, response.status, 
response.reason, response.getheader('Location'))
+exitstatus = 3
+
+# Test http.
+conn = httplib.HTTPConnection(args.host)
+TestRedirects(conn, 'http', TestHosts, TestURLs)
+conn.close()
+
+# Test https.
+conn = httplib.HTTPSConnection(args.host)
+TestRedirects(conn, 'https', TestHosts, TestURLs)
+conn.close()
+
+if exitstatus:
+print Found errors.
+sys.exit(exitstatus)

-- 
To view, visit https://gerrit.wikimedia.org/r/108467
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71adf356d18b59a9bc9e6d2a1a568b8252cafd18
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Report last successful Puppet run in 24-hour format - change (operations/puppet)

2014-01-17 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/108086


Change subject: Report last successful Puppet run in 24-hour format
..

Report last successful Puppet run in 24-hour format

Change-Id: Ic7da2ef86a4e7e79fa69e02e8f5ec4c6b936d5da
---
M templates/icinga/checkcommands.cfg.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/108086/1

diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 6a148d3..d17360e 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -464,7 +464,7 @@
 
 define command{
command_namepuppet-FAIL
-   command_linedate --date @$LASTSERVICEOK$ +Last successful Puppet 
run was %c  exit 2
+   command_lineLANG=C date --date @$LASTSERVICEOK$ +Last successful 
Puppet run was %c  exit 2
 }
 
 define command{

-- 
To view, visit https://gerrit.wikimedia.org/r/108086
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7da2ef86a4e7e79fa69e02e8f5ec4c6b936d5da
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix various typos - change (operations/puppet)

2014-01-13 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/107165


Change subject: Fix various typos
..

Fix various typos

Change-Id: I2aa6e65e4eac8b920bf39fb51089cfaea9b0956f
---
M files/nfs/upstart-nfs-noidmap.conf
M manifests/ganglia.pp
M modules/toollabs/manifests/init.pp
3 files changed, 15 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/107165/1

diff --git a/files/nfs/upstart-nfs-noidmap.conf 
b/files/nfs/upstart-nfs-noidmap.conf
index 61fb5cf..91dc558 100644
--- a/files/nfs/upstart-nfs-noidmap.conf
+++ b/files/nfs/upstart-nfs-noidmap.conf
@@ -1,10 +1,10 @@
 # nfs-noidmap - disable idmap for cross-project NFS
 #
-# This task disables the kernel's automatic idmap for NFSv4
-# to allow conflicting group names accross projects
+# This task disables the kernel's automatic idmap for NFSv4 to allow
+# conflicting group names across projects.
 #
-# Made into an upstart task because that setting is annoyingly
-# not made available through sysctl.
+# Made into an upstart task because that setting is annoyingly not
+# made available through sysctl.
 
 description disable idmap for cross-project NFS
 
diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index 865d869..81d5d78 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -563,27 +563,27 @@
 }
 
 
-# == Define ganlia::view
+# == Define ganglia::view
 # Defines a Ganglia view JSON file.
 # See 
http://sourceforge.net/apps/trac/ganglia/wiki/ganglia-web-2#JSONdefinitionforviews
 # for documentation on Ganglia view JSON format.
 #
 # == Parameters:
-# $graphs   - Shortcut for of describing items that represent 
aggregate_graphs.
+# $graphs   - Shortcut for describing items that represent 
aggregate_graphs.
 # $items- Should match exactly the JSON structure expected by Ganglia 
for views.
 # $view_type- If you are using aggregate_graphs, this must be set to 
'standard'.
 # 'regex' will allow you to use non-aggregate graphs and match 
hostnames by regex.
 # Default: 'standard'.
 # $default_size - Default size for graphs.  Default: 'large'.
 # $conf_dir - Path to directory where ganglia view JSON files should live.
-# Defaults to the appropriate directory based on WMF $::realm. 
 Default: to /var/lib/ganglia/conf
-# $template - The ERb template to use for the JSON file.  Only change this 
if you need to do fancier things than this define allows.
+# Defaults to the appropriate directory based on WMF $::realm. 
 Default: /var/lib/ganglia/conf.
+# $template - The ERB template to use for the JSON file.  Only change this 
if you need to do fancier things than this define allows.
 #
 # == Examples:
-# # A 'regex' (non aggregate graph) view:
+# # A 'regex' (non-aggregate graph) view:
 # # Note that no aggregate_graphs are used.
 # # This will add 4 graphs to the 'cpu' view.
-# # (i.e. cpu_user and cpu_system for each myhost and myhost1)
+# # (i.e. cpu_user and cpu_system for each myhost0 and myhost1)
 # $host_regex = 'myhost[01]'
 # ganglia::view { 'cpu':
 #   view_type = 'regex',
@@ -651,10 +651,10 @@
 # $plugins - the plugin name (ex: 'diskstat'), will install the Python file
 # located in files/ganglia/plugins/${name}.py and expand the template from
 # templates/ganglia/plugins/${name}.pyconf.erb.
-# Defaults to $title as a convenience
+# Defaults to $title as a convenience.
 #
-# $opts - optional hash which can be used in the template. The defaults are
-# hardcoded in the templates. Default to {}
+# $opts - optional hash which can be used in the template.  The
+# defaults are hardcoded in the templates. Defaults to {}.
 #
 # == Examples:
 #
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index a125e35..48190e5 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -74,7 +74,7 @@
 # Tool Labs is enduser-facing, so we want to control the motd
 # properly (most things make no sense for community users: they
 # don't care that packages need updating, or that filesystems
-# will be checked, for instance)
+# will be checked, for instance).
 
 file { '/etc/update-motd.d':
 ensure  = directory,
@@ -86,7 +86,7 @@
 purge   = true,
 }
 
-# We keep a project-locat apt repo where we stuff packages we build
+# We keep a project-local apt repo where we stuff packages we build
 # that are intended to be local to the project.  By keeping it on the
 # shared storage, we have no need to set up a server to use it.
 
@@ -126,4 +126,3 @@
 target = ${store}/mail,
 }
 }
-

-- 
To view, visit https://gerrit.wikimedia.org/r/107165
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] WIP: Tools: Puppetize LabsDB aliases and /etc/hosts - change (operations/puppet)

2014-01-12 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/107103


Change subject: WIP: Tools: Puppetize LabsDB aliases and /etc/hosts
..

WIP: Tools: Puppetize LabsDB aliases and /etc/hosts

Change-Id: I85375334e8977b0084e88e67cf177581445f6c6b
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/107103/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index dc7d572..2d110b5 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -19,6 +19,23 @@
 include generic::locales::international
 include identd
 
+# Set up host aliases and NAT for LabsDB.
+include role::labsdb::client
+
+# Make tools.wmflabs.org work by aliasing it to tools-webproxy.
+host { 'tools.wmflabs.org':
+ip = '10.4.1.89',
+host_aliases = 'tools';
+}
+
+# TODO: Remove when files have been removed.
+file { '/data/project/.system/hosts':
+ensure = absent;
+}
+file { '/data/project/.system/iptables.conf':
+ensure = absent;
+}
+
 package { [
 # Please keep all packages in each group sorted in alphabetical order
 

-- 
To view, visit https://gerrit.wikimedia.org/r/107103
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85375334e8977b0084e88e67cf177581445f6c6b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WIP: Puppetize aliases and NAT for LabsDB replica servers - change (operations/puppet)

2014-01-11 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/107010


Change subject: WIP: Puppetize aliases and NAT for LabsDB replica servers
..

WIP: Puppetize aliases and NAT for LabsDB replica servers

Change-Id: Ica4e23cfd407348d7553ab5da9eaab088dabc751
---
M manifests/role/db.pp
1 file changed, 528 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/107010/1

diff --git a/manifests/role/db.pp b/manifests/role/db.pp
index 987123c..9f7514a 100644
--- a/manifests/role/db.pp
+++ b/manifests/role/db.pp
@@ -94,6 +94,534 @@
 }
 }
 
+class role::labsdb::client {
+system::role {role::db::client: description = LabsDB client }
+
+# TODO: DRY; this list is (should) already be maintained somewhere.
+# TODO: Using static IP addresses for the LabsDB servers seems bad(TM).
+host { 's1.labsdb':
+ip = '192.168.99.1',
+host_aliases = [ 'enwiki.labsdb' ];
+}
+
+host { 's2.labsdb':
+ip = '192.168.99.2',
+
+host_aliases = [ 'bgwiki.labsdb', 'bgwiktionary.labsdb',
+  'cswiki.labsdb', 'enwikiquote.labsdb',
+  'enwiktionary.labsdb', 'eowiki.labsdb',
+  'fiwiki.labsdb', 'idwiki.labsdb',
+  'itwiki.labsdb', 'nlwiki.labsdb',
+  'nowiki.labsdb', 'plwiki.labsdb',
+  'ptwiki.labsdb', 'svwiki.labsdb',
+  'thwiki.labsdb', 'trwiki.labsdb',
+  'zhwiki.labsdb' ];
+}
+
+host { 's3.labsdb':
+ip = '192.168.99.3',
+host_aliases = [ 'aawiki.labsdb', 'aawikibooks.labsdb',
+  'aawiktionary.labsdb', 'abwiki.labsdb',
+  'abwiktionary.labsdb', 'acewiki.labsdb',
+  'advisorywiki.labsdb', 'afwiki.labsdb',
+  'afwikibooks.labsdb', 'afwikiquote.labsdb',
+  'afwiktionary.labsdb', 'akwiki.labsdb',
+  'akwikibooks.labsdb', 'akwiktionary.labsdb',
+  'alswiki.labsdb', 'alswikibooks.labsdb',
+  'alswikiquote.labsdb',
+  'alswiktionary.labsdb', 'amwiki.labsdb',
+  'amwikiquote.labsdb', 'amwiktionary.labsdb',
+  'angwiki.labsdb', 'angwikibooks.labsdb',
+  'angwikiquote.labsdb',
+  'angwikisource.labsdb',
+  'angwiktionary.labsdb', 'anwiki.labsdb',
+  'anwiktionary.labsdb', 'arcwiki.labsdb',
+  'arwikibooks.labsdb', 'arwikimedia.labsdb',
+  'arwikinews.labsdb', 'arwikiquote.labsdb',
+  'arwikisource.labsdb',
+  'arwikiversity.labsdb',
+  'arwiktionary.labsdb', 'arzwiki.labsdb',
+  'astwiki.labsdb', 'astwikibooks.labsdb',
+  'astwikiquote.labsdb',
+  'astwiktionary.labsdb', 'aswiki.labsdb',
+  'aswikibooks.labsdb', 'aswikisource.labsdb',
+  'aswiktionary.labsdb', 'avwiki.labsdb',
+  'avwiktionary.labsdb', 'aywiki.labsdb',
+  'aywikibooks.labsdb', 'aywiktionary.labsdb',
+  'azwiki.labsdb', 'azwikibooks.labsdb',
+  'azwikiquote.labsdb', 'azwikisource.labsdb',
+  'azwiktionary.labsdb', 'barwiki.labsdb',
+  'bat_smgwiki.labsdb', 'bawiki.labsdb',
+  'bawikibooks.labsdb', 'bclwiki.labsdb',
+  'bdwikimedia.labsdb', 'be_x_oldwiki.labsdb',
+  'betawikiversity.labsdb', 'bewiki.labsdb',
+  'bewikibooks.labsdb', 'bewikimedia.labsdb',
+  'bewikiquote.labsdb', 'bewikisource.labsdb',
+  'bewiktionary.labsdb', 'bgwikibooks.labsdb',
+  'bgwikinews.labsdb', 'bgwikiquote.labsdb',
+  'bgwikisource.labsdb', 'bhwiki.labsdb',
+  'bhwiktionary.labsdb', 'biwiki.labsdb',
+  'biwikibooks.labsdb', 'biwiktionary.labsdb',
+  'bjnwiki.labsdb', 'bmwiki.labsdb',
+  'bmwikibooks.labsdb', 'bmwikiquote.labsdb',
+  'bmwiktionary.labsdb', 'bnwiki.labsdb',
+  'bnwikibooks.labsdb', 'bnwikisource.labsdb',
+  'bnwiktionary.labsdb', 'bowiki.labsdb',
+  'bowikibooks.labsdb', 'bowiktionary.labsdb',
+  'bpywiki.labsdb', 'brwiki.labsdb',
+  

[MediaWiki-commits] [Gerrit] Retrieve $PACKAGE_VERSION from debian/changelog - change (labs/toollabs)

2014-01-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106747


Change subject: Retrieve $PACKAGE_VERSION from debian/changelog
..

Retrieve $PACKAGE_VERSION from debian/changelog

Change-Id: I00d10ca2e1be236334f27d513b130ed922ce9b28
---
M configure.ac
M debian/changelog
2 files changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/47/106747/1

diff --git a/configure.ac b/configure.ac
index 92d1b80..3e95745 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,17 @@
-AC_INIT([toollabs], [1.0.4dev], [mpellet...@wikimedia.org])
+AC_INIT([toollabs], m4_esyscmd_s([sed -ne '1s/^toollabs (\(.\+\)) .*$/\1/p;' 
debian/changelog]), [mpellet...@wikimedia.org])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_TESTDIR([tests])
 
+# If parsing the current version from debian/changelog did not work
+# (debian/changelog mangled, wrong pattern, sed not available, etc.),
+# autoreconf usually aborts with an obscure error message (should be
+# called with package and version arguments).  In case it would
+# nevertheless continue, PACKAGE_VERSION would be empty.  So check
+# that it is set, otherwise abort.
+if test -z $PACKAGE_VERSION; then
+  AC_MSG_ERROR([PACKAGE_VERSION was not properly set.])
+fi
+
 AM_INIT_AUTOMAKE([foreign no-dist silent-rules -Wall -Werror])
 AC_PROG_INSTALL
 AC_PROG_LN_S
diff --git a/debian/changelog b/debian/changelog
index 262df44..0c2d710 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.0.6dev) unstable; urgency=low
+
+  * Retrieve $PACKAGE_VERSION from debian/changelog
+
+ -- Tim Landscheidt t...@tim-landscheidt.de  Fri, 10 Jan 2014 18:11:00 +
+
 toollabs (1.0.5) unstable; urgency=low
 
   * Marc-André Pelletier: jsub should allow -q to override

-- 
To view, visit https://gerrit.wikimedia.org/r/106747
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00d10ca2e1be236334f27d513b130ed922ce9b28
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix Lintian errors in jobutils man pages - change (labs/toollabs)

2014-01-09 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106648


Change subject: Fix Lintian errors in jobutils man pages
..

Fix Lintian errors in jobutils man pages

Change-Id: I28c30499269b3f87a893fcbf5ea780720fd68a5f
---
A debian/jobutils.links
M debian/jobutils.manpages
M jobutils/man/Makefile.am
A jobutils/man/job.1
D jobutils/man/jstart.1
M jobutils/man/jstop.1
M jobutils/man/jsub.1
7 files changed, 115 insertions(+), 71 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/48/106648/1

diff --git a/debian/jobutils.links b/debian/jobutils.links
new file mode 100644
index 000..c3d92ca
--- /dev/null
+++ b/debian/jobutils.links
@@ -0,0 +1,2 @@
+usr/share/man/man1/jsub.1 usr/share/man/man1/jstart.1
+usr/share/man/man1/jsub.1 usr/share/man/man1/qcronsub.1
diff --git a/debian/jobutils.manpages b/debian/jobutils.manpages
index bde9a92..92a5a84 100644
--- a/debian/jobutils.manpages
+++ b/debian/jobutils.manpages
@@ -1,3 +1,3 @@
-debian/tmp/usr/share/man/man1/jstart.1
+debian/tmp/usr/share/man/man1/job.1
 debian/tmp/usr/share/man/man1/jstop.1
 debian/tmp/usr/share/man/man1/jsub.1
diff --git a/jobutils/man/Makefile.am b/jobutils/man/Makefile.am
index c9b180d..77b9af7 100644
--- a/jobutils/man/Makefile.am
+++ b/jobutils/man/Makefile.am
@@ -1 +1 @@
-man_MANS = jstart.1 jstop.1 jsub.1
+man_MANS = job.1 jstop.1 jsub.1
diff --git a/jobutils/man/job.1 b/jobutils/man/job.1
new file mode 100644
index 000..a08c857
--- /dev/null
+++ b/jobutils/man/job.1
@@ -0,0 +1,36 @@
+.\ Man page for job
+.\ Licensed under CC-BY-SA
+.\ Created by Marc-André Pelletier
+.\
+.TH JOB 1 2014-01-10 1.0.5 Wikimedia Labs Tools jobutils
+.SH NAME
+job \- output the job number to a name
+.SH SYNOPSIS
+.B job
+.I jobname
+
+.B job
+\-v
+.I jobname
+
+.B job
+\-q
+.I jobname
+.SH DESCRIPTION
+.B job
+outputs the job number corresponding to
+.I jobname
+on standard output.
+.SH OPTIONS
+.TP
+.B -v
+Output verbose (human readable) information.
+.TP
+.B -q
+Do not output anything, just set exit status.
+.SH EXIT STATUS
+.B job
+returns 0 if no job with that name exists, 1 if such a job is
+currently running and 2 if such a job is currently queued.
+.SH AUTHORS
+Marc-André Pelletier, Petr Bena
diff --git a/jobutils/man/jstart.1 b/jobutils/man/jstart.1
deleted file mode 100644
index 8fb4d2a..000
--- a/jobutils/man/jstart.1
+++ /dev/null
@@ -1,34 +0,0 @@
-.\ Man page for jstart
-.\ Licensed under BSD-like License.
-.\ Created by Marc-André Pelletier
-.\
-.TH Jobutils jstart User Manual
-.SH NAME
-usage: jstart [options...] program [arg...]
-
-Options include many (but not all) qsub options, along with:
- \-stderr   Send errors to stderr rather than the error
-   output file.
- \-mem value  Request value amount of memory for the job.
-   (number prefixed by 'k', 'm' or 'g')
- \-once Only start one job with that name, fail if
-   another is already started or queued (default if
-   invoked as 'jstart').
- \-continuous   Start a self-restarting job on the continuous
-   queue (default if invoked as 'jstart')
- \-umask valueSet umask for output files if they don't exist
- \-quietSuppress output if job could be submitted.
-
-Unlike qsub, if you do not specify output and error files, output is appended
-by default to files named job.err and job.out in your home directory
-(without job numbers), including errors from starting the job itself.
-
-Additionally, you need to provide an executable on the command line,
-jstart will not read a script from standard input.
-
-.SH DESCRIPTION
-jobutils will insert extra commands to grid engine, these tools were created 
for wikimedia tools project
-.PP
-.SH AUTHOR
-Marc-André Pelletier, Petr Bena
-.br
diff --git a/jobutils/man/jstop.1 b/jobutils/man/jstop.1
index 50bea5e..072601f 100644
--- a/jobutils/man/jstop.1
+++ b/jobutils/man/jstop.1
@@ -1,16 +1,17 @@
-.\ Man page for jstart
+.\ Man page for jstop
 .\ Licensed under CC-BY-SA
 .\ Created by Marc-André Pelletier
 .\
-.TH Jobutils jstop User Manual
+.TH JSTOP 1 2014-01-10 1.0.5 Wikimedia Labs Tools jobutils
 .SH NAME
-usage: jstop [jobname]
-
-Delete a job
-
+jstop \- delete a job from the grid
+.SH SYNOPSIS
+.B jstop
+.I jobname
 .SH DESCRIPTION
-jobutils will insert extra commands to grid engine, these tools were created 
for wikimedia tools project
-.PP
-.SH AUTHOR
+.B jstop
+deletes the job with the name
+.I jobname
+from the grid.
+.SH AUTHORS
 Marc-André Pelletier, Petr Bena
-.br
diff --git a/jobutils/man/jsub.1 b/jobutils/man/jsub.1
index 03e5215..ef5d2c2 100644
--- a/jobutils/man/jsub.1
+++ b/jobutils/man/jsub.1
@@ -1,34 +1,73 @@
-.\ Man page for jstart
+.\ Man page for jsub
 .\ Licensed under CC-BY-SA
 .\ Created by Marc-André Pelletier
 .\
-.TH Jobutils jsub User Manual
+.TH JSUB 1 

[MediaWiki-commits] [Gerrit] Fix build and run-time dependencies - change (labs/toollabs)

2014-01-08 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106281


Change subject: Fix build and run-time dependencies
..

Fix build and run-time dependencies

Change-Id: Ia75c85187774f9b674bdcd74b0b2d8842226
---
M debian/control
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/81/106281/1

diff --git a/debian/control b/debian/control
index 1590106..465c5bb 100644
--- a/debian/control
+++ b/debian/control
@@ -5,20 +5,20 @@
 Uploaders: Marc-André Pelletier mpellet...@wikimedia.org,
  Carl Fürstenberg azat...@gmail.com,
  Petr Bena benap...@gmail.com
-Build-Depends: debhelper (= 8.0.0), dh-autoreconf
+Build-Depends: debhelper (= 8.0.0), dh-autoreconf, libipc-run-perl, 
libstring-shellquote-perl
 Standards-Version: 3.9.3
 Vcs-Git: https://gerrit.wikimedia.org/r/labs/toollabs
 Vcs-Browser: https://git.wikimedia.org/summary/labs%2Ftoollabs
 
 Package: misctools
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: ${misc:Depends}
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, gridengine-client, 
libstring-shellquote-perl
+Depends: ${misc:Depends}, ${perl:Depends}, gridengine-client, libipc-run-perl, 
libstring-shellquote-perl
 Description: Set of utilities to use on wikimedia bots and tools cluster
  This package will install jstart (jsub) and jstop, the Tool Labs (more)
  user-friendly wrappers to submit jobs to the gridengine

-- 
To view, visit https://gerrit.wikimedia.org/r/106281
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia75c85187774f9b674bdcd74b0b2d8842226
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Work around pbuilder not properly setting $USER - change (labs/toollabs)

2014-01-08 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106283


Change subject: Work around pbuilder not properly setting $USER
..

Work around pbuilder not properly setting $USER

On su'ing to the build user, pbuilder only sets $LOGNAME to the build
user's name (pbuilder), but leaves $USER as is, i. e. root
(cf. http://bugs.debian.org/677666).  This confuses the test suite.

This change imitates the behaviour of jsub itself: Try $LOGNAME before
using $USER; thus the test suite succeeds when run under pbuilder.

Change-Id: Ia0553ecf802082609e61c5ddb0e6546719297417
---
M tests/testsuite.at
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/83/106283/1

diff --git a/tests/testsuite.at b/tests/testsuite.at
index 8fbba5e..e97f9a5 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -72,17 +72,17 @@
 # These tests will create two files (true.err and true.out) in the
 # home directory of the calling user.
 AT_TOOLLABS_JSUB([Normal call], [true], [Your job 501377 (true) has been 
submitted
-], [], [0], [-e $HOME/true.err -o $HOME/true.out -M $u...@tools.wmflabs.org -N 
true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-e $HOME/true.err -o $HOME/true.out -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [Your job 501377 (true) has been submitted
 ], [], [0])
 AT_TOOLLABS_JSUB([Quiet call], [-quiet true], [Your job 501377 (true) has 
been submitted
-], [], [0], [-e $HOME/true.err -o $HOME/true.out -M $u...@tools.wmflabs.org -N 
true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-e $HOME/true.err -o $HOME/true.out -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [], [], [0])
 
 # Test that umasks are handled properly.
 AT_SETUP([-o points to a non-existing file])
 _AT_TOOLLABS_JSUB([-o does-not-exist.log -quiet true], [Your job 501377 
(true) has been submitted
-], [], [0], [-o does-not-exist.log -e $HOME/true.err -M 
$u...@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-o does-not-exist.log -e $HOME/true.err -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [], [], [0])
 AT_CHECK([stat -c %a does-not-exist.log], [0], [600
 ], [])
@@ -92,7 +92,7 @@
 AT_CHECK([touch does-exist.log], [0], [], [])
 AT_CHECK([chmod 664 does-exist.log], [0], [], [])
 _AT_TOOLLABS_JSUB([-o does-exist.log -quiet true], [Your job 501377 (true) 
has been submitted
-], [], [0], [-o does-exist.log -e $HOME/true.err -M $u...@tools.wmflabs.org -N 
true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-o does-exist.log -e $HOME/true.err -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [], [], [0])
 AT_CHECK([stat -c %a does-exist.log], [0], [664
 ], [])
@@ -100,7 +100,7 @@
 
 AT_SETUP([-o points to a non-existing file and -umask is used])
 _AT_TOOLLABS_JSUB([-o does-not-exist.log -quiet -umask 000 true], [Your job 
501377 (true) has been submitted
-], [], [0], [-o does-not-exist.log -e $HOME/true.err -M 
$u...@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-o does-not-exist.log -e $HOME/true.err -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [], [], [0])
 AT_CHECK([stat -c %a does-not-exist.log], [0], [666
 ], [])
@@ -110,7 +110,7 @@
 AT_CHECK([touch does-exist.log], [0], [], [])
 AT_CHECK([chmod 664 does-exist.log], [0], [], [])
 _AT_TOOLLABS_JSUB([-o does-exist.log -quiet -umask 000 true], [Your job 501377 
(true) has been submitted
-], [], [0], [-o does-exist.log -e $HOME/true.err -M $u...@tools.wmflabs.org -N 
true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-o does-exist.log -e $HOME/true.err -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [], [], [0])
 AT_CHECK([stat -c %a does-exist.log], [0], [664
 ], [])
@@ -119,7 +119,7 @@
 AT_SETUP([-o points to a existing directory])
 AT_CHECK([mkdir does-exist], [0], [], [])
 _AT_TOOLLABS_JSUB([-o does-exist -quiet true], [Your job 501377 (true) has 
been submitted
-], [], [0], [-o does-exist -e $HOME/true.err -M $u...@tools.wmflabs.org -N 
true -hard -l h_vmem=262144k -q task -b y /bin/true
+], [], [0], [-o does-exist -e $HOME/true.err -M 
${LOGNAME:-$USER}@tools.wmflabs.org -N true -hard -l h_vmem=262144k -q task -b 
y /bin/true
 ], [], [], [], [0])
 AT_CHECK([LANG=C ls does-exist/*], [2], [], [ls: cannot access does-exist/*: 
No such file or directory
 ])

-- 
To view, visit https://gerrit.wikimedia.org/r/106283
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Define labs-toollabs-debian-glue separately - change (integration/jenkins-job-builder-config)

2014-01-08 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106295


Change subject: Define labs-toollabs-debian-glue separately
..

Define labs-toollabs-debian-glue separately

Change-Id: I6c50c03f26ed50d40e69e54fd817e45be2d3de0e
---
M labs.yaml
1 file changed, 42 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/95/106295/1

diff --git a/labs.yaml b/labs.yaml
index 553a00c..138abad 100644
--- a/labs.yaml
+++ b/labs.yaml
@@ -15,6 +15,48 @@
 jobs:
  - '{name}-debian-glue'
 
+# TODO: This is a copy of the job template {name}-debian-glue and the
+#   builder debian-glue-lintian to enable --fail-on-warnings for
+#   lintian.  There's probably a subtler way to do this :-).
+- builder:
+name: 'labs-toollabs-lintian'
+builders:
+  - shell: |
+  # We might consider adding --warnings
+  set -o pipefail
+  /usr/bin/lintian-junit-report --filename lintian.txt 
--lintian-opt=--fail-on-warnings *.changes | tee lintian.xml
+  set +o pipefail
+
+- job:
+name: 'labs-toollabs-debian-glue'
+defaults: use-remote-zuul
+node: integration-debian-builder
+triggers:
+ - zuul
+
+# Clone into ./source
+scm:
+ - git:
+url: 'git://zuul.eqiad.wmnet/$ZUUL_PROJECT'
+branches:
+ - '$ZUUL_COMMIT'
+refspec: '$ZUUL_REF'
+basedir: 'source'
+
+builders:
+  - debian-glue-generate-git-snapshot
+  - debian-glue-build-and-provide-package
+  - labs-toollabs-lintian
+  - debian-glue-piuparts
+
+publishers:
+  - junit:
+  results: 'lintian.xml'
+  - tap:
+  results: piuparts.tap
+  - archive:
+  artifacts: 
'*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,lintian.txt,piuparts.*'
+
 - project:
 name: 'labs-tools-grrrit'
 jobs:

-- 
To view, visit https://gerrit.wikimedia.org/r/106295
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c50c03f26ed50d40e69e54fd817e45be2d3de0e
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix anchor links from status to list page - change (labs/toollabs)

2014-01-07 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106173


Change subject: Fix anchor links from status to list page
..

Fix anchor links from status to list page

Change-Id: I9f03ccd994e887bc9fb278bc01c2c0700d1209c0
---
M www/content/status.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/73/106173/1

diff --git a/www/content/status.php b/www/content/status.php
index d424f61..80ba4f4 100644
--- a/www/content/status.php
+++ b/www/content/status.php
@@ -157,7 +157,7 @@
 tr class=jobline-?= $j['state'] ?
   td class=jobno?= $jobid ?/td
   td class=jobname?= htmlspecialchars($j['name']) ?/td
-  td class=jobtoola href=/?list#?= $j['tool'] ??= 
$j['tool'] ?/a/td
+  td class=jobtoola href=/?list#toollist-?= $j['tool'] 
??= $j['tool'] ?/a/td
   td class=jobstate?= ucfirst($j['queue']) ? / ?= 
ucfirst($j['state']) ?/td
   td class=jobtime?= strftime(%F %T, $j['sub']) ?/td
   td class=jobcpu?= humantime($j['cpu']) ?/td

-- 
To view, visit https://gerrit.wikimedia.org/r/106173
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f03ccd994e887bc9fb278bc01c2c0700d1209c0
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Add requested package libjpeg-turbo-progs - change (operations/puppet)

2014-01-04 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/105453


Change subject: Tools: Add requested package libjpeg-turbo-progs
..

Tools: Add requested package libjpeg-turbo-progs

Bug: 59654
Change-Id: I497fc91482f0e73d426c19fca58f60c74cfe980b
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/105453/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 92b7162..692cf53 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -203,6 +203,7 @@
 'libdmtx0a',   # Bug #53867.
 'libfreetype6',
 'libgdal1-1.7.0',  # Bug 56995
+'libjpeg-turbo-progs', # Bug 59654.
 'libmpc2',
 'libmpfr4',
 'libneon27-gnutls',

-- 
To view, visit https://gerrit.wikimedia.org/r/105453
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I497fc91482f0e73d426c19fca58f60c74cfe980b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Install requested package python-pyexiv2 - change (operations/puppet)

2014-01-03 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/105192


Change subject: Tools: Install requested package python-pyexiv2
..

Tools: Install requested package python-pyexiv2

Bug: 59122
Change-Id: I7ce5c5c3ba4104cb5c6030a41f80df8d0627d32d
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/105192/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 92b7162..188d867 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -148,6 +148,7 @@
 'python-opencv',
 'python-oursql',   # For danilo et al.
 'python-problem-report',
+'python-pyexiv2',  # Bug 59122.
 'python-pyinotify',# Bug 57003
 'python-svn',  # Bug 56996
 'python-rsvg', # Bug 56996

-- 
To view, visit https://gerrit.wikimedia.org/r/105192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ce5c5c3ba4104cb5c6030a41f80df8d0627d32d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix build and run-time dependencies - change (labs/toollabs)

2014-01-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104951


Change subject: Fix build and run-time dependencies
..

Fix build and run-time dependencies

Change-Id: Iab527750c55b0d56080cc5d424f0d1532d619e91
---
M debian/control
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/51/104951/1

diff --git a/debian/control b/debian/control
index 1590106..465c5bb 100644
--- a/debian/control
+++ b/debian/control
@@ -5,20 +5,20 @@
 Uploaders: Marc-André Pelletier mpellet...@wikimedia.org,
  Carl Fürstenberg azat...@gmail.com,
  Petr Bena benap...@gmail.com
-Build-Depends: debhelper (= 8.0.0), dh-autoreconf
+Build-Depends: debhelper (= 8.0.0), dh-autoreconf, libipc-run-perl, 
libstring-shellquote-perl
 Standards-Version: 3.9.3
 Vcs-Git: https://gerrit.wikimedia.org/r/labs/toollabs
 Vcs-Browser: https://git.wikimedia.org/summary/labs%2Ftoollabs
 
 Package: misctools
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: ${misc:Depends}
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, gridengine-client, 
libstring-shellquote-perl
+Depends: ${misc:Depends}, ${perl:Depends}, gridengine-client, libipc-run-perl, 
libstring-shellquote-perl
 Description: Set of utilities to use on wikimedia bots and tools cluster
  This package will install jstart (jsub) and jstop, the Tool Labs (more)
  user-friendly wrappers to submit jobs to the gridengine

-- 
To view, visit https://gerrit.wikimedia.org/r/104951
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab527750c55b0d56080cc5d424f0d1532d619e91
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Define labs-toollabs-debbuild and dump tests/testsuite.log o... - change (integration/jenkins-job-builder-config)

2014-01-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104964


Change subject: Define labs-toollabs-debbuild and dump tests/testsuite.log on 
failure
..

Define labs-toollabs-debbuild and dump tests/testsuite.log on failure

Change-Id: I41d3f1b47cd31d83f3b744b189a85a6b9084cc50
---
M labs.yaml
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/64/104964/1

diff --git a/labs.yaml b/labs.yaml
index 553a00c..57202ee 100644
--- a/labs.yaml
+++ b/labs.yaml
@@ -15,6 +15,19 @@
 jobs:
  - '{name}-debian-glue'
 
+- job:
+name: 'labs-toollabs-debbuild'
+node: hasContintPackages
+defaults: use-remote-zuul
+
+scm:
+ - git-deb-package
+
+builders:
+ - shell: 'cd source  uscan --verbose --rename 
--download-current-version'
+ - shell: 'cd source  (dpkg-buildpackage -rfakeroot -us -uc || cat 
tests/testsuite.log)'
+ - shell: 'lintian --info *.deb'
+
 - project:
 name: 'labs-tools-grrrit'
 jobs:

-- 
To view, visit https://gerrit.wikimedia.org/r/104964
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41d3f1b47cd31d83f3b744b189a85a6b9084cc50
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add job for labs/toollabs - change (integration/zuul-config)

2013-12-31 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104747


Change subject: Add job for labs/toollabs
..

Add job for labs/toollabs

Change-Id: I9da6ea332b0854a5cc0f9c516129d060637dad86
---
M layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/47/104747/1

diff --git a/layout.yaml b/layout.yaml
index 2d44461..441fe05 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -820,6 +820,10 @@
   - name: 'python-lint'
 prefix: 'labs-nagios-builder'
 
+  - name: labs/toollabs
+test:
+ - labs-toollabs-debian-glue
+
   - name: labs/tools/grrrit
 check-voter:
  - labs-tools-grrrit-jslint

-- 
To view, visit https://gerrit.wikimedia.org/r/104747
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9da6ea332b0854a5cc0f9c516129d060637dad86
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add job for labs/toollabs - change (integration/jenkins-job-builder-config)

2013-12-31 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104748


Change subject: Add job for labs/toollabs
..

Add job for labs/toollabs

Change-Id: I784a96b6da6620e39e97831c275781cfb19a892c
---
M labs.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/48/104748/1

diff --git a/labs.yaml b/labs.yaml
index 1549fb2..553a00c 100644
--- a/labs.yaml
+++ b/labs.yaml
@@ -11,6 +11,11 @@
  - python-jobs
 
 - project:
+name: 'labs-toollabs'
+jobs:
+ - '{name}-debian-glue'
+
+- project:
 name: 'labs-tools-grrrit'
 jobs:
  - '{name}-jslint'

-- 
To view, visit https://gerrit.wikimedia.org/r/104748
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I784a96b6da6620e39e97831c275781cfb19a892c
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Unreviewed changes to rmtool - change (labs/toollabs)

2013-12-29 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104397


Change subject: Unreviewed changes to rmtool
..

Unreviewed changes to rmtool

Change-Id: Id28309442df5a149031962ea9e6953e8280a41b6
---
M misctools/rmtool
1 file changed, 56 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/97/104397/1

diff --git a/misctools/rmtool b/misctools/rmtool
index 06a7696..e6849a1 100755
--- a/misctools/rmtool
+++ b/misctools/rmtool
@@ -10,8 +10,24 @@
exit 1
 fi
 
+echo Don't forget to remove the entry in ldap first!! Once the record is 
removed, continue
+read p
+
 tool=$1
+toolpath=/data/project/$tool
 dbuser=`echo $1 | sed 's/-//'`
+original_dbuser=$dbuser
+dbuser2=null
+if [ -f $toolpath/replica.my.cnf ];then
+dbuser2=$(sed -n -e /user='\(.*\)'/{;s//\1/;p;} 
$toolpath/replica.my.cnf)
+fi
+using_replica_only=0
+
+if [ ! -f $toolpath/.my.cnf ]  [ -f $toolpath/replica.my.cnf ];then
+   echo Warning: user replica user only!
+   using_replica_only=1
+   dbuser=$dbuser2
+fi
 
 # get a number of users of this name in mysql
 uc=`echo select user from user; | mysql mysql | grep -cE ^$dbuser'$'`
@@ -19,16 +35,48 @@
 echo There is $uc user accounts of name $dbuser in database
 
 if [ $uc -gt 0 ];then
+echo I will now remove the db access, this can\'t be reverted, hit 
enter to continue
+read p
echo Removing db access of $tool
echo drop user $dbuser; | mysql mysql
 fi
 
+if [ -f /var/spool/cron/crontabs/local-$tool ];then
+  echo Attempting to clear the cron
+  rm /var/spool/cron/crontabs/local-$tool
+fi
+
 # get the number of databases for this user
-db=`echo show databases; | mysql mysql | grep -cE ^$dbuser'$'`
+db=`echo show databases; | mysql mysql | grep -cE ^$tool'$'`
 
+  db2=`echo show databases; | mysql mysql | grep -cE ^$dbuser__`
 echo There is $db databases of name $tool in database
+echo There is $db2 databases prefixed with $dbuser in database
 
-if [ $db -gt 0 ];then
+if [ $db2 -gt 0 ];then
+   # backup all databases
+   list=`echo show databases; | mysql mysql | grep -E ^$dbuser__`
+   for database in `echo $list`
+   do
+   echo Backing up database $database
+   if [ -f $toolpath/$database_backup.sql ];then
+   echo Error, there is already a backup file for this 
db, process with manual backup and hit enter
+   read p
+   else
+   mysqldump $database  $toolpath/$database_backup.sql
+echo Removing the database $database
+   echo drop database $database; | mysql mysql
+   fi
+   done
+fi
+
+
+if [ $db -gt 1 ];then
+   echo Warning there are more than 1 databases for this user, please 
proceed with manual backup and hit enter to continue
+   read p
+else
+
+  if [ $db -gt 0 ];then
echo Creating a backup of database $tool
if [ -f /data/project/$tool/database_backup.sql ];then
echo Error there is already a backup file
@@ -41,6 +89,7 @@
mysqldump $dbuser  /data/project/$tool/database_backup.sql
 echo Removing db access of $tool
 echo drop database $dbuser; | mysql mysql
+  fi
 fi
 
 if [ ! -d /data/project/removed_tools ];then
@@ -60,6 +109,7 @@
else
cd /data/project/removed_tools
tar -zcvf $tool.tar.gz $tool
+   chmod 600 $tool.tar.gz
if [ -f /data/project/removed_tools/$tool.tar.gz ];then
echo Deleting project folder
rm -rf /data/project/removed_tools/$tool
@@ -88,4 +138,8 @@
 
 rm /data/project/.system/webservers.lock
 
+if [ -f /data/project/.system/cache/localdb-$tool ];then
+   rm /data/project/.system/cache/localdb-$tool
+fi
+
 echo All data for $tool were cleaned

-- 
To view, visit https://gerrit.wikimedia.org/r/104397
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id28309442df5a149031962ea9e6953e8280a41b6
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de
Gerrit-Reviewer: Petrb benap...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Install requested packages - change (operations/puppet)

2013-12-29 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104401


Change subject: Tools: Install requested packages
..

Tools: Install requested packages

Bug: 54690
Bug: 59083
Change-Id: If8d24dfc8966779f8d3d3db6c17e8015b4f7ad3a
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/104401/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index c4ff43b..61c6153 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -53,6 +53,7 @@
 
 # Perl libraries
 'libbot-basicbot-perl',
+'libbsd-resource-perl',# Bug 54690.
 'libcache-memcached-fast-perl',
 'libclass-data-inheritable-perl',
 'libcommon-sense-perl',
@@ -139,6 +140,7 @@
 'python-irclib',
 'python-keyring',
 'python-launchpadlib',
+'python-lxml', # Bug #59083.
 'python-mysql.connector',
 'python-mysqldb',
 'python-newt',

-- 
To view, visit https://gerrit.wikimedia.org/r/104401
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8d24dfc8966779f8d3d3db6c17e8015b4f7ad3a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Remove obsolete tyrant class/role - change (operations/puppet)

2013-12-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104219


Change subject: Tools: Remove obsolete tyrant class/role
..

Tools: Remove obsolete tyrant class/role

Change-Id: I639206cbfb03a705f9861134eae819ca8d630bad
---
M manifests/role/labs.pp
M modules/toollabs/manifests/exec_environ.pp
D modules/toollabs/manifests/tyrant.pp
3 files changed, 0 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/104219/1

diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 58e1f8f..418bc0f 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -80,12 +80,5 @@
 }
   }
 
-  class tyrant inherits role::labs::tools::config {
-system::role { role::labs::tools::tyrant: description = Tool Labs 
UWSGI emperor }
-class { 'toollabs::tyrant':
-  gridmaster = $grid_master,
-}
-  }
-
 } # class role::labs::tools
 
diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index c4ff43b..5327e9c 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -156,7 +156,6 @@
 'python-sqlalchemy',
 'python-twitter',
 'python-twisted',
-'python-uwsgi',
 'python-virtualenv',
 'python-wadllib',
 'python-webpy',
diff --git a/modules/toollabs/manifests/tyrant.pp 
b/modules/toollabs/manifests/tyrant.pp
deleted file mode 100644
index 8c9298b..000
--- a/modules/toollabs/manifests/tyrant.pp
+++ /dev/null
@@ -1,29 +0,0 @@
-# Class: toollabs::tyrant
-#
-# This role sets up a node as an UWSGI tyrant
-#
-# Parameters:
-#
-# Actions:
-#
-# Requires:
-#
-# Sample Usage:
-#
-class toollabs::tyrant($gridmaster) inherits toollabs {
-include toollabs::infrastructure,
-toollabs::exec_environ
-class { 'gridengine::submit_host':
-gridmaster = $gridmaster,
-}
-
-file { ${store}/submithost-${fqdn}:
-ensure  = file,
-owner   = 'root',
-group   = 'root',
-mode= '0444',
-require = File[$store],
-content = ${ipaddress}\n,
-}
-}
-

-- 
To view, visit https://gerrit.wikimedia.org/r/104219
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I639206cbfb03a705f9861134eae819ca8d630bad
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use absolute paths especially in error pages - change (labs/toollabs)

2013-12-24 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/103641


Change subject: Use absolute paths especially in error pages
..

Use absolute paths especially in error pages

In error pages for example for
https://tools.wmflabs.org/does/not/exist, the path to the
logo and the links to Tools, Status, etc. would be
relative to https://tools.wmflabs.org/does/not/ and thus not
work.

Change-Id: Ie66b19dcd82d0a6910a761d3458d2d4938263f87
---
M www/index.php
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/41/103641/1

diff --git a/www/index.php b/www/index.php
index 25f7505..0cdb89c 100644
--- a/www/index.php
+++ b/www/index.php
@@ -38,7 +38,7 @@
 meta name=publisher content=Wikimedia Foundation /
 meta name=language content=Many /
 meta name=robots content=index, follow /
-link rel=StyleSheet href=style.css type=text/css media=screen /
+link rel=StyleSheet href=/style.css type=text/css media=screen /
 !--[if lt IE 7]
 style media=screen type=text/css
 .col1 {
@@ -77,17 +77,17 @@
   /div
 /div
 div class=col2
-  div id=logoa href=/img src=./Tool_Labs_logo_thumb.png 
width=122 height=138 alt=Wikitech and Wikimedia Labs //a/div
+  div id=logoa href=/img src=/Tool_Labs_logo_thumb.png 
width=122 height=138 alt=Wikitech and Wikimedia Labs //a/div
 
   ul
-lia href=?listTools/a/li
-lia href=?statusStatus/a/li
-lia href=?PrivacyPrivacy policy/a/li
+lia href=/?listTools/a/li
+lia href=/?statusStatus/a/li
+lia href=/?PrivacyPrivacy policy/a/li
   /ul
   emMaintainers:/em
   ul
-lia href=?HelpHelp/a/li
-lia href=?RulesRules/a/li
+lia href=/?HelpHelp/a/li
+lia href=/?RulesRules/a/li
   /ul
 /div
   /div

-- 
To view, visit https://gerrit.wikimedia.org/r/103641
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie66b19dcd82d0a6910a761d3458d2d4938263f87
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix quoting error in generic_vhost.erb - change (operations/puppet)

2013-12-19 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102862


Change subject: Fix quoting error in generic_vhost.erb
..

Fix quoting error in generic_vhost.erb

This change fixes a regression introduced by change
I241aa0190e5407dd66bd30956004603f696df91d and adjusts the indentation.

Apparently there is currently only one use of this template in
manifests/misc/statistics.pp, and that does not utilize ssl =
'true', so this change should not make any SSL webservers
unexpectedly appear from nowhere.

Change-Id: I550489752afa36e46e966ccfdc7ece9fded838db
---
M templates/apache/generic_vhost.erb
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/102862/1

diff --git a/templates/apache/generic_vhost.erb 
b/templates/apache/generic_vhost.erb
index 026b2c3..a8ea804 100644
--- a/templates/apache/generic_vhost.erb
+++ b/templates/apache/generic_vhost.erb
@@ -34,12 +34,12 @@
 /VirtualHost
 % end -%
 
-% if [true, only, redirected].include?(ssl) -%
+% if [true, only, redirected].include?(ssl) -%
 VirtualHost *:443
ServerName %= title %
-   % if aliases.length  0 -%
+% if aliases.length  0 -%
ServerAlias %= aliases.join( ) %
-   % end -%
+% end -%
ServerAdmin r...@wikimedia.org
 
SSLEngine on

-- 
To view, visit https://gerrit.wikimedia.org/r/102862
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I550489752afa36e46e966ccfdc7ece9fded838db
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Add key for MariaDB repository - change (operations/puppet)

2013-12-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102585


Change subject: Tools: Add key for MariaDB repository
..

Tools: Add key for MariaDB repository

Packages from the MariaDB repository were not automatically installed
by Puppet because the signing key was missing in Tools.

The key was identified as 0xcbcb082a1bb943db per
https://mariadb.com/kb/en/installing-mariadb-deb-files/ and downloaded
by:

| gpg --no-default-keyring \
| --keyring modules/toollabs/files/mariadb.gpg \
| --keyserver keyserver.ubuntu.com \
| --recv-key 0xCBCB082A1BB943DB

The content of the keyring can be verified by:

| gpg --no-default-keyring \
| --keyring modules/toollabs/files/mariadb.gpg \
| --fingerprint

Change-Id: I59a32281da2b66779765f662b4a10e0a1594876e
---
A modules/toollabs/files/mariadb.gpg
M modules/toollabs/manifests/init.pp
2 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/102585/1

diff --git a/modules/toollabs/files/mariadb.gpg 
b/modules/toollabs/files/mariadb.gpg
new file mode 100644
index 000..64af3f6
--- /dev/null
+++ b/modules/toollabs/files/mariadb.gpg
Binary files differ
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index d9d52b0..4f8ede9 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -106,6 +106,13 @@
 owner   = 'root',
 group   = 'root',
 }
+file { '/etc/apt/trusted.gpg.d/mariadb.gpg':
+ensure = file,
+source = 'puppet:///modules/toollabs/mariadb.gpg',
+mode = '0444',
+owner = 'root',
+group = 'root',
+}
 
 File | title == '/etc/exim4/exim4.conf' | {
 content = undef,

-- 
To view, visit https://gerrit.wikimedia.org/r/102585
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59a32281da2b66779765f662b4a10e0a1594876e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Work around broken WMF package libvips-dev - change (operations/puppet)

2013-12-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102609


Change subject: Tools: Work around broken WMF package libvips-dev
..

Tools: Work around broken WMF package libvips-dev

The WMF repository has a custom, but broken package libvips-dev that
requires a package libtiff5-alt-dev, but does not provide it.  To work
around this, we pin it so that the vanilla Ubuntu version of
libvips-dev gets preferred.

Bug: 52717
Change-Id: I222736d4053815a3c1feb57f285ccf0f0afac2c2
---
A modules/toollabs/files/wikimedia-tools.pref
M modules/toollabs/manifests/init.pp
2 files changed, 16 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/102609/1

diff --git a/modules/toollabs/files/wikimedia-tools.pref 
b/modules/toollabs/files/wikimedia-tools.pref
new file mode 100644
index 000..1e1b6c7
--- /dev/null
+++ b/modules/toollabs/files/wikimedia-tools.pref
@@ -0,0 +1,4 @@
+Explanation: Work around broken libvips-dev package in WMF repository
+Package: libvips-dev
+Pin: release o=Ubuntu
+Pin-Priority: 2002
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 4f8ede9..6263c34 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -114,6 +114,18 @@
 group = 'root',
 }
 
+# The WMF repository has a custom, but broken package libvips-dev
+# that requires a package libtiff5-alt-dev, but does not provide
+# it.  To work around this, we pin it so that the vanilla Ubuntu
+# version of libvips-dev gets preferred.
+file { '/etc/apt/preferences.d/wikimedia-tools.pref':
+ensure = file,
+source = 'puppet:///modules/toollabs/wikimedia-tools.pref',
+mode = '0444',
+owner = 'root',
+group = 'root',
+}
+
 File | title == '/etc/exim4/exim4.conf' | {
 content = undef,
 source  = [ ${store}/mail-relay, 
'puppet:///modules/toollabs/exim4-norelay.conf' ],
@@ -126,4 +138,3 @@
 target = ${store}/mail,
 }
 }
-

-- 
To view, visit https://gerrit.wikimedia.org/r/102609
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I222736d4053815a3c1feb57f285ccf0f0afac2c2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Fix quoting error - change (operations/puppet)

2013-12-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102613


Change subject: Tools: Fix quoting error
..

Tools: Fix quoting error

$store is a Puppet variable that needs to be substituted by its value
before the command is executed.  This change fixes a regression
introduced by change I748652a44071a98c74637c92f6b66f81213c5b9a.

Change-Id: I9061177e18dc277cb596bd9e0d7db3713314f0a0
---
M modules/toollabs/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/102613/1

diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index d9d52b0..95f3271 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -44,7 +44,7 @@
 }
 
 exec { 'make_known_hosts':
-command = '/bin/cat $store/hostkey-* /etc/ssh/ssh_known_hosts~',
+command = /bin/cat $store/hostkey-* /etc/ssh/ssh_known_hosts~,
 require = File[$store],
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/102613
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9061177e18dc277cb596bd9e0d7db3713314f0a0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Resolve virtual package requirements - change (operations/puppet)

2013-12-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102630


Change subject: Tools: Resolve virtual package requirements
..

Tools: Resolve virtual package requirements

At the moment, we require the virtual packages libpng3-dev and
libxslt-dev.  This leads to Puppet spamming on every run:

| notice: /Stage[main]/Toollabs::Dev_environ/Package[libxslt-dev]/ensure: 
ensure changed 'purged' to 'present'
| notice: /Stage[main]/Toollabs::Dev_environ/Package[libpng3-dev]/ensure: 
ensure changed 'purged' to 'present'

Also, it is not determinate which package is chosen to satisfy the
virtual requirement.  To solve this, we explicitly state which real
packages we require.

Change-Id: Ic0ce42aa96232e26a30b0c652e6ea1920d2e4322
---
M modules/toollabs/manifests/dev_environ.pp
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/102630/1

diff --git a/modules/toollabs/manifests/dev_environ.pp 
b/modules/toollabs/manifests/dev_environ.pp
index d80d717..500918b 100644
--- a/modules/toollabs/manifests/dev_environ.pp
+++ b/modules/toollabs/manifests/dev_environ.pp
@@ -37,7 +37,7 @@
 'libfreetype6-dev',
 'libgdal1-dev',# Bug 56995
 'libmariadbclient-dev',
-'libpng3-dev',
+'libpng12-dev',
 'libproj-dev', # Bug 56995
 'libprotobuf-dev', # Bug 56995
 'libsparsehash-dev',   # Bug 56995
@@ -45,8 +45,7 @@
 'libtool',
 'libvips-dev',
 'libxml2-dev',
-'libxslt-dev',
-'libxslt1-dev', # -- same
+'libxslt1-dev',
 'libzbar-dev', # Bug 56996
 'lintian',
 'links',

-- 
To view, visit https://gerrit.wikimedia.org/r/102630
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0ce42aa96232e26a30b0c652e6ea1920d2e4322
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Labs: Remove Bots project motd - change (operations/puppet)

2013-12-17 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102335


Change subject: Labs: Remove Bots project motd
..

Labs: Remove Bots project motd

The Bots project is deprecated and there are no plans to create new
instances.  Existing instances will not be affected by this removal.

Change-Id: If375e7b200f5f704474adbdfc7c20cdc8c3d90d7
---
D files/labs/bots/motd.tail
D manifests/labs/bots/bots.pp
2 files changed, 0 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/102335/1

diff --git a/files/labs/bots/motd.tail b/files/labs/bots/motd.tail
deleted file mode 100644
index 4b9a6c2..000
--- a/files/labs/bots/motd.tail
+++ /dev/null
@@ -1,20 +0,0 @@
--
-   __
-  (  \_
-  |)  ) ___ _| |_  ___
-  |  __  ( / _ (_   _)/___)
-  | |__)  ) |_| || |_|___ |
-  |__/ \___/  \__|___/
-   project
--
-
-This is a server of the bots project, the collaborative
-environment to run and operate bots for wikimedia projects.
-
-In case you need a help, you can contact one of following sysadmins:
-
-Petrb (petan), Damian Zaremba (Damianz), Ryan Lane,
-Adam Shorland (addshore)
-
-Important:  don't forget to run command log message after every
-   system change
diff --git a/manifests/labs/bots/bots.pp b/manifests/labs/bots/bots.pp
deleted file mode 100644
index efeaeff..000
--- a/manifests/labs/bots/bots.pp
+++ /dev/null
@@ -1,13 +0,0 @@
-# bots.pp
-
-class bots::motd {
-
-   file { '/etc/motd.tail':
-   path   = '/etc/motd.tail',
-   owner  = 'root',
-   group  = 'root',
-   mode   = '0440',
-   source = 'puppet:///files/labs/bots/motd.tail',
-   ensure = 'present';
-   }
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/102335
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If375e7b200f5f704474adbdfc7c20cdc8c3d90d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Unify Tools and Toolsbeta configuration - change (operations/puppet)

2013-12-17 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/102385


Change subject: Tools: Unify Tools and Toolsbeta configuration
..

Tools: Unify Tools and Toolsbeta configuration

To properly test Tools puppetization in Toolsbeta, with the advent of
multi-instance self hosted puppetmasters in Labs, it is easier to use
a dedicated puppetmaster for Toolsbeta and assign standard Tools
roles to the instances.

Both has already been done; the only change with regard to Tools
itself is setting the maildomain conditionally.  This needs to be
verified after merging this change and a subsequent Puppet run on
tools-mail.

Change-Id: I45a27e02ed6616c20189964b2eade5b693b63ead
---
M manifests/role/labs.pp
D manifests/role/labsbeta.pp
2 files changed, 4 insertions(+), 71 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/102385/1

diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 58e1f8f..21f1763 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -64,7 +64,10 @@
   class mailrelay inherits role::labs::tools::config {
 system::role { role::labs::tools::mailrelay: description = Tool Labs 
mail relay }
 class { 'toollabs::mailrelay':
-  maildomain = tools.wmflabs.org,
+  maildomain = $::instanceproject ? {
+'toolsbeta' = tools-beta.wmflabs.org,
+default = tools.wmflabs.org,
+  }
 }
   }
 
diff --git a/manifests/role/labsbeta.pp b/manifests/role/labsbeta.pp
deleted file mode 100644
index 290ba79..000
--- a/manifests/role/labsbeta.pp
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# This is a nice generic place to make project-specific roles with a sane
-# naming scheme.
-#
-
-class role::labs::toolsbeta {
-
-  class config {
-include role::labsnfs::client # temporary measure
-
-$grid_master = toolsbeta-master.pmtpa.wmflabs
-  }
-
-  class bastion inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::bastion: description = Tool Labs 
bastion }
-class { 'toollabs::bastion':
-  gridmaster = $grid_master,
-}
-  }
-
-  class execnode inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::execnode: description = Tool 
Labs execution host }
-class { 'toollabs::execnode':
-  gridmaster = $grid_master,
-}
-  }
-
-  class master inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::master: description = Tool Labs 
gridengine master }
-class { 'toollabs::master': }
-  }
-
-  class shadow inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::shadow: description = Tool Labs 
gridengine shadow (backup) master }
-class { 'toollabs::shadow':
-  gridmaster = $grid_master,
-}
-  }
-
-  class webserver inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::webserver: description = Tool 
Labs webserver }
-class { 'toollabs::webserver':
-  gridmaster = $grid_master,
-}
-  }
-
-  class webproxy inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::webproxy: description = Tool 
Labs web proxy }
-class { 'toollabs::webproxy': }
-  }
-
-  class mailrelay inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::mailrelay: description = Tool 
Labs mail relay }
-class { 'toollabs::mailrelay':
-  maildomain = tools-beta.wmflabs.org,
-}
-  }
-
-  class syslog inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::syslog: description = Central 
logging server for tools and services }
-class { 'toollabs::syslog': }
-  }
-
-  class redis inherits role::labs::toolsbeta::config {
-system::role { role::labs::toolsbeta::redis: description = Server that 
hosts shared Redis instance }
-class { 'toollabs::redis': }
-  }
-
-} # class role::labs::tools
-

-- 
To view, visit https://gerrit.wikimedia.org/r/102385
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45a27e02ed6616c20189964b2eade5b693b63ead
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Add python-oursql to exec_environ - change (operations/puppet)

2013-08-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80327


Change subject: Tools: Add python-oursql to exec_environ
..

Tools: Add python-oursql to exec_environ

Change-Id: I1e3e3b0671a5fe874cc07e7b77dcef31a72fa118
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/80327/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 52fbb55..77e4a7c 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -104,6 +104,7 @@
   'python-mysqldb',
   'python-newt',
   'python-nose',
+  'python-oursql',   # For danilo et al.
   'python-problem-report',
   'python-redis',
   'python-requests',

-- 
To view, visit https://gerrit.wikimedia.org/r/80327
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e3e3b0671a5fe874cc07e7b77dcef31a72fa118
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WIP: Tools: Add infrastructure for AWStats - change (operations/puppet)

2013-08-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80332


Change subject: WIP: Tools: Add infrastructure for AWStats
..

WIP: Tools: Add infrastructure for AWStats

WORK IN PROGRESS, DO NOT COMMIT

This change is part of an effort to simplify and standardize the web
server log creation and distribution.

Previously, access logs were collected in a distributed manner on all
webservers and saved on an NFS share.  Instead this change siphons the
data centrally from the web proxy.

A significant problem for the processing of the log data by AWStats is
the daily log rotation.  Synchronizing this process between different
hosts, perhaps even a grid job, is nontrivial.  Instead, we run the
AWStats update process on the web proxy, hourly per cron and on demand
from logrotate.  The memory and CPU footprint of the AWStats update
process is small enough that there is no concern that this could
impede the proxy's performance so it does not warrant replacing the
direct execution of the AWStats update process with for example a
spool system.

To redact the log, we use a sed command instead of logsplitter so that
we do not have to worry about managing the latter's compilation and
deployment.

Another challenge is redundancy of data.  While we could save the
redacted version of the log to disk, it is not necessary from a time
or load viewpoint compared to dynamic redaction.  Also, as this would
likely mean that the redacted log would be in the realm of the awstats
tool but writable by root as the web server process, we would have to
be very careful to not open up security holes.  Instead we rely on
dynamic redaction and sudo for privileges.

Change-Id: Ic7c542214c754e0e790308b1fae1aeba1cc2890a
---
A modules/toollabs/files/awstats/awstats-filter.sh
A modules/toollabs/files/awstats/logrotate
A modules/toollabs/files/awstats/sudoers
M modules/toollabs/manifests/webproxy.pp
4 files changed, 56 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/80332/1

diff --git a/modules/toollabs/files/awstats/awstats-filter.sh 
b/modules/toollabs/files/awstats/awstats-filter.sh
new file mode 100644
index 000..38db36a
--- /dev/null
+++ b/modules/toollabs/files/awstats/awstats-filter.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# This file is managed by Puppet.
+
+exec sed -ne 's/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+ - - \(\[[^]]\+\]\) 
\(GET\) \/\([^\/]\+\)\/.* \(HTTP\/1.1\) \([0-9]\{3\}\) \([0-9]\+\) 
.*$/127.0.0.1 - - \1 \2 \/\3 \4 \5 \6/p;' /var/log/apache2/access.log
diff --git a/modules/toollabs/files/awstats/logrotate 
b/modules/toollabs/files/awstats/logrotate
new file mode 100644
index 000..f968d18
--- /dev/null
+++ b/modules/toollabs/files/awstats/logrotate
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# This file is managed by Puppet.
+
+exec /usr/bin/sudo -niu local-awstats /data/project/awstats/refresh-awstats.sh
diff --git a/modules/toollabs/files/awstats/sudoers 
b/modules/toollabs/files/awstats/sudoers
new file mode 100644
index 000..20f2bb0
--- /dev/null
+++ b/modules/toollabs/files/awstats/sudoers
@@ -0,0 +1,5 @@
+# sudo policy for AWStats.
+
+# This file is managed by Puppet.
+
+local-awstats tools-webproxy = NOPASSWD: /usr/local/sbin/awstats-filter.sh
diff --git a/modules/toollabs/manifests/webproxy.pp 
b/modules/toollabs/manifests/webproxy.pp
index eb044f6..4dc08f8 100644
--- a/modules/toollabs/manifests/webproxy.pp
+++ b/modules/toollabs/manifests/webproxy.pp
@@ -14,5 +14,45 @@
   include toollabs::infrastructure
 
   #TODO: apache config
-}
 
+  # AWStats infrastructure.
+  file { /usr/local/sbin/awstats-filter.sh:
+ensure = file,
+mode = 0755,
+owner = root,
+group = root,
+source = puppet:///modules/toollabs/awstats/awstats-filter.sh;
+  }
+
+  file { /etc/logrotate.d/httpd-prerotate:
+ensure = directory,
+mode = 0755,
+owner = root,
+group = root;
+  }
+
+  file { /etc/logrotate.d/httpd-prerotate/awstats.sh:
+ensure = file,
+mode = 0755,
+owner = root,
+group = root,
+require = File[/etc/logrotate.d/httpd-prerotate],
+source = puppet:///modules/toollabs/awstats/logrotate;
+  }
+
+  file { /etc/sudoers.d/awstats:
+ensure = file,
+mode = 0440,
+owner = root,
+group = root,
+source = puppet:///modules/toollabs/awstats/sudoers;
+  }
+
+  cron { awstats-update:
+ensure = present,
+minute = 14,
+hour = *,
+user = local-awstats,
+command = /data/project/awstats/refresh-awstats.sh;
+  }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/80332
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7c542214c754e0e790308b1fae1aeba1cc2890a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___

[MediaWiki-commits] [Gerrit] Tools: Add python-beautifulsoup to exec_environ. - change (operations/puppet)

2013-08-19 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/79921


Change subject: Tools: Add python-beautifulsoup to exec_environ.
..

Tools: Add python-beautifulsoup to exec_environ.

Change-Id: Iace9084770311f408c531ee1e2ca2b057f1ea81e
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/79921/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index eab5f06..66234be 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -80,6 +80,7 @@
 
   # Python libraries
   'python-apport',
+  'python-beautifulsoup',# For valhallasw.
   'python-celery',
   'python-celery-with-redis',
   'python-egenix-mxdatetime',

-- 
To view, visit https://gerrit.wikimedia.org/r/79921
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iace9084770311f408c531ee1e2ca2b057f1ea81e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Puppetize tips.sh - change (operations/puppet)

2013-08-09 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/78486


Change subject: Tools: Puppetize tips.sh
..

Tools: Puppetize tips.sh

Change-Id: Iad5685e0fe559108d36ae50d43c28fcce809eace
---
A modules/toollabs/files/tips.sh
M modules/toollabs/manifests/bastion.pp
2 files changed, 60 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/78486/1

diff --git a/modules/toollabs/files/tips.sh b/modules/toollabs/files/tips.sh
new file mode 100644
index 000..34551ca
--- /dev/null
+++ b/modules/toollabs/files/tips.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Disable when non-interactive.
+if ! tty -s; then
+exit 0
+fi
+
+# Check if user wants to display tips.
+if [ -f ~/.suppresstips ]; then
+exit 0
+fi
+
+# Check if there is a tip DB.
+if [ ! -f /data/project/.system/tips ]; then
+exit 0
+fi
+
+# Don't display tips for root and tool accounts.
+if [ $UID -eq 0 ] || [ ${USER:0:6} = local- ]; then
+exit 0
+fi
+
+# Check shell level.
+if [ $SHLVL -gt 1 ]; then
+exit 0
+fi
+
+# If user is sysadmin print the sysadmin motd instead.
+if groups | fgrep -qw local-admin; then
+if [ -f /etc/motd.sysadmin ]; then
+echo
+echo
+cat /etc/motd.sysadmin
+fi
+
+# We don't want to show tips to sysadmins.
+exit 0
+fi
+
+echo -e \n\033[0;1;4mDid you know\033[0m that `shuf -n 1 
/data/project/.system/tips`\n
diff --git a/modules/toollabs/manifests/bastion.pp 
b/modules/toollabs/manifests/bastion.pp
index 2e17bb0..ecb7b8c 100644
--- a/modules/toollabs/manifests/bastion.pp
+++ b/modules/toollabs/manifests/bastion.pp
@@ -45,6 +45,26 @@
 source = puppet:///modules/toollabs/sql,
   }
 
+  # Display tips.
+  package { 'grep':
+ensure = present,
+  }
+
+  file { /etc/profile.d/tips.sh:
+ensure = file,
+mode = 0755,
+owner = root,
+group = root,
+source = puppet:///modules/toollabs/tips.sh,
+require = Package['grep'],
+  }
+
+  file { [ '/data/project/.system/tips.sh',
+   '/data/project/.system/bin/tips.sh',
+   '/data/project/.system/bin/tips2.sh' ]:
+ensure = absent,
+  }
+
   package { [ 'jobutils', 'misctools' ]:
 ensure = latest,
   }

-- 
To view, visit https://gerrit.wikimedia.org/r/78486
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad5685e0fe559108d36ae50d43c28fcce809eace
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WORK IN PROGRESS: Add robots.txt - change (labs/toollabs)

2013-08-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77916


Change subject: WORK IN PROGRESS: Add robots.txt
..

WORK IN PROGRESS: Add robots.txt

Change-Id: Iae5afae0985e0209677074b07f5f663efb17ffa4
---
A www/robots.txt
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/16/77916/1

diff --git a/www/robots.txt b/www/robots.txt
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/www/robots.txt

-- 
To view, visit https://gerrit.wikimedia.org/r/77916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae5afae0985e0209677074b07f5f663efb17ffa4
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Enable Ganglia monitoring for Redis - change (operations/puppet)

2013-08-05 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77722


Change subject: Tools: Enable Ganglia monitoring for Redis
..

Tools: Enable Ganglia monitoring for Redis

Change-Id: Id9e9745e13759a46cdc8ec3feb853cda349074c6
---
M modules/toollabs/manifests/redis.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/77722/1

diff --git a/modules/toollabs/manifests/redis.pp 
b/modules/toollabs/manifests/redis.pp
index 5ed66ee..9c88499 100644
--- a/modules/toollabs/manifests/redis.pp
+++ b/modules/toollabs/manifests/redis.pp
@@ -38,4 +38,7 @@
 },
 monitor = true
 }
+
+# Enable Ganglia monitoring.
+include redis::ganglia
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/77722
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9e9745e13759a46cdc8ec3feb853cda349074c6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Enable Ganglia monitoring for Exim - change (operations/puppet)

2013-08-05 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77848


Change subject: Tools: Enable Ganglia monitoring for Exim
..

Tools: Enable Ganglia monitoring for Exim

Change-Id: I4146115a54f26eef75dc998bf28ed8a4b983e946
---
M modules/toollabs/manifests/mailrelay.pp
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/77848/1

diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index 148eb96..81493e2 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -37,5 +37,21 @@
 source =  puppet:///modules/toollabs/exim4.default.mailrelay,
 notify = Service['exim4'],
   }
+
+  # Enable Ganglia monitoring.
+  file { '/usr/local/bin/collect_exim_stats_via_gmetric':
+owner = 'root',
+group = 'root',
+mode = 0755,
+source = 'puppet:///files/ganglia/collect_exim_stats_via_gmetric';
+  }
+
+  cron {
+'collect_exim_stats_via_gmetric':
+  user = 'root',
+  command = '/usr/local/bin/collect_exim_stats_via_gmetric',
+  require = File['/usr/local/bin/collect_exim_stats_via_gmetric'],
+  ensure = present;
+  }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/77848
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4146115a54f26eef75dc998bf28ed8a4b983e946
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Grid Engine: Link to accounting instead of pulling it - change (operations/puppet)

2013-08-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77452


Change subject: Grid Engine: Link to accounting instead of pulling it
..

Grid Engine: Link to accounting instead of pulling it

The initial thought behind pulling the accounting file to the local
machine was that in that way qacct did not need network availability
to work.  However, as when /data/project is not accessible the host is
not really usable at all, we can replace the pull with a symbolic
link.

Change-Id: Ia308ce1c140813df5bc31b71cb839184c12a53ba
---
M modules/gridengine/manifests/submit_host.pp
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/77452/1

diff --git a/modules/gridengine/manifests/submit_host.pp 
b/modules/gridengine/manifests/submit_host.pp
index 76e2d80..e22e028 100644
--- a/modules/gridengine/manifests/submit_host.pp
+++ b/modules/gridengine/manifests/submit_host.pp
@@ -11,10 +11,12 @@
 }
 
 cron { pull-accounting-from-shared:
-  command = cp -f /data/project/.system/accounting 
/var/lib/gridengine/default/common/accounting.tmp  mv -f 
/var/lib/gridengine/default/common/accounting.tmp 
/var/lib/gridengine/default/common/accounting,
-  user = root,
-  minute = [1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56],
-  ensure = present;
+  ensure = absent,
+}
+
+file { /var/lib/gridengine/default/common/accounting:
+  ensure = link,
+  target = /data/project/.system/accounting,
 }
 
 # Not actually possible in the labs

-- 
To view, visit https://gerrit.wikimedia.org/r/77452
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia308ce1c140813df5bc31b71cb839184c12a53ba
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Allow bastions to access other hosts with HBA - change (operations/puppet)

2013-08-01 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77144


Change subject: Tools: Allow bastions to access other hosts with HBA
..

Tools: Allow bastions to access other hosts with HBA

This sets HostbasedAuthentication and EnableSSHKeysign to yes in
/etc/ssh_config.

Change-Id: I42f9f55641d82beb0191924a0bc7657e4987d28e
---
A modules/toollabs/files/bastion-ssh_config
M modules/toollabs/manifests/bastion.pp
2 files changed, 65 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/77144/1

diff --git a/modules/toollabs/files/bastion-ssh_config 
b/modules/toollabs/files/bastion-ssh_config
new file mode 100644
index 000..cf234e1
--- /dev/null
+++ b/modules/toollabs/files/bastion-ssh_config
@@ -0,0 +1,57 @@
+# This file is managed by puppet!
+
+# This is the ssh client system-wide configuration file.  See
+# ssh_config(5) for more information.  This file provides defaults for
+# users, and the values can be changed in per-user configuration files
+# or on the command line.
+
+# Configuration data is parsed as follows:
+#  1. command line options
+#  2. user-specific file
+#  3. system-wide file
+# Any configuration value is only changed the first time it is set.
+# Thus, host-specific definitions should be at the beginning of the
+# configuration file, and defaults at the end.
+
+# Site-wide defaults for some commonly used options.  For a comprehensive
+# list of available options, their meanings and defaults, please see the
+# ssh_config(5) man page.
+
+Host *
+#   ForwardAgent no
+#   ForwardX11 no
+#   ForwardX11Trusted yes
+#   RhostsRSAAuthentication no
+#   RSAAuthentication yes
+#   PasswordAuthentication yes
+#   GSSAPIAuthentication no
+#   GSSAPIDelegateCredentials no
+#   GSSAPIKeyExchange no
+#   GSSAPITrustDNS no
+#   BatchMode no
+#   CheckHostIP yes
+#   AddressFamily any
+#   ConnectTimeout 0
+#   StrictHostKeyChecking ask
+#   IdentityFile ~/.ssh/identity
+#   IdentityFile ~/.ssh/id_rsa
+#   IdentityFile ~/.ssh/id_dsa
+#   Port 22
+#   Protocol 2,1
+#   Cipher 3des
+#   Ciphers 
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
+#   MACs hmac-md5,hmac-sha1,umac...@openssh.com,hmac-ripemd160
+#   EscapeChar ~
+#   Tunnel no
+#   TunnelDevice any:any
+#   PermitLocalCommand no
+#   VisualHostKey no
+#   ProxyCommand ssh -q -W %h:%p gateway.example.com
+SendEnv LANG LC_*
+HashKnownHosts yes
+GSSAPIAuthentication yes
+GSSAPIDelegateCredentials no
+
+# Enable accessing other hosts with host-based authentication.
+HostbasedAuthentication yes
+EnableSSHKeysign yes
diff --git a/modules/toollabs/manifests/bastion.pp 
b/modules/toollabs/manifests/bastion.pp
index 2e17bb0..07daef8 100644
--- a/modules/toollabs/manifests/bastion.pp
+++ b/modules/toollabs/manifests/bastion.pp
@@ -16,6 +16,14 @@
 toollabs::exec_environ,
 toollabs::dev_environ
 
+  file { /etc/ssh/ssh_config:
+ensure = file,
+mode = 0444,
+owner = root,
+group = root,
+source = puppet:///modules/toollabs/files/bastion-ssh_config,
+  }
+
   class { 'gridengine::submit_host':
 gridmaster = $gridmaster,
   }

-- 
To view, visit https://gerrit.wikimedia.org/r/77144
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42f9f55641d82beb0191924a0bc7657e4987d28e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tools: Manage obsolete files in /usr/local/bin - change (operations/puppet)

2013-08-01 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77234


Change subject: Tools: Manage obsolete files in /usr/local/bin
..

Tools: Manage obsolete files in /usr/local/bin

/usr/local/bin had some obsolete versions of scripts that since then
have been moved to /usr/bin.  To properly manage those, we add
symbolic links pointing to /usr/bin.  Also, the requirement of the
jobutils package is moved from toollabs::bastion and
toollabs::webserver to gridengine::submit_host.

Change-Id: I28ff4ea1806f0f58e1738cf8194f44ea49085608
---
M modules/gridengine/manifests/submit_host.pp
M modules/toollabs/manifests/bastion.pp
M modules/toollabs/manifests/webserver.pp
3 files changed, 17 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/77234/1

diff --git a/modules/gridengine/manifests/submit_host.pp 
b/modules/gridengine/manifests/submit_host.pp
index 76e2d80..68fe717 100644
--- a/modules/gridengine/manifests/submit_host.pp
+++ b/modules/gridengine/manifests/submit_host.pp
@@ -6,7 +6,7 @@
gridmaster = $gridmaster,
}
 
-package { gridengine-client:
+package { [ gridengine-client, jobutils ]:
 ensure = latest,
 }
 
@@ -17,6 +17,14 @@
   ensure = present;
 }
 
+# Temporary hack to manage obsolete files in /usr/local/bin.
+# TODO: Remove when no longer needed.
+file { [ /usr/local/bin/job, /usr/local/bin/jstart,
+ /usr/local/bin/jstop, /usr/local/bin/jsub]:
+  ensure = link,
+  target = regsubst(name, ^/usr/local/bin/, /usr/bin/)
+}
+
 # Not actually possible in the labs
 #  @@sshkey { $fqdn:
 #  ensure = present,
diff --git a/modules/toollabs/manifests/bastion.pp 
b/modules/toollabs/manifests/bastion.pp
index 2e17bb0..c3a037c 100644
--- a/modules/toollabs/manifests/bastion.pp
+++ b/modules/toollabs/manifests/bastion.pp
@@ -45,10 +45,17 @@
 source = puppet:///modules/toollabs/sql,
   }
 
-  package { [ 'jobutils', 'misctools' ]:
+  package { misctools:
 ensure = latest,
   }
 
+  # Temporary hack to manage obsolete files in /usr/local/bin.
+  # TODO: Remove when no longer needed.
+  file { /usr/local/bin/become:
+ensure = link,
+target = /usr/bin/become
+  }
+
   # TODO: cron setup
 }
 
diff --git a/modules/toollabs/manifests/webserver.pp 
b/modules/toollabs/manifests/webserver.pp
index e700a27..6ff3ffa 100644
--- a/modules/toollabs/manifests/webserver.pp
+++ b/modules/toollabs/manifests/webserver.pp
@@ -25,12 +25,6 @@
 ensure = present
   }
 
-  package { [
-  'jobutils',
-  ]:
-ensure = latest
-  }
-
   file { $store/submithost-$fqdn:
 ensure = file,
 owner = 'root',

-- 
To view, visit https://gerrit.wikimedia.org/r/77234
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28ff4ea1806f0f58e1738cf8194f44ea49085608
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add mariadb-client to toollabs's exec_environ - change (operations/puppet)

2013-07-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71636


Change subject: Add mariadb-client to toollabs's exec_environ
..

Add mariadb-client to toollabs's exec_environ

Change-Id: If1d49c18e48e8348cc6a091df101d7a27daa528f
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/71636/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 07619c7..ffd6e37 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -20,6 +20,7 @@
   include identd
 
   package { [
+  'mariadb-client',  # For /usr/bin/mysql.
   'mdbtools',# Bug #48805.
   'python-genshi',   # Bug #48863.
   'python-genshi-doc',   # Bug #48863.

-- 
To view, visit https://gerrit.wikimedia.org/r/71636
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1d49c18e48e8348cc6a091df101d7a27daa528f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add packages for Checkwiki to toollabs's exec_environ - change (operations/puppet)

2013-07-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71657


Change subject: Add packages for Checkwiki to toollabs's exec_environ
..

Add packages for Checkwiki to toollabs's exec_environ

Change-Id: I7bcd837e5e28f94258504d3489a3b9fa631afb3a
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/71657/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index ffd6e37..ae18246 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -20,6 +20,9 @@
   include identd
 
   package { [
+  'libdata-compare-perl',# For Checkwiki.
+  'libtest-exception-perl',  # For Checkwiki.
+  'libxml-xpathengine-perl', # For Checkwiki.
   'mariadb-client',  # For /usr/bin/mysql.
   'mdbtools',# Bug #48805.
   'python-genshi',   # Bug #48863.

-- 
To view, visit https://gerrit.wikimedia.org/r/71657
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bcd837e5e28f94258504d3489a3b9fa631afb3a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Package take - change (labs/toollabs)

2013-06-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71112


Change subject: Package take
..

Package take

Change-Id: I8ada3b5000be02e5750f7f69a7ca7f8f6caea8f0
---
M Makefile.am
M configure.ac
M debian/misctools.install
M debian/rules
A src/.gitignore
A src/Makefile.am
6 files changed, 17 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/12/71112/1

diff --git a/Makefile.am b/Makefile.am
index 774dde8..3a64156 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1 @@
-SUBDIRS = jobutils misctools
+SUBDIRS = jobutils misctools src
diff --git a/configure.ac b/configure.ac
index 3adb2c6..11af986 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,11 +4,13 @@
 AM_INIT_AUTOMAKE([foreign no-dist silent-rules -Wall -Werror])
 AC_PROG_INSTALL
 AC_PROG_LN_S
+AC_PROG_CXX
 
 AC_CONFIG_FILES([Makefile
  jobutils/Makefile
  jobutils/bin/Makefile
  jobutils/man/Makefile
- misctools/Makefile])
+ misctools/Makefile
+ src/Makefile])
 
 AC_OUTPUT
diff --git a/debian/misctools.install b/debian/misctools.install
index 20e481b..f383236 100644
--- a/debian/misctools.install
+++ b/debian/misctools.install
@@ -1,3 +1,4 @@
 usr/bin/become
+usr/bin/take
 usr/sbin/rmtool
 usr/sbin/toolwatcher
diff --git a/debian/rules b/debian/rules
index cc628e0..29a6355 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,6 +20,11 @@
 %:
dh $@ --with autoreconf
 
+# Make take setuid.
+override_dh_fixperms:
+   dh_fixperms
+   chmod u+s debian/misctools/usr/bin/take
+
 # Test that Perl scripts not have compilation errors.
 override_dh_auto_test:
perl -cw jobutils/bin/job
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 000..5f96fc7
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,4 @@
+/Makefile
+/Makefile.in
+/take
+/take.o
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 000..6541b6b
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,3 @@
+bin_PROGRAMS = take
+
+take_SOURCES = take.cc

-- 
To view, visit https://gerrit.wikimedia.org/r/71112
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ada3b5000be02e5750f7f69a7ca7f8f6caea8f0
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Move test suite from debian/rules to autotools - change (labs/toollabs)

2013-06-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71114


Change subject: Move test suite from debian/rules to autotools
..

Move test suite from debian/rules to autotools

Change-Id: Ibfb5e4d0d254a51e1463997f4a99722f5502e1d6
---
M Makefile.am
M configure.ac
M debian/rules
A tests/.gitignore
A tests/Makefile.am
A tests/testsuite.at
6 files changed, 65 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/14/71114/1

diff --git a/Makefile.am b/Makefile.am
index 3a64156..f7532e4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1 @@
-SUBDIRS = jobutils misctools src
+SUBDIRS = jobutils misctools src tests
diff --git a/configure.ac b/configure.ac
index 11af986..92d1b80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 AC_INIT([toollabs], [1.0.4dev], [mpellet...@wikimedia.org])
 AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_TESTDIR([tests])
 
 AM_INIT_AUTOMAKE([foreign no-dist silent-rules -Wall -Werror])
 AC_PROG_INSTALL
@@ -11,6 +12,7 @@
  jobutils/bin/Makefile
  jobutils/man/Makefile
  misctools/Makefile
- src/Makefile])
+ src/Makefile
+ tests/Makefile])
 
 AC_OUTPUT
diff --git a/debian/rules b/debian/rules
index 29a6355..9abbdf3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,8 +24,3 @@
 override_dh_fixperms:
dh_fixperms
chmod u+s debian/misctools/usr/bin/take
-
-# Test that Perl scripts not have compilation errors.
-override_dh_auto_test:
-   perl -cw jobutils/bin/job
-   perl -cw jobutils/bin/jsub
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 000..6d95a17
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,6 @@
+/Makefile
+/Makefile.in
+/atconfig
+/package.m4
+/testsuite
+/testsuite.log
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 000..431f129
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,35 @@
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+   :;{ \
+ echo '# Signature of the current package.'  \
+ echo 'm4_define([AT_PACKAGE_NAME],'  \
+ echo '  [$(PACKAGE_NAME)])'  \
+ echo 'm4_define([AT_PACKAGE_TARNAME],'  \
+ echo '  [$(PACKAGE_TARNAME)])'  \
+ echo 'm4_define([AT_PACKAGE_VERSION],'  \
+ echo '  [$(PACKAGE_VERSION)])'  \
+ echo 'm4_define([AT_PACKAGE_STRING],'  \
+ echo '  [$(PACKAGE_STRING)])'  \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT],'  \
+ echo '  [$(PACKAGE_BUGREPORT)])'; \
+ echo 'm4_define([AT_PACKAGE_URL],'  \
+ echo '  [$(PACKAGE_URL)])'; \
+   } '$(srcdir)/package.m4'
+
+TESTSUITE = $(srcdir)/testsuite
+
+check-local: atconfig $(TESTSUITE)
+   $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
+
+installcheck-local: atconfig $(TESTSUITE)
+   $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
+ $(TESTSUITEFLAGS)
+
+clean-local:
+   test ! -f '$(TESTSUITE)' || \
+$(SHELL) '$(TESTSUITE)' --clean
+
+AUTOM4TE = $(SHELL) $(top_srcdir)/build-aux/missing --run autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
+   $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+   mv $@.tmp $@
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644
index 000..8c0cead
--- /dev/null
+++ b/tests/testsuite.at
@@ -0,0 +1,20 @@
+# Test suite for toollabs.
+
+# Initialize autotest.
+AT_INIT()
+AT_COLOR_TESTS()
+
+# AT_TOOLLABS_PERL_COMPILE(FILE)
+# --
+# Test if FILE is compilable with perl -cw.  FILE is relative to the
+# top source directory.
+m4_define([AT_TOOLLABS_PERL_COMPILE],
+[AT_SETUP([Checking $1 for compilation errors])
+AT_CHECK_UNQUOTED([perl -cw $top_srcdir/$1], [0], [], [$top_srcdir/$1 syntax OK
+])
+AT_CLEANUP()
+])
+
+# Test that Perl scripts do not have compilation errors.
+AT_TOOLLABS_PERL_COMPILE([jobutils/bin/job])
+AT_TOOLLABS_PERL_COMPILE([jobutils/bin/jsub])

-- 
To view, visit https://gerrit.wikimedia.org/r/71114
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfb5e4d0d254a51e1463997f4a99722f5502e1d6
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add tests for jsub - change (labs/toollabs)

2013-06-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71115


Change subject: Add tests for jsub
..

Add tests for jsub

Change-Id: Ic7300c6c3c54b62ffa8508330920dc72f95a3bd1
---
M jobutils/bin/jsub
M tests/Makefile.am
A tests/dummy.sh
M tests/testsuite.at
4 files changed, 135 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/15/71115/1

diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index 20f683a..4c6098a 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -246,7 +246,7 @@
   push @args, '-q', $queue, '-b', 'y', $prog, @ARGV;
 }
 
-my $h = harness(['/usr/bin/qsub', @args], \$qsubinput, \$qsuboutput, 
\$qsuberror);
+my $h = harness([exists ($ENV {'JOBUTILS_QSUB'}) ? $ENV {'JOBUTILS_QSUB'} : 
'/usr/bin/qsub', @args], \$qsubinput, \$qsuboutput, \$qsuberror);
 if (!run ($h)) {
 print STDOUT $qsuboutput;
 print STDERR $qsuberror;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 431f129..f0ee409 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,7 +18,8 @@
 TESTSUITE = $(srcdir)/testsuite
 
 check-local: atconfig $(TESTSUITE)
-   $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
+   $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH=jobutils/bin:tests \
+ $($(TESTSUITEFLAGS)
 
 installcheck-local: atconfig $(TESTSUITE)
$(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
@@ -33,3 +34,5 @@
 $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
mv $@.tmp $@
+
+check_SCRIPTS = dummy.sh
diff --git a/tests/dummy.sh b/tests/dummy.sh
new file mode 100755
index 000..c2d56e6
--- /dev/null
+++ b/tests/dummy.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# This script dumps arguments to dummy.args, STDIN to dummy.in,
+# dummy.out to STDOUT, dummy.err to STDERR and exits with the status
+# contained in dummy.exitcode.
+
+# Abort on any error.
+set -e
+
+if [ $# -gt 0 ]; then
+  while [ $# -gt 1 ]; do
+printf '%q ' $1
+shift
+  done
+  printf '%q\n' $1
+fi  dummy.args
+cat  dummy.in
+cat dummy.out
+cat dummy.err 12
+
+read EXITCODE  dummy.exitcode
+
+exit $EXITCODE
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 8c0cead..dce1ced 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -15,6 +15,113 @@
 AT_CLEANUP()
 ])
 
+# _AT_TOOLLABS_JSUB(ARGS,
+#   OUTPUT,
+#   ERROR,
+#   STATUS,
+#   EXPARGS,
+#   EXPINPUT,
+#   EXPOUTPUT,
+#   EXPERROR,
+#   EXPSTATUS)
+# --
+# Check if jsub called with ARGS calls a qsub mock-up with EXPARGS and
+# EXPINPUT and upon receiving OUTPUT, ERROR and STATUS from a spawned
+# qsub mock-up produces EXPOUTPUT, EXPERROR and EXPSTATUS
+# respectively.
+m4_define([_AT_TOOLLABS_JSUB],
+[AT_DATA([dummy.out], [$2])
+AT_DATA([dummy.err], [$3])
+AT_DATA([dummy.exitcode], [$4
+])
+AT_CHECK([JOBUTILS_QSUB=dummy.sh jsub $1], [$9], [$7], [$8])
+AT_CHECK_UNQUOTED([cat dummy.args], [0], [$5], [])
+AT_CHECK([cat dummy.in], [0], [$6], [])
+])
+
+# AT_TOOLLABS_JSUB(TEST-GROUP-NAME,
+#  ARGS,
+#  OUTPUT,
+#  ERROR,
+#  STATUS,
+#  EXPARGS,
+#  EXPINPUT,
+#  EXPOUTPUT,
+#  EXPERROR,
+#  EXPSTATUS)
+# -
+# Test if jsub called with ARGS calls a qsub mock-up with EXPARGS and
+# EXPINPUT and upon receiving OUTPUT, ERROR and STATUS from a spawned
+# qsub mock-up produces EXPOUTPUT, EXPERROR and EXPSTATUS
+# respectively.  Use TEST-GROUP-NAME for identification.
+m4_define([AT_TOOLLABS_JSUB],
+[AT_SETUP([$1])
+_AT_TOOLLABS_JSUB([$2], [$3], [$4], [$5], [$6], [$7], [$8], [$9], [$10])
+AT_CLEANUP()
+])
+
 # Test that Perl scripts do not have compilation errors.
 AT_TOOLLABS_PERL_COMPILE([jobutils/bin/job])
 AT_TOOLLABS_PERL_COMPILE([jobutils/bin/jsub])
+
+# Test jsub.
+
+# We use mainly true for tests, as jsub determines the path to the
+# script internally and we can predict with a great certainty that
+# true will be in /bin/true.
+
+# These tests will create two files (true.err and true.out) in the
+# home directory of the calling user.
+AT_TOOLLABS_JSUB([Normal call], [true], [Your job 501377 (true) has been 
submitted
+], [], [0], [-e $HOME/true.err -o $HOME/true.out -N true -hard -l 
h_vmem=262144k -q task -b y /bin/true
+], [], [Your job 501377 (true) has been submitted
+], [], [0])
+AT_TOOLLABS_JSUB([Quiet call], [-quiet true], [Your job 501377 (true) has 
been submitted
+], [], [0], [-e $HOME/true.err -o $HOME/true.out -N true -hard -l 
h_vmem=262144k -q task -b y /bin/true
+], [], [], [], [0])
+
+# Test that umasks are handled properly.
+AT_SETUP([-o points to a non-existing file])
+_AT_TOOLLABS_JSUB([-o 

[MediaWiki-commits] [Gerrit] Complete rename of subpackage tools to misctools - change (labs/toollabs)

2013-06-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70656


Change subject: Complete rename of subpackage tools to misctools
..

Complete rename of subpackage tools to misctools

Change-Id: I9c142a702f3b2d89c350a31849d003bf89d3dab8
---
M debian/control
A debian/misctools.install
D debian/tools.install
R misctools/become
R misctools/rmtool
R misctools/toolwatcher
6 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/56/70656/1

diff --git a/debian/control b/debian/control
index ab22176..75f3472 100644
--- a/debian/control
+++ b/debian/control
@@ -13,8 +13,8 @@
 Package: misctools
 Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Miscelaneous Labs-specific tools
- Miscelaneous Labs-specific Tools used on Tool Labs
+Description: Miscellaneous Labs-specific tools
+ Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
diff --git a/debian/misctools.install b/debian/misctools.install
new file mode 100644
index 000..7116393
--- /dev/null
+++ b/debian/misctools.install
@@ -0,0 +1,3 @@
+misctools/become /usr/bin
+misctools/toolwatcher /usr/sbin
+misctools/rmtool /usr/sbin
diff --git a/debian/tools.install b/debian/tools.install
deleted file mode 100644
index 3eb6a68..000
--- a/debian/tools.install
+++ /dev/null
@@ -1,3 +0,0 @@
-tools/become /usr/bin
-tools/toolwatcher /usr/sbin
-tools/rmtool /usr/sbin
diff --git a/tools/become b/misctools/become
similarity index 100%
rename from tools/become
rename to misctools/become
diff --git a/tools/rmtool b/misctools/rmtool
similarity index 100%
rename from tools/rmtool
rename to misctools/rmtool
diff --git a/tools/toolwatcher b/misctools/toolwatcher
similarity index 100%
rename from tools/toolwatcher
rename to misctools/toolwatcher

-- 
To view, visit https://gerrit.wikimedia.org/r/70656
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c142a702f3b2d89c350a31849d003bf89d3dab8
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add debian/.gitignore - change (labs/toollabs)

2013-06-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70660


Change subject: Add debian/.gitignore
..

Add debian/.gitignore

Change-Id: I909f4a7e1c89693309056006ccc23f9ebfa278c1
---
A debian/.gitignore
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/60/70660/1

diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 000..6fec785
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,7 @@
+/files
+/jobutils
+/jobutils.debhelper.log
+/jobutils.substvars
+/misctools
+/misctools.debhelper.log
+/misctools.substvars

-- 
To view, visit https://gerrit.wikimedia.org/r/70660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I909f4a7e1c89693309056006ccc23f9ebfa278c1
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix dependencies - change (labs/toollabs)

2013-06-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70733


Change subject: Fix dependencies
..

Fix dependencies

${shlibs:Depends} is only needed for packages providing or requiring
shared libraries (which we don't until the compilation of take.cc is
done by the package), while ${perl:Depends} was missing for the Perl
scripts.

Change-Id: I47f10a73d4edef27f4085eb47f744e76b29a5418
---
M debian/control
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/33/70733/1

diff --git a/debian/control b/debian/control
index 75f3472..ebcc2a9 100644
--- a/debian/control
+++ b/debian/control
@@ -12,13 +12,13 @@
 
 Package: misctools
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${misc:Depends}
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, gridengine-client, 
libstring-shellquote-perl
+Depends: ${misc:Depends}, ${perl:Depends}, gridengine-client, 
libstring-shellquote-perl
 Description: Set of utilities to use on wikimedia bots and tools cluster
  This package will install jstart (jsub) and jstop, the Tool Labs (more)
  user-friendly wrappers to submit jobs to the gridengine

-- 
To view, visit https://gerrit.wikimedia.org/r/70733
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47f10a73d4edef27f4085eb47f744e76b29a5418
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix syntax error in debian/control - change (labs/toollabs)

2013-06-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70734


Change subject: Fix syntax error in debian/control
..

Fix syntax error in debian/control

Change-Id: Iac5abf5cef5b67b1b289e0997d5a7f555498173c
---
M debian/control
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/34/70734/1

diff --git a/debian/control b/debian/control
index ebcc2a9..3352e96 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
 Source: toollabs
 Section: utils
 Priority: extra
-Maintainer: Marc-André Pelletier mpellet...@wikimedia.org,
+Maintainer: Marc-André Pelletier mpellet...@wikimedia.org
 Uploaders: Marc-André Pelletier mpellet...@wikimedia.org,
  Carl Fürstenberg azat...@gmail.com,
  Petr Bena benap...@gmail.com

-- 
To view, visit https://gerrit.wikimedia.org/r/70734
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac5abf5cef5b67b1b289e0997d5a7f555498173c
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use autotools as build system - change (labs/toollabs)

2013-06-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70771


Change subject: Use autotools as build system
..

Use autotools as build system

Change-Id: I87079303477ebbc15404f4ab2ce04377032e2632
---
A .gitignore
A Makefile.am
A configure.ac
M debian/.gitignore
M debian/jobutils.install
D debian/jobutils.links
M debian/jobutils.manpages
M debian/misctools.install
M debian/rules
A jobutils/.gitignore
A jobutils/Makefile.am
A jobutils/bin/.gitignore
A jobutils/bin/Makefile.am
A jobutils/man/.gitignore
A jobutils/man/Makefile.am
A misctools/.gitignore
A misctools/Makefile.am
17 files changed, 56 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/71/70771/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..97cb339
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+/Makefile
+/Makefile.in
+/aclocal.m4
+/autom4te.cache
+/build-aux
+/config.log
+/config.status
+/configure
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 000..774dde8
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = jobutils misctools
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 000..3adb2c6
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,14 @@
+AC_INIT([toollabs], [1.0.4dev], [mpellet...@wikimedia.org])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE([foreign no-dist silent-rules -Wall -Werror])
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+AC_CONFIG_FILES([Makefile
+ jobutils/Makefile
+ jobutils/bin/Makefile
+ jobutils/man/Makefile
+ misctools/Makefile])
+
+AC_OUTPUT
diff --git a/debian/.gitignore b/debian/.gitignore
index 6fec785..57c129f 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -1,3 +1,5 @@
+/autoreconf.after
+/autoreconf.before
 /files
 /jobutils
 /jobutils.debhelper.log
@@ -5,3 +7,4 @@
 /misctools
 /misctools.debhelper.log
 /misctools.substvars
+/tmp
diff --git a/debian/jobutils.install b/debian/jobutils.install
index a3b0f4a..3b8bf2f 100644
--- a/debian/jobutils.install
+++ b/debian/jobutils.install
@@ -1 +1,5 @@
-jobutils/bin/* /usr/bin
+usr/bin/job
+usr/bin/jstart
+usr/bin/jstop
+usr/bin/jsub
+usr/bin/qcronsub
diff --git a/debian/jobutils.links b/debian/jobutils.links
deleted file mode 100644
index e4214dd..000
--- a/debian/jobutils.links
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/bin/jsub /usr/bin/jstart
-/usr/bin/jsub /usr/bin/qcronsub
diff --git a/debian/jobutils.manpages b/debian/jobutils.manpages
index 360d854..bde9a92 100644
--- a/debian/jobutils.manpages
+++ b/debian/jobutils.manpages
@@ -1 +1,3 @@
-jobutils/man/*
+debian/tmp/usr/share/man/man1/jstart.1
+debian/tmp/usr/share/man/man1/jstop.1
+debian/tmp/usr/share/man/man1/jsub.1
diff --git a/debian/misctools.install b/debian/misctools.install
index 7116393..20e481b 100644
--- a/debian/misctools.install
+++ b/debian/misctools.install
@@ -1,3 +1,3 @@
-misctools/become /usr/bin
-misctools/toolwatcher /usr/sbin
-misctools/rmtool /usr/sbin
+usr/bin/become
+usr/sbin/rmtool
+usr/sbin/toolwatcher
diff --git a/debian/rules b/debian/rules
index c916ab4..cc628e0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,7 +18,7 @@
 
 
 %:
-   dh $@ 
+   dh $@ --with autoreconf
 
 # Test that Perl scripts not have compilation errors.
 override_dh_auto_test:
diff --git a/jobutils/.gitignore b/jobutils/.gitignore
new file mode 100644
index 000..b336cc7
--- /dev/null
+++ b/jobutils/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/jobutils/Makefile.am b/jobutils/Makefile.am
new file mode 100644
index 000..f3ac5b3
--- /dev/null
+++ b/jobutils/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = bin man
diff --git a/jobutils/bin/.gitignore b/jobutils/bin/.gitignore
new file mode 100644
index 000..b336cc7
--- /dev/null
+++ b/jobutils/bin/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/jobutils/bin/Makefile.am b/jobutils/bin/Makefile.am
new file mode 100644
index 000..764fc98
--- /dev/null
+++ b/jobutils/bin/Makefile.am
@@ -0,0 +1,6 @@
+bin_SCRIPTS = job jstop jsub
+
+install-exec-hook:
+   cd $(DESTDIR)$(bindir)  \
+ $(LN_S) jsub jstart  \
+ $(LN_S) jsub qcronsub
diff --git a/jobutils/man/.gitignore b/jobutils/man/.gitignore
new file mode 100644
index 000..b336cc7
--- /dev/null
+++ b/jobutils/man/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/jobutils/man/Makefile.am b/jobutils/man/Makefile.am
new file mode 100644
index 000..c9b180d
--- /dev/null
+++ b/jobutils/man/Makefile.am
@@ -0,0 +1 @@
+man_MANS = jstart.1 jstop.1 jsub.1
diff --git a/misctools/.gitignore b/misctools/.gitignore
new file mode 100644
index 000..b336cc7
--- /dev/null
+++ b/misctools/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/misctools/Makefile.am b/misctools/Makefile.am
new file mode 100644
index 000..62e39ae
--- /dev/null
+++ 

[MediaWiki-commits] [Gerrit] Make qacct usable - change (operations/puppet)

2013-06-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70425


Change subject: Make qacct usable
..

Make qacct usable

With this change, we push the Grid Engine accounting file from the
master every five minutes to the shared project directory and pull it
from there to the individual submit hosts roughly a minute later.
This gives users a granularity that should be sufficient for most
development work.

We use temporary files to achieve atomicity and prevent qacct reading
incomplete files.

This change assumes that a grid engine master (gridengine::master) is
never a submit host (gridengine::submit_host).  Otherwise in the worst
case accounting information added between the push and the pull would
be lost.

This fixes bug #48696.

Bug: 48696
Change-Id: I29f0e42e4f49a406565344c31a7c93924bcd7408
---
M modules/gridengine/manifests/master.pp
M modules/gridengine/manifests/submit_host.pp
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/70425/1

diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index 462dd96..b6af171 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -25,4 +25,11 @@
   }
 
   include monitoring
+
+  cron { push-accounting-to-shared:
+command = cp -f /var/lib/gridengine/default/common/accounting 
/data/project/.system/accounting.tmp  mv -f 
/data/project/.system/accounting.tmp /data/project/.system/accounting,
+user = root,
+minute = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55],
+ensure = present;
+  }
 }
diff --git a/modules/gridengine/manifests/submit_host.pp 
b/modules/gridengine/manifests/submit_host.pp
index f4df502..76e2d80 100644
--- a/modules/gridengine/manifests/submit_host.pp
+++ b/modules/gridengine/manifests/submit_host.pp
@@ -10,6 +10,13 @@
 ensure = latest,
 }
 
+cron { pull-accounting-from-shared:
+  command = cp -f /data/project/.system/accounting 
/var/lib/gridengine/default/common/accounting.tmp  mv -f 
/var/lib/gridengine/default/common/accounting.tmp 
/var/lib/gridengine/default/common/accounting,
+  user = root,
+  minute = [1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56],
+  ensure = present;
+}
+
 # Not actually possible in the labs
 #  @@sshkey { $fqdn:
 #  ensure = present,

-- 
To view, visit https://gerrit.wikimedia.org/r/70425
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29f0e42e4f49a406565344c31a7c93924bcd7408
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] job: Initialize $mode. - change (labs/toollabs)

2013-06-17 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/69157


Change subject: job: Initialize $mode.
..

job: Initialize $mode.

Change-Id: I1847f4a8f140bf93cfa9a13ce7d8f001fff25d96
---
M jobutils/bin/job
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/57/69157/1

diff --git a/jobutils/bin/job b/jobutils/bin/job
index 083281f..13cf48f 100755
--- a/jobutils/bin/job
+++ b/jobutils/bin/job
@@ -1,11 +1,11 @@
 #!/usr/bin/perl -w
 #
 # Copyright © 2013 Marc-André Pelletier mpellet...@wikimedia.org
-# 
+#
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # copyright notice and this permission notice appear in all copies.
-# 
+#
 # THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@@ -18,7 +18,7 @@
 use strict;
 use warnings;
 
-my $mode;
+my $mode = '';
 $mode = shift  if $#ARGV0 and $ARGV[0] eq '-v';
 $mode = shift  if $#ARGV0 and $ARGV[0] eq '-q';
 

-- 
To view, visit https://gerrit.wikimedia.org/r/69157
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1847f4a8f140bf93cfa9a13ce7d8f001fff25d96
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Test that Perl scripts are compilable before packaging. - change (labs/toollabs)

2013-06-12 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/68330


Change subject: Test that Perl scripts are compilable before packaging.
..

Test that Perl scripts are compilable before packaging.

Change-Id: I366825b809c1e228b1b39e9aac403e9202156faa
---
M debian/rules
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/30/68330/1

diff --git a/debian/rules b/debian/rules
index c30bbdb..c916ab4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,3 +19,8 @@
 
 %:
dh $@ 
+
+# Test that Perl scripts not have compilation errors.
+override_dh_auto_test:
+   perl -cw jobutils/bin/job
+   perl -cw jobutils/bin/jsub

-- 
To view, visit https://gerrit.wikimedia.org/r/68330
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I366825b809c1e228b1b39e9aac403e9202156faa
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix variable declaration and enable warnings in job. - change (labs/toollabs)

2013-06-12 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/68331


Change subject: Fix variable declaration and enable warnings in job.
..

Fix variable declaration and enable warnings in job.

Change-Id: I5c674e2b201a140153fdb950c82f254e106407c9
---
M jobutils/bin/job
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/31/68331/1

diff --git a/jobutils/bin/job b/jobutils/bin/job
index f8e697e..083281f 100755
--- a/jobutils/bin/job
+++ b/jobutils/bin/job
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#!/usr/bin/perl -w
 #
 # Copyright © 2013 Marc-André Pelletier mpellet...@wikimedia.org
 # 
@@ -14,6 +14,9 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
+
+use strict;
+use warnings;
 
 my $mode;
 $mode = shift  if $#ARGV0 and $ARGV[0] eq '-v';
@@ -38,7 +41,7 @@
 
 my $name = shift;
 
-my $jnum, $jname, $jstate, $jstart;
+my ($jnum, $jname, $jstate, $jstart);
 
 open XML, /usr/bin/qstat -xml| or die qstat: $!;
 while(XML) {

-- 
To view, visit https://gerrit.wikimedia.org/r/68331
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c674e2b201a140153fdb950c82f254e106407c9
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix Puppet path to gridengine file. - change (operations/puppet)

2013-06-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67899


Change subject: Fix Puppet path to gridengine file.
..

Fix Puppet path to gridengine file.

Change-Id: Ib3fcb38f2af5fd8cd48b36c34d710eb696ddfde8
---
M modules/gridengine/manifests/master.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/67899/1

diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index e31e491..462dd96 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -12,7 +12,7 @@
   class monitoring {
file { /usr/local/sbin/grid-ganglia-report:
  mode = 0555,
- source = puppet:///files/gridengine/grid-ganglia-report,
+ source = puppet:///modules/gridengine/grid-ganglia-report,
  ensure = present;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/67899
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3fcb38f2af5fd8cd48b36c34d710eb696ddfde8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix warnings. - change (labs/toollabs)

2013-06-09 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67643


Change subject: Fix warnings.
..

Fix warnings.

Change-Id: I8f82e1161c9a84e5935a934d8dc3d4e6b64963f4
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 17 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/43/67643/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index f1e62c3..78f34fd 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -6,20 +6,6 @@
 use IPC::Run qw(harness run);
 use String::ShellQuote;
 
-sub memparse_kb {
-  # parses an XXK, XXm, XXg to the # of kilobytes
-  $arg = $_[0];
-  if ($arg =~ m/^([1-9][0-9]*)([mgk])$/i) {
-$amount = $1;
-$unit = $2;
-if($unit =~ m/[mg]/i) {$amount *= 1024};
-if($unit =~ m/[g]/i) {$amount *= 1024};
-  } else {
-die $script: memory value must be an integer followed by 'k', 'm' or 'g': 
$_[0]\n;
-  }
-  return $amount;
-}
-
 my %qsubargs = (
'-a' = 1, '-b' = 1, '-cwd' = 0, '-e' = 1, '-hard' = 0, '-i' = 1, 
'-j' = 1,
'-l' = 1, '-now' = 1, '-N' = 1, '-o' = 1, '-p' = 1, '-q' = 1, 
'-soft' = 0,
@@ -36,6 +22,21 @@
 my $script = $0;
 my $queue = 'task';
 $script = $1 if $script =~ m{/([^/]+)$};
+
+sub memparse_kb {
+  # parses an XXK, XXm, XXg to the # of kilobytes
+  my $arg = $_[0];
+  if ($arg !~ m/^([1-9][0-9]*)([mgk])$/i) {
+die $script: memory value must be an integer followed by 'k', 'm' or 'g': 
$_[0]\n;
+  }
+
+  my $amount = $1;
+  my $unit = $2;
+  if($unit =~ m/[mg]/i) {$amount *= 1024};
+  if($unit =~ m/[g]/i) {$amount *= 1024};
+
+  return $amount;
+}
 
 $continuous = $once = 1 if ($script eq 'jstart');
 $once = 1 if $script eq 'qcronsub';
@@ -135,9 +136,9 @@
 if($opt eq '-l') {
   $memory = memparse_kb($1) if $optval =~ s/h_vmem=([0-9]+[mMgGkK]),?//;
   if ($optval =~ s/virtual_free=([0-9]+[mMgGkK]),?//) {
-$vfmem = memparse_kb($1);
+my $vfmem = memparse_kb($1);
 if ($vfmem  $memory) {
-$new_mem = $vfmem * 1.1;
+my $new_mem = $vfmem * 1.1;
 print WARNING: virtual_free=${vfmem}k is larger than 
h_vmem=${memory}k. Setting h_vmem=${new_mem}k\n;
 $memory = $new_mem;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/67643
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f82e1161c9a84e5935a934d8dc3d4e6b64963f4
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make job output files private by default. - change (labs/toollabs)

2013-06-09 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67644


Change subject: Make job output files private by default.
..

Make job output files private by default.

Job output files are created by SGE with permissions 644 by default.
There has been concern that these files may contain passwords in stack
traces.

With this change, if job output files do not exist, they are
pre-created with permissions 600 for user accounts and 660 for tool
accounts.  SGE will just append to these files and not change the
permissions.

To fine-tune, users may supply the option -umask UMASK which will
override the default umask.  UMASK is interpreted as octal,
i. e. -umask 022 does what one would expect.

This fixes bug #48818.

Bug: 48818
Change-Id: I94a2bd4af699d2d0c19cc429a56b932381510cf9
---
M packages/jobutils/usr/local/bin/jsub
M packages/jobutils/usr/share/man/man1/jstart.1
M packages/jobutils/usr/share/man/man1/jsub.1
3 files changed, 35 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/44/67644/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 78f34fd..d10b896 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -11,6 +11,7 @@
'-l' = 1, '-now' = 1, '-N' = 1, '-o' = 1, '-p' = 1, '-q' = 1, 
'-soft' = 0,
'-sync' = 1, '-v' = 1, '-wd' = 1,
'-mem' = 1, '-once' = 0, '-stderr' = 0, '-continuous' = 0, '-quiet' 
= 0,
+   '-umask' = 1,
 );
 my %qsargs;
 my @args;
@@ -37,6 +38,10 @@
 
   return $amount;
 }
+
+# Set default umask for output files depending on whether we're called
+# by a user or a tool.
+my $umask = $ = 5 ? 0007 : 0077;
 
 $continuous = $once = 1 if ($script eq 'jstart');
 $once = 1 if $script eq 'qcronsub';
@@ -69,6 +74,7 @@
if invoked as 'jstart' or 'qcronsub').
  -continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
+ -umask valueSet umask for output files if they don't exist
  -quietIf successful, don't output anything
 
 Unlike qsub, if you do not specify output and error files, output is appended
@@ -130,6 +136,10 @@
   } elsif($opt eq '-continuous') {
 $continuous = 1;
 $once = 1;
+  } elsif($opt eq '-umask') {
+die ($script: umask must be an octal value: $optval\n)
+  unless ($optval =~ /^[0-7]+$/);
+$umask = oct ($optval);
   } elsif($opt eq '-quiet') {
 $quiet = 1;
   } else {
@@ -163,7 +173,29 @@
 $out = $qsargs{'-o'} if defined $qsargs{'-o'};
 $err = $out if defined $qsargs{'-j'} and $qsargs{'-j'} =~ m/^[yY]/;
 
-open STDERR, $err unless $stderr;
+# For STDOUT and STDERR we do the same dance:
+# - If the output file exists, we do nothing (the output file being a
+#   directory is a subset of this).
+# - Otherwise, we touch the output file once with the set umask or --
+#   for the error output file and if -stderr was not given -- redirect
+#   STDERR to the file with the set umask.
+my $oldumask = umask ($umask);
+if (!-e $out) {
+  open (my $tempfh, '', $out) or
+die (Couldn't touch '$out': $!);
+  close ($tempfh);
+}
+if (!-d $err) {
+  if ($stderr) {
+open (my $tempfh, '', $err) or
+  die (Couldn't touch '$err': $!);
+close ($tempfh);
+  } else {
+open (STDERR, '', $err) or
+  die (Couldn't redirect STDERR to '$err': $!);
+  }
+}
+umask ($oldumask);
 
 my $now = localtime;
 
diff --git a/packages/jobutils/usr/share/man/man1/jstart.1 
b/packages/jobutils/usr/share/man/man1/jstart.1
index 25fb4f6..8fb4d2a 100644
--- a/packages/jobutils/usr/share/man/man1/jstart.1
+++ b/packages/jobutils/usr/share/man/man1/jstart.1
@@ -16,6 +16,7 @@
invoked as 'jstart').
  \-continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
+ \-umask valueSet umask for output files if they don't exist
  \-quietSuppress output if job could be submitted.
 
 Unlike qsub, if you do not specify output and error files, output is appended
diff --git a/packages/jobutils/usr/share/man/man1/jsub.1 
b/packages/jobutils/usr/share/man/man1/jsub.1
index 0c747e4..03e5215 100644
--- a/packages/jobutils/usr/share/man/man1/jsub.1
+++ b/packages/jobutils/usr/share/man/man1/jsub.1
@@ -16,6 +16,7 @@
invoked as 'jstart').
  \-continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
+ \-umask valueSet umask for output files if they don't exist
  \-quietSuppress output if job could be submitted.
 
 Unlike qsub, if you do not specify output and error files, output is appended

-- 
To view, visit https://gerrit.wikimedia.org/r/67644
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange

[MediaWiki-commits] [Gerrit] Fix typo in jsub. - change (labs/toollabs)

2013-06-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67288


Change subject: Fix typo in jsub.
..

Fix typo in jsub.

Change-Id: Ife1d5e67076327826eaaf3ea8c37b21a6ff26dcc
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/88/67288/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index f689052..f1e62c3 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -183,7 +183,7 @@
 
 if($continuous) {
   push @args, '-q', 'continuous';
-  push @args, '-b', $sqargs{'-b'} if defined $qsargs{'-b'};
+  push @args, '-b', $qsargs{'-b'} if defined $qsargs{'-b'};
   $qsubinput = #!/bin/bash\n   .
while !  . shell_quote($prog, @ARGV) . ; do\n .
  sleep 5\n .

-- 
To view, visit https://gerrit.wikimedia.org/r/67288
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife1d5e67076327826eaaf3ea8c37b21a6ff26dcc
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tool Labs: Add more user requested packages to exec_environ. - change (operations/puppet)

2013-05-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65705


Change subject: Tool Labs: Add more user requested packages to exec_environ.
..

Tool Labs: Add more user requested packages to exec_environ.

Bug: 48805
Bug: 48862
Bug: 48863
Change-Id: I10a5e31bb287077356931f12ab11bc59c31671cb
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/65705/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index b0de2a9..b6fa329 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -19,6 +19,10 @@
   include generic::locales::international
 
   package { [
+  'mdbtools',# Bug #48805.
+  'python-genshi',   # Bug #48863.
+  'python-genshi-doc',   # Bug #48863.
+  'tree',# Bug #48862.
   'nodejs',
   'php5-curl',
   'mono-runtime',

-- 
To view, visit https://gerrit.wikimedia.org/r/65705
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10a5e31bb287077356931f12ab11bc59c31671cb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix jstart to start only one job instance. - change (labs/toollabs)

2013-05-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65707


Change subject: Fix jstart to start only one job instance.
..

Fix jstart to start only one job instance.

https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Continuous_jobs_.28such_as_bots.29
promises that jstart script is equivalent to jsub -once -continuous
script.

Bug: 48816
Change-Id: Ie3a70c7418d5ea2897a4b331c50f6adf0fb7f816
---
M packages/jobutils/usr/local/bin/jsub
M packages/jobutils/usr/share/man/man1/jstart.1
M packages/jobutils/usr/share/man/man1/jsub.1
3 files changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/07/65707/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 08f2cb8..616de2a 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -18,7 +18,7 @@
 my $queue = 'task';
 $script = $1 if $script =~ m{/([^/]+)$};
 
-$continuous = 1 if $script eq 'jstart';
+$continuous = $once = 1 if ($script eq 'jstart');
 
 my @options;
 while($#ARGV  0) {
@@ -44,7 +44,8 @@
  -mem value  Request value amount of memory for the job.
(number prefixed by 'k', 'm' or 'g')
  -once Only start one job with that name, fail if
-   another is already started or queued.
+   another is already started or queued (default
+   if invoked as 'jstart').
  -continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
 
diff --git a/packages/jobutils/usr/share/man/man1/jstart.1 
b/packages/jobutils/usr/share/man/man1/jstart.1
index 33cd924..2d02a2e 100644
--- a/packages/jobutils/usr/share/man/man1/jstart.1
+++ b/packages/jobutils/usr/share/man/man1/jstart.1
@@ -12,7 +12,8 @@
  \-mem value  Request value amount of memory for the job.
(number prefixed by 'k', 'm' or 'g')
  \-once Only start one job with that name, fail if
-   another is already started or queued.
+   another is already started or queued (default if
+   invoked as 'jstart').
  \-continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
 
diff --git a/packages/jobutils/usr/share/man/man1/jsub.1 
b/packages/jobutils/usr/share/man/man1/jsub.1
index a3ae4d9..4bebf2b 100644
--- a/packages/jobutils/usr/share/man/man1/jsub.1
+++ b/packages/jobutils/usr/share/man/man1/jsub.1
@@ -12,7 +12,8 @@
  \-mem value  Request value amount of memory for the job.
(number prefixed by 'k', 'm' or 'g')
  \-once Only start one job with that name, fail if
-   another is already started or queued.
+   another is already started or queued (default if
+   invoked as 'jstart').
  \-continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
 

-- 
To view, visit https://gerrit.wikimedia.org/r/65707
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3a70c7418d5ea2897a4b331c50f6adf0fb7f816
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add option -quiet to jsub. - change (labs/toollabs)

2013-05-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65642


Change subject: Add option -quiet to jsub.
..

Add option -quiet to jsub.

The option -quiet suppresses any output if the job submission was
successful.

Change-Id: Ia1a9250a378c5c63b0f7208360d3c5b52f44e2b3
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 26 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/42/65642/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 08f2cb8..879b6f8 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -1,12 +1,13 @@
 #! /usr/bin/perl
 
+use IPC::Run qw(harness run);
 use String::ShellQuote;
 
 my %qsubargs = (
'-a' = 1, '-b' = 1, '-cwd' = 0, '-e' = 1, '-hard' = 0, '-i' = 1, 
'-j' = 1,
'-l' = 1, '-now' = 1, '-N' = 1, '-o' = 1, '-p' = 1, '-q' = 1, 
'-soft' = 0,
'-sync' = 1, '-v' = 1, '-wd' = 1,
-   '-mem' = 1, '-once' = 0, '-stderr' = 0, '-continuous' = 0,
+   '-mem' = 1, '-once' = 0, '-stderr' = 0, '-continuous' = 0, '-quiet' 
= 0,
 );
 my %qsargs;
 my @args;
@@ -14,6 +15,7 @@
 my $once = 0;
 my $stderr = 0;
 my $continuous = 0;
+my $quiet = 0;
 my $script = $0;
 my $queue = 'task';
 $script = $1 if $script =~ m{/([^/]+)$};
@@ -47,6 +49,7 @@
another is already started or queued.
  -continuous   Start a self-restarting job on the continuous
queue (default if invoked as 'jstart')
+ -quietIf successful, don't output anything
 
 Unlike qsub, if you do not specify output and error files, output is appended
 by default to files named job.err and job.out in your home directory
@@ -109,6 +112,8 @@
   } elsif($opt eq '-continuous') {
 $continuous = 1;
 $once = 1;
+  } elsif($opt eq '-quiet') {
+$quiet = 1;
   } else {
 if($opt eq '-l') {
   $memory = $1  if $optval =~ s/h_vmem=([0-9]+[mMgGkK]),?//;
@@ -149,19 +154,30 @@
 push @args, '-o', $out unless defined $qsargs{'-o'};
 push @args, '-N', $jobname, '-hard', '-l', h_vmem=$memory;
 
+my ($qsubinput, $qsuboutput, $qsuberror);
+
 if($continuous) {
   push @args, '-q', 'continuous';
-  push @args, '-b', $sqargs{'-b'}  if defined $qsargs{'-b'};
-  open QSUB, '|-', '/usr/bin/qsub', @args or die \[$now\] unable to start 
qsub: $!\n;
-  print QSUB #!/bin/bash\n;
-  print QSUB while !  . shell_quote($prog, @ARGV) . ; do\n;
-  print QSUB   sleep 5\n;
-  print QSUB done\n;
-  close QSUB;
+  push @args, '-b', $sqargs{'-b'} if defined $qsargs{'-b'};
+  $qsubinput = #!/bin/bash\n   .
+   while !  . shell_quote($prog, @ARGV) . ; do\n .
+ sleep 5\n .
+   done\n;
 } else {
+  $qsubinput = '';
   $queue = $qsargs{'-q'} if defined $qsargs{'-q'};
   push @args, '-q', $queue, '-b', 'y', $prog, @ARGV;
-  exec '/usr/bin/qsub', @args;
-  die \[$now\] qsub failed: $!\n;
 }
 
+my $h = harness(['/usr/bin/qsub', @args], \$qsubinput, \$qsuboutput, 
\$qsuberror);
+if (!run ($h)) {
+print STDOUT $qsuboutput;
+print STDERR $qsuberror;
+exit ($h-result ());
+}
+
+# Suppress output if the user requested so.
+if (!$quiet) {
+print STDOUT $qsuboutput;
+print STDERR $qsuberror;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/65642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1a9250a378c5c63b0f7208360d3c5b52f44e2b3
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix typo and enable warnings. - change (labs/toollabs)

2013-05-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65643


Change subject: Fix typo and enable warnings.
..

Fix typo and enable warnings.

Change-Id: Ied7d1daf101313f2ef4cae90a725d37a8a79e676
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/43/65643/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 08f2cb8..1ab3132 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -1,4 +1,7 @@
-#! /usr/bin/perl
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
 
 use String::ShellQuote;
 
@@ -151,7 +154,7 @@
 
 if($continuous) {
   push @args, '-q', 'continuous';
-  push @args, '-b', $sqargs{'-b'}  if defined $qsargs{'-b'};
+  push @args, '-b', $qsargs{'-b'}  if defined $qsargs{'-b'};
   open QSUB, '|-', '/usr/bin/qsub', @args or die \[$now\] unable to start 
qsub: $!\n;
   print QSUB #!/bin/bash\n;
   print QSUB while !  . shell_quote($prog, @ARGV) . ; do\n;

-- 
To view, visit https://gerrit.wikimedia.org/r/65643
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied7d1daf101313f2ef4cae90a725d37a8a79e676
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove debug output. - change (labs/toollabs)

2013-05-24 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65322


Change subject: Remove debug output.
..

Remove debug output.

Change-Id: Ibf4aa8e98ebeb1cc3721a8f3505ed57918d5613c
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/22/65322/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 08f2cb8..45519ea 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -77,7 +77,6 @@
   $prog .= /$symlink;
 }
 
-print prog?: $prog\n;
 unless($prog =~ m{^/}) {
   my $cwd = `pwd`;
   chomp $cwd;

-- 
To view, visit https://gerrit.wikimedia.org/r/65322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf4aa8e98ebeb1cc3721a8f3505ed57918d5613c
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix jsub's dependence on $HOME's existence. - change (labs/toollabs)

2013-05-22 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65007


Change subject: Fix jsub's dependence on $HOME's existence.
..

Fix jsub's dependence on $HOME's existence.

$HOME isn't set for CGIs so jsub's output files defaulted to the root
directory and thus caused the jobs to fail.  This fixes only bug
#48726; for submitting jobs from CGIs bug #48722 needs to be addressed
as well.

Bug: 48726
Change-Id: I7d03609b0c901527c0dcd492ba99af64e517a13e
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/07/65007/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 08f2cb8..bf37f21 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -125,8 +125,8 @@
 $jobname = $1 if $prog =~ m{([^/.]+)(\.[^/]*)?$};
 $jobname = $qsargs{'-N'} if defined $qsargs{'-N'};
 
-my $err = $ENV{'HOME'}/$jobname.err;
-my $out = $ENV{'HOME'}/$jobname.out;
+my $err = (getpwuid ($)) [7] . '/' . $jobname . '.err';
+my $out = (getpwuid ($)) [7] . '/' . $jobname . '.out';
 
 $err = $qsargs{'-e'} if defined $qsargs{'-e'};
 $out = $qsargs{'-o'} if defined $qsargs{'-o'};

-- 
To view, visit https://gerrit.wikimedia.org/r/65007
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d03609b0c901527c0dcd492ba99af64e517a13e
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add script sql to Tools. - change (operations/puppet)

2013-05-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64847


Change subject: Add script sql to Tools.
..

Add script sql to Tools.

The script allows users to just name the database they want to connect
to without having to look up the server it is stored on.

Bug: 48627
Change-Id: Ie111a5adad4c6378ed71825394548f47d4991eaf
---
A modules/toollabs/files/sql
M modules/toollabs/manifests/exec_environ.pp
2 files changed, 46 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/64847/1

diff --git a/modules/toollabs/files/sql b/modules/toollabs/files/sql
new file mode 100755
index 000..6dde329
--- /dev/null
+++ b/modules/toollabs/files/sql
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+function check_host () {
+for HOST_I in enwiki bgwiki bgwiktionary cswiki enwikiquote \
+  enwiktionary eowiki fiwiki idwiki itwiki nlwiki \
+  nowiki plwiki ptwiki svwiki thwiki trwiki zhwiki \
+  commonswiki dewiki wikidatawiki; do
+if [ $1 = $HOST_I ]; then
+return 0
+fi
+done
+
+return 1
+}
+
+# No database name or extra parameters given?
+if [ $# -eq 0 ] || [ $# -gt 2 ]; then
+echo Usage: $0 DATABASE [COMMAND] 2
+exit 1
+fi
+
+# Database name doesn't end up with _p?
+HOST=${1%_p}
+if [ $1 = $HOST ]; then
+echo $0: Database name '$1' doesn't end with '_p'. 2
+exit 1
+fi
+
+# Host in list of replicated databases?
+if ! check_host $HOST; then
+echo $0: Database '$1' hasn't been replicated to Tools yet. 2
+exit 1
+fi
+
+# Call mysql.
+if [ $# -eq 1 ]; then
+exec mysql -ch $HOST.labsdb $1
+else
+exec mysql -ch $HOST.labsdb $1 -e $2
+fi
diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 75461dd..f2732cf 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -94,6 +94,12 @@
   sysctl { vm.overcommit_memory: value = 2 }
   sysctl { vm.overcommit_ratio: value = 95 }
 
+  file { /usr/local/bin/sql:
+ensure = file,
+mode = 0555,
+source = puppet:///files/toollabs/sql;
+  }
+
   # TODO: quotas
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/64847
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie111a5adad4c6378ed71825394548f47d4991eaf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add Ganglia statistics to grid engine. - change (operations/puppet)

2013-05-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64511


Change subject: Add Ganglia statistics to grid engine.
..

Add Ganglia statistics to grid engine.

Statistics for the grid jobs in pending, running and error state are
forwarded every minute to Ganglia via gmetric under the SGE
grouping.

Bug: 48338
Change-Id: I48a65620d2fa5ee0fa3d147f9157af60c44c31c3
---
A modules/gridengine/files/grid-ganglia-report
M modules/gridengine/manifests/master.pp
2 files changed, 56 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/64511/1

diff --git a/modules/gridengine/files/grid-ganglia-report 
b/modules/gridengine/files/grid-ganglia-report
new file mode 100755
index 000..86b54c1
--- /dev/null
+++ b/modules/gridengine/files/grid-ganglia-report
@@ -0,0 +1,34 @@
+#!/usr/bin/perl -w
+
+use encoding 'utf8';
+use strict;
+use warnings;
+
+use XML::LibXML;
+
+# Read qstat information into XML DOM.
+open (QSTAT, '-|', '/usr/bin/qstat', '-u', '*', '-xml') or die (Couldn't read 
qstat);
+my $DOM = XML::LibXML-load_xml (IO = *QSTAT) or die ($!);
+close (QSTAT);
+
+# Initialize counters.
+my %Counters = ('sge_pending' = 0,
+'sge_running' = 0,
+'sge_error'   = 0);
+
+# Iterate over all jobs.
+foreach my $Node ($DOM-findnodes (q!//job_list/state!)) {
+my $State = $Node-textContent ();
+if ($State =~ /^qw/) {
+$Counters {'sge_pending'}++;
+} elsif ($State =~ /[rRt]/) {
+$Counters {'sge_running'}++;
+} elsif ($State =~ /E/) {
+$Counters {'sge_error'}++;
+}
+}
+
+# Update Ganglia.
+for my $Name (keys (%Counters)) {
+system ('/usr/bin/gmetric', '--group', 'SGE', '--name', $Name, '--value', 
$Counters {$Name}, '--type', 'uint16') and die ($!);
+}
diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index eb7cd12..e31e491 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -1,12 +1,28 @@
-# gridengine.pp
-
+# gridengine/master.pp
 
 class gridengine::master {
-   class { 'gridengine':
-   gridmaster = $fqdn,
-   }
+  class { 'gridengine':
+   gridmaster = $fqdn,
+  }
 
   package { gridengine-master:
-ensure = latest,
+   ensure = latest,
   }
+
+  class monitoring {
+   file { /usr/local/sbin/grid-ganglia-report:
+ mode = 0555,
+ source = puppet:///files/gridengine/grid-ganglia-report,
+ ensure = present;
+   }
+
+   cron { grid-ganglia-report:
+ command = /usr/local/sbin/grid-ganglia-report,
+ user = root,
+ ensure = present,
+ require = File[/usr/local/sbin/grid-ganglia-report];
+   }
+  }
+
+  include monitoring
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/64511
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48a65620d2fa5ee0fa3d147f9157af60c44c31c3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix jsub -continuous quoting issues. - change (labs/toollabs)

2013-05-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63165


Change subject: Fix jsub -continuous quoting issues.
..

Fix jsub -continuous quoting issues.

jsub -continuous failed if either an argument to an option
or a part of the command line to be executed contained 's.
This fixes bug 48334 by using 3-argument open for the former
and String::ShellQuote for the latter.

Bug:48334
Change-Id: I5198d2ee0592f8756905a18139ad2f50fa1cba84
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/65/63165/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 756ee1d..2d5b47d 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -1,5 +1,7 @@
 #! /usr/bin/perl
 
+use String::ShellQuote;
+
 my %qsubargs = (
'-a' = 1, '-b' = 1, '-cwd' = 0, '-e' = 1, '-hard' = 0, '-i' = 1, 
'-j' = 1,
'-l' = 1, '-now' = 1, '-N' = 1, '-o' = 1, '-p' = 1, '-q' = 1, 
'-soft' = 0,
@@ -111,9 +113,9 @@
 
 if($continuous) {
   push @args, '-q', 'continuous';
-  open QSUB, |/usr/bin/qsub '.join(' ', @args).' or die \[$now\] unable 
to start qsub: $!\n;
-  print QSUB #! /bin/bash\n;
-  print QSUB while ! '$prog' '.join(' ', @ARGV).' ; do\n;
+  open QSUB, '|-', '/usr/bin/qsub', @args or die \[$now\] unable to start 
qsub: $!\n;
+  print QSUB #!/bin/bash\n;
+  print QSUB while !  . shell_quote($prog, @ARGV) . ; do\n;
   print QSUB   sleep 5\n;
   print QSUB done\n;
   close QSUB;

-- 
To view, visit https://gerrit.wikimedia.org/r/63165
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5198d2ee0592f8756905a18139ad2f50fa1cba84
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Tool Labs: Add libstring-shellquote-perl to exec_environ. - change (operations/puppet)

2013-05-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63211


Change subject: Tool Labs: Add libstring-shellquote-perl to exec_environ.
..

Tool Labs: Add libstring-shellquote-perl to exec_environ.

Bug: 48334
Change-Id: Ic4554b8526dbc4f29651d7f1eb4d3cb07a4505b3
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/63211/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 6bb4ef8..a93c4cd 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -54,6 +54,7 @@
   'libpcsclite1',
   'libquadmath0',
   'libstring-diff-perl',
+  'libstring-shellquote-perl',   # For jsub.
   'libsvn1',
   'mariadb-common',
   'openjdk-7-jre-headless',

-- 
To view, visit https://gerrit.wikimedia.org/r/63211
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4554b8526dbc4f29651d7f1eb4d3cb07a4505b3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Be more liberal with invocations of jsub Co. - change (labs/toollabs)

2013-05-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/63212


Change subject: Be more liberal with invocations of jsub  Co.
..

Be more liberal with invocations of jsub  Co.

Currently, for example only jstart and
/usr/local/bin/jstart are recognized as invocations of
jstart.  This patch allows also ./jstart to be recognized
as such.  This is mostly useful for testing purposes.

Change-Id: I1793d0ce8f9fa7f20279ed4f6050f3bebcf20ec1
---
M packages/jobutils/usr/local/bin/jsub
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/12/63212/1

diff --git a/packages/jobutils/usr/local/bin/jsub 
b/packages/jobutils/usr/local/bin/jsub
index 2d5b47d..ae74d9c 100755
--- a/packages/jobutils/usr/local/bin/jsub
+++ b/packages/jobutils/usr/local/bin/jsub
@@ -15,7 +15,7 @@
 my $continuous = 0;
 my $script = $0;
 my $queue = 'task';
-$script = $1 if $script =~ m{/([^/]+)$};
+$script = $1 if $script =~ m{([^/]+)$};
 
 $continuous = 1 if $script eq 'jstart';
 

-- 
To view, visit https://gerrit.wikimedia.org/r/63212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1793d0ce8f9fa7f20279ed4f6050f3bebcf20ec1
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] planet: Remove obsolete comment. - change (operations/puppet[production])

2013-02-04 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: planet: Remove obsolete comment.
..

planet: Remove obsolete comment.

Configurations now depend on the keys of the $planet_languages hash.

Change-Id: I8ca2d3a7cedc211c3f476255ebb01efc21400cd9
---
M manifests/role/planet.pp
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/18/47518/1
--
To view, visit https://gerrit.wikimedia.org/r/47518
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ca2d3a7cedc211c3f476255ebb01efc21400cd9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix ORMRow::insert() on PostgreSQL. - change (mediawiki/core[master])

2012-12-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Fix ORMRow::insert() on PostgreSQL.
..

Fix ORMRow::insert() on PostgreSQL.

When inserting a new row, ORMRow explicitly passed NULL as the value for
the id field which in MySQL means use next value in sequence, but in
PostgreSQL means use NULL.  With this change, for id fields no value
is passed if it isn't set to non-null.  This fixes bug #43475.

This effectively bars the possibility to set the id field of an existing
row to NULL, but the current code already disallows any changes in id
fields.

Change-Id: I29d86fa6fc38ff1852821658e4927b4d7d4a72b6
---
M includes/db/ORMRow.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/41020/1
--
To view, visit https://gerrit.wikimedia.org/r/41020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29d86fa6fc38ff1852821658e4927b4d7d4a72b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove wikitext from translated error messages. - change (mediawiki...ParserFunctions[master])

2012-12-11 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Remove wikitext from translated error messages.
..

Remove wikitext from translated error messages.

Error messages are passed through escaped() and thus should not contain
wikitext.

Change-Id: I388cb970941c11d3eb47dcd9022076b3833ff64d
---
M ParserFunctions.i18n.php
1 file changed, 21 insertions(+), 21 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFunctions 
refs/changes/00/38100/1
--
To view, visit https://gerrit.wikimedia.org/r/38100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I388cb970941c11d3eb47dcd9022076b3833ff64d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] (bug 40585) Don't drop 'step=any' in HTML input fields. - change (mediawiki/core[REL1_19])

2012-12-08 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: (bug 40585) Don't drop 'step=any' in HTML input fields.
..

(bug 40585) Don't drop 'step=any' in HTML input fields.

The default value for step is 1 which effectively bans any decimal
number from being entered into an 'type=number' field and makes
HTMLFloatField unusable.

This is a backport of 6dc4039270af99413cc7c3bf85b136d9a79e7497.

Change-Id: I869f0fa3935b8ff9e22bbf69ddc46ef79674ed2b
---
M includes/Html.php
M tests/phpunit/includes/HtmlTest.php
2 files changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/37632/1
--
To view, visit https://gerrit.wikimedia.org/r/37632
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I869f0fa3935b8ff9e22bbf69ddc46ef79674ed2b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] (bug 40585) Don't drop 'step=any' in HTML input fields. - change (mediawiki/core[REL1_20])

2012-12-08 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: (bug 40585) Don't drop 'step=any' in HTML input fields.
..

(bug 40585) Don't drop 'step=any' in HTML input fields.

The default value for step is 1 which effectively bans any decimal
number from being entered into an 'type=number' field and makes
HTMLFloatField unusable.

This is a backport of 6dc4039270af99413cc7c3bf85b136d9a79e7497.

Change-Id: Ibda2b49395705c5902c751525b75213653b0ea5d
---
M includes/Html.php
M tests/phpunit/includes/HtmlTest.php
2 files changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/37635/1
--
To view, visit https://gerrit.wikimedia.org/r/37635
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibda2b49395705c5902c751525b75213653b0ea5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] (bug 40585) Don't drop 'step=any' in HTML input fields. - change (mediawiki/core[master])

2012-11-29 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: (bug 40585) Don't drop 'step=any' in HTML input fields.
..

(bug 40585) Don't drop 'step=any' in HTML input fields.

The default value for step is 1 which effectively bans any decimal
number from being entered into an 'type=number' field and makes
HTMLFloatField unusable.

Change-Id: I103fd4047814a7fb0dfdc174f36badd5b660b7a4
---
M includes/Html.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/35884/1
--
To view, visit https://gerrit.wikimedia.org/r/35884
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I103fd4047814a7fb0dfdc174f36badd5b660b7a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add additional job columns to PostgreSQL as well. - change (mediawiki/core[master])

2012-10-24 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Add additional job columns to PostgreSQL as well.
..

Add additional job columns to PostgreSQL as well.

This ports I49824c7fa855fea4ddcac5c9901ece8c2c0101d0 and fixes
bug #41196.

Change-Id: I18e0ac3aee2c2627f89d28d4a34afd90c822af91
---
M includes/installer/PostgresUpdater.php
M maintenance/postgres/tables.sql
2 files changed, 18 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/29826/1
--
To view, visit https://gerrit.wikimedia.org/r/29826
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18e0ac3aee2c2627f89d28d4a34afd90c822af91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add filearchive.fa_sha1 to PostgreSQL as well. - change (mediawiki/core[master])

2012-10-19 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Add filearchive.fa_sha1 to PostgreSQL as well.
..

Add filearchive.fa_sha1 to PostgreSQL as well.

This fixes bug #41114.

Change-Id: I021070f90d35d99ad55944543e94004f62d5f08c
---
M includes/installer/PostgresUpdater.php
M maintenance/postgres/tables.sql
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/28797/1
--
To view, visit https://gerrit.wikimedia.org/r/28797
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I021070f90d35d99ad55944543e94004f62d5f08c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Create fa_notime index on PostgreSQL updates as well. - change (mediawiki/core[master])

2012-10-19 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Create fa_notime index on PostgreSQL updates as well.
..

Create fa_notime index on PostgreSQL updates as well.

Change-Id: I9d7ade33b398512fdad5ff88e3fa5d5e44e2090b
---
M includes/installer/PostgresUpdater.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/28798/1
--
To view, visit https://gerrit.wikimedia.org/r/28798
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d7ade33b398512fdad5ff88e3fa5d5e44e2090b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Protect against Xdebug overloading var_dump(). - change (mediawiki/core[master])

2012-10-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Protect against Xdebug overloading var_dump().
..

Protect against Xdebug overloading var_dump().

This fixes bug #36452.

Change-Id: I0fc65af8c561b23daa5301a00706acb5b3f619dc
---
M tests/parser/parserTests.txt
M tests/parser/parserTestsParserHook.php
2 files changed, 43 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/28662/1
--
To view, visit https://gerrit.wikimedia.org/r/28662
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fc65af8c561b23daa5301a00706acb5b3f619dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add images/lockdir to .gitignore. - change (mediawiki/core[master])

2012-10-13 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Add images/lockdir to .gitignore.
..

Add images/lockdir to .gitignore.

Change-Id: I3ebecc6d2b8b13e774091e0ba4b7afa882d89e1d
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/27918/1
--
To view, visit https://gerrit.wikimedia.org/r/27918
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ebecc6d2b8b13e774091e0ba4b7afa882d89e1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Delete more thumbnails after parser tests. - change (mediawiki/core[master])

2012-10-13 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Delete more thumbnails after parser tests.
..

Delete more thumbnails after parser tests.

Change-Id: I0a0e757a359fbfa1274e3e0177f1c22f292394e7
---
M tests/parser/parserTest.inc
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/27920/1
--
To view, visit https://gerrit.wikimedia.org/r/27920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a0e757a359fbfa1274e3e0177f1c22f292394e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Reset searchTerms[] before populating. - change (mediawiki/core[master])

2012-10-07 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Reset searchTerms[] before populating.
..

Reset searchTerms[] before populating.

Otherwise, multiple calls to searchQuery() would accumulate search
terms.  searchTerms[] is defined in SearchEngine so we can't just get
rid of it altogether.

Change-Id: Iddbb3920e3a9d5849c99fe90d2d725d16019b51d
---
M includes/search/SearchPostgres.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/27049/1
--
To view, visit https://gerrit.wikimedia.org/r/27049
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddbb3920e3a9d5849c99fe90d2d725d16019b51d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove obsolete comment. - change (mediawiki/core[master])

2012-10-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Remove obsolete comment.
..

Remove obsolete comment.

There is no class SearchDbTest.

Change-Id: I6054de571e867b07453785f5598ba410449b57e2
---
M tests/phpunit/includes/search/SearchEngineTest.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/26951/1
--
To view, visit https://gerrit.wikimedia.org/r/26951
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6054de571e867b07453785f5598ba410449b57e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Ensure that prefixes can be used for table names in tests. - change (mediawiki/core[master])

2012-10-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Ensure that prefixes can be used for table names in tests.
..

Ensure that prefixes can be used for table names in tests.

Change-Id: Ieab84735dfc6f57ebaf4d7b63369856606aaef24
---
M includes/search/SearchPostgres.php
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/26958/1
--
To view, visit https://gerrit.wikimedia.org/r/26958
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieab84735dfc6f57ebaf4d7b63369856606aaef24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Bump compiler requirement to 1.5. - change (mediawiki...mwdumper[master])

2012-09-24 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Bump compiler requirement to 1.5.
..

Bump compiler requirement to 1.5.

The source uses annotations and generics that were introduced in 1.5.

Change-Id: I9ef8a0ea41279beaa29cde571821a5f3712b7430
---
M build.xml
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/mwdumper 
refs/changes/14/24814/1
--
To view, visit https://gerrit.wikimedia.org/r/24814
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ef8a0ea41279beaa29cde571821a5f3712b7430
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/mwdumper
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Reenable testStoredFunctions() in DatabaseTest.php. - change (mediawiki/core[master])

2012-09-22 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Reenable testStoredFunctions() in DatabaseTest.php.
..

Reenable testStoredFunctions() in DatabaseTest.php.

Change-Id: I85192a326f8e83d433f69b296431cae57628e78f
---
M tests/phpunit/includes/db/DatabaseTest.php
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/24665/1
--
To view, visit https://gerrit.wikimedia.org/r/24665
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85192a326f8e83d433f69b296431cae57628e78f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Do not flip partial keys in CSSJanus. - change (mediawiki/core[master])

2012-09-22 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Do not flip partial keys in CSSJanus.
..

Do not flip partial keys in CSSJanus.

Change-Id: I1ee9d16069c4627aa81024eeb642714ef796cec5
---
M includes/libs/CSSJanus.php
M tests/phpunit/includes/libs/CSSJanusTest.php
2 files changed, 13 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/24676/1
--
To view, visit https://gerrit.wikimedia.org/r/24676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ee9d16069c4627aa81024eeb642714ef796cec5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add unit tests for PostgreSQL searching. - change (mediawiki/core[master])

2012-09-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Add unit tests for PostgreSQL searching.
..

Add unit tests for PostgreSQL searching.

Work in progress, do not merge.

Change-Id: Ie179e51e3a17930efb1ccc72ac38ceffe88f0877
---
M tests/phpunit/includes/search/SearchPostgresTest.php
1 file changed, 128 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/24619/1
--
To view, visit https://gerrit.wikimedia.org/r/24619
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie179e51e3a17930efb1ccc72ac38ceffe88f0877
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Reenable tests in HttpTest.php. - change (mediawiki/core[master])

2012-09-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Reenable tests in HttpTest.php.
..

Reenable tests in HttpTest.php.

Change-Id: I6bdbb48919e342a33095c395b7856f62229cae7a
---
M tests/phpunit/includes/HttpTest.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/24628/1
--
To view, visit https://gerrit.wikimedia.org/r/24628
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bdbb48919e342a33095c395b7856f62229cae7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Disallow top level domains in Cookie::validateCookieDomain()... - change (mediawiki/core[master])

2012-09-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Disallow top level domains in Cookie::validateCookieDomain().
..

Disallow top level domains in Cookie::validateCookieDomain().

This disallows addresses that contain no dots or just a leading one.

Change-Id: I4d62ab3618dddf0d5fafb49c31523137ac33cad2
---
M includes/Cookie.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/24636/1
--
To view, visit https://gerrit.wikimedia.org/r/24636
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d62ab3618dddf0d5fafb49c31523137ac33cad2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix broken tests for Xml. - change (mediawiki/core[master])

2012-09-21 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: Fix broken tests for Xml.
..

Fix broken tests for Xml.

Change-Id: Ifd7008269cc960004676ba79449911d63476615c
---
M tests/phpunit/includes/XmlTest.php
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/24648/1
--
To view, visit https://gerrit.wikimedia.org/r/24648
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd7008269cc960004676ba79449911d63476615c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] (bug 36179) Unquote 'null' for PostgreSQL. - change (mediawiki/core[REL1_18])

2012-09-19 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: (bug 36179) Unquote 'null' for PostgreSQL.
..

(bug 36179) Unquote 'null' for PostgreSQL.

Backport of r107964.

Change-Id: I4f8042923f535bee4e1c15f5876805e610c4532f
---
M CREDITS
M maintenance/rebuildrecentchanges.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/24293/1
--
To view, visit https://gerrit.wikimedia.org/r/24293
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f8042923f535bee4e1c15f5876805e610c4532f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_18
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] (bug 2867) Sort interlanguage links. - change (mediawiki/core[master])

2012-09-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

Change subject: (bug 2867) Sort interlanguage links.
..

(bug 2867) Sort interlanguage links.

The sorting order is determined by the system message interwiki config-sorting
order that lists the language prefixes in order from top to bottom separated by
newlines.  Multiple language prefixes can occur on one row separated by commas;
if these language prefixes are found in one page, their relative sorting order
will be determined by document order.  Language prefixes that are not listed in
the system message will be treated as if they were listed as the last line
separated by commas (e. g., they will be put last in document order).

The sorting can be switched off by setting $wgSortInterlanguageLinks to false
(also default).

Change-Id: I9f8fea0f6a891732bb3c47ddcd61662d3c902970
---
M includes/DefaultSettings.php
M includes/OutputPage.php
2 files changed, 76 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/24211/1
--
To view, visit https://gerrit.wikimedia.org/r/24211
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f8fea0f6a891732bb3c47ddcd61662d3c902970
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


<    2   3   4   5   6   7