[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet: Make standalone puppetmasters optionally use PuppetDB

2017-02-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340461 )

Change subject: puppet: Make standalone puppetmasters optionally use PuppetDB
..

puppet: Make standalone puppetmasters optionally use PuppetDB

Bug: T153577
Change-Id: If0f20722a163c9edbf6ab656b66da20b0fc9757b
---
M modules/role/manifests/puppetmaster/standalone.pp
1 file changed, 22 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/340461/1

diff --git a/modules/role/manifests/puppetmaster/standalone.pp 
b/modules/role/manifests/puppetmaster/standalone.pp
index 8fd8516..6c6049c 100644
--- a/modules/role/manifests/puppetmaster/standalone.pp
+++ b/modules/role/manifests/puppetmaster/standalone.pp
@@ -33,6 +33,8 @@
 #  Hostname for the puppetmaster. Defaults to fqdn. Is used for SSL
 #  certificates, virtualhost routing, etc
 #
+# [*use_puppetdb*]
+#  Set to true to use PuppetDB.  Defaults to false.
 # filtertags: labs-common
 class role::puppetmaster::standalone(
 $autosign = false,
@@ -42,6 +44,7 @@
 $extra_auth_rules = '',
 $server_name = $::fqdn,
 $use_enc = true,
+$use_puppetdb = false,
 ) {
 if ! $use_enc {
 fail('Ldap puppet node definitions are no longer supported.  The 
$use_enc param must be true.')
@@ -68,11 +71,21 @@
 group  => 'root',
 }
 
-$config = {
+$base_config = {
 'node_terminus' => 'exec',
 'external_nodes'=> '/usr/local/bin/puppet-enc',
 'thin_storeconfigs' => false,
 'autosign'  => $autosign,
+}
+$puppetdb_config = {
+'storeconfigs' => true,
+'storeconfigs_backend' => 'puppetdb',
+}
+
+if $use_puppetdb {
+$config = merge($base_config, $puppetdb_config)
+} else {
+$config = $base_config
 }
 
 class { '::puppetmaster':
@@ -84,6 +97,14 @@
 config  => $config,
 }
 
+if $use_puppetdb {
+$puppetdb_host = hiera('puppetmaster::config::puppetdb_host')
+
+class { 'puppetmaster::puppetdb::client':
+host => $puppetdb_host,
+}
+}
+
 # Update git checkout
 class { 'puppetmaster::gitsync':
 run_every_minutes => $git_sync_minutes,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0f20722a163c9edbf6ab656b66da20b0fc9757b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: Set defaults for replication in Labs

2017-02-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340460 )

Change subject: puppetdb: Set defaults for replication in Labs
..

puppetdb: Set defaults for replication in Labs

This change configures the PuppetDB master to have no slaves by
default.

Change-Id: I17d90a939b3bccbb082e6fe3ae4ac02a61d4d7eb
---
M hieradata/labs.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/340460/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index dd1d41e..1105d53 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -38,6 +38,8 @@
   "%{hiera('puppetmaster')}":
 - { worker: "%{hiera('puppetmaster')}", loadfactor: 10 }
 role::puppetmaster::puppetdb::shared_buffers: 128MB
+puppetmaster::puppetdb::master: "%{::fqdn}"
+puppetmaster::puppetdb::slaves: []
 
 # Default to Dummy authenticator in JupyterHubs in labs
 jupyterhub::authenticator: dummy

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17d90a939b3bccbb082e6fe3ae4ac02a61d4d7eb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: Allow to use Apache as frontend

2017-02-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340462 )

Change subject: puppetdb: Allow to use Apache as frontend
..

puppetdb: Allow to use Apache as frontend

Bug: T154105
Change-Id: I7a0605d03d6307d50ce27840515121c14d4f5b14
---
M modules/puppetmaster/manifests/puppetdb.pp
A modules/puppetmaster/templates/apache-puppetdb.conf.erb
2 files changed, 60 insertions(+), 16 deletions(-)


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

diff --git a/modules/puppetmaster/manifests/puppetdb.pp 
b/modules/puppetmaster/manifests/puppetdb.pp
index de2b5cb..697d4bf 100644
--- a/modules/puppetmaster/manifests/puppetdb.pp
+++ b/modules/puppetmaster/manifests/puppetdb.pp
@@ -1,29 +1,54 @@
 # Class puppetmaster::puppetdb
 #
 # Sets up a puppetdb instance and the corresponding database server.
-class puppetmaster::puppetdb($master, $port=443, $jetty_port=8080) {
+class puppetmaster::puppetdb($master, $port=443, $jetty_port=8080, 
$webfrontend='nginx') {
 requires_os('Debian >= jessie')
 
 $puppetdb_pass = hiera('puppetdb::password::rw')
 
 ## TLS Termination
-# Set up nginx as a reverse-proxy
-::base::expose_puppet_certs { '/etc/nginx':
-ensure  => present,
-provide_private => true,
-require => Class['nginx'],
-}
+case $webfrontend {
+'apache': {
+# Set up Apache as a reverse-proxy.
+include ::apache::mod::headers
+include ::apache::mod::proxy
+include ::apache::mod::proxy_http
+include ::apache::mod::ssl
 
-$ssl_settings = ssl_ciphersuite('nginx', 'mid')
-include ::sslcert::dhparam
-::nginx::site { 'puppetdb':
-ensure  => present,
-content => template('puppetmaster/nginx-puppetdb.conf.erb'),
-require => Class['::sslcert::dhparam'],
-}
+$ssl_settings = ssl_ciphersuite('apache', 'mid', true)
+include ::sslcert::dhparam
+::apache::site { 'puppetdb':
+ensure  => present,
+content => template('puppetmaster/apache-puppetdb.conf.erb'),
+require => Class['::sslcert::dhparam'],
+}
 
-diamond::collector::nginx{ $::fqdn:
-port => 10080,
+}
+
+'nginx': {
+# Set up nginx as a reverse-proxy.
+::base::expose_puppet_certs { '/etc/nginx':
+ensure  => present,
+provide_private => true,
+require => Class['nginx'],
+}
+
+$ssl_settings = ssl_ciphersuite('nginx', 'mid')
+include ::sslcert::dhparam
+::nginx::site { 'puppetdb':
+ensure  => present,
+content => template('puppetmaster/nginx-puppetdb.conf.erb'),
+require => Class['::sslcert::dhparam'],
+}
+
+diamond::collector::nginx{ $::fqdn:
+port => 10080,
+}
+}
+
+default: {
+fail("Unknown webfrontend '${webfrontend}'")
+}
 }
 
 ## PuppetDB installation
diff --git a/modules/puppetmaster/templates/apache-puppetdb.conf.erb 
b/modules/puppetmaster/templates/apache-puppetdb.conf.erb
new file mode 100644
index 000..da94b31
--- /dev/null
+++ b/modules/puppetmaster/templates/apache-puppetdb.conf.erb
@@ -0,0 +1,19 @@
+# This file is managed by Puppet!
+
+>
+ServerName <%= @fqdn %>
+
+SSLEngine on
+<%= @ssl_settings.join("\n") %>
+SSLCertificateFile  /var/lib/puppet/ssl/certs/<%= @fqdn %>.pem
+SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/<%= @fqdn %>.pem
+SSLCACertificateFile/var/lib/puppet/ssl/certs/ca.pem
+SSLCertificateChainFile /var/lib/puppet/ssl/certs/ca.pem
+
+DocumentRoot /dev/null
+
+RequestHeader set X-Real-IP %{REMOTE_ADDR}s
+ProxyPass / http://localhost:<%= @jetty_port %>/
+
+CustomLog /var/log/apache2/puppetdb.log wmf
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a0605d03d6307d50ce27840515121c14d4f5b14
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Cut release 1.20~precise+1

2017-02-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340278 )

Change subject: Cut release 1.20~precise+1
..

Cut release 1.20~precise+1

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/78/340278/1

diff --git a/debian/changelog b/debian/changelog
index 6c271f7..96050a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-toollabs (1.20~precise+1~dev) precise; urgency=medium
+toollabs (1.20~precise+1) precise; urgency=medium
 
   * Package jmail
   * Port sql to Python

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13aa2562b1826a7ed2a500ba51e44af8e36d3c40
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: ubuntu/precise
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Port sql to Python

2017-02-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340277 )

Change subject: Port sql to Python
..

Port sql to Python

Change-Id: I038d14fb73a9bfe633003a6ab89d712510f61f61
---
M debian/changelog
M debian/control
M misctools/sql
M tox.ini
4 files changed, 88 insertions(+), 114 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/77/340277/1

diff --git a/debian/changelog b/debian/changelog
index bbb1283..6c271f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 toollabs (1.20~precise+1~dev) precise; urgency=medium
 
   * Package jmail
+  * Port sql to Python
 
- -- Tim Landscheidt   Tue, 28 Feb 2017 03:25:32 +
+ -- Tim Landscheidt   Tue, 28 Feb 2017 03:26:57 +
 
 toollabs (1.19~precise+1) precise; urgency=medium
 
diff --git a/debian/control b/debian/control
index a99e382..47e1c12 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@
 Package: misctools
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
- mysql-client-core-5.5, python, python-mysql.connector
+ mysql-client-core-5.5, python, python3, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
diff --git a/misctools/sql b/misctools/sql
index 65f5314..9621886 100755
--- a/misctools/sql
+++ b/misctools/sql
@@ -1,120 +1,93 @@
-#!/bin/bash
+#!/usr/bin/python3
+#
+# Copyright (C) 2017  Tim Landscheidt
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
 
-# this tool allow you to connect quickly to sql database
-# it should work for all newbies
+import argparse
+import logging
+import os
+import os.path
+import socket
+import sys
 
-verbose=0
+parser = argparse.ArgumentParser(description='Connect to or run SQL query ' +
+ 'on replica or Tools database server',
+ epilog='Report bugs to Phabricator: ' +
+ 'https://phabricator.wikimedia.org')
+parser.add_argument('-v', '--verbose', action='store_true', default=False,
+help='show debugging information')
+parser.add_argument('dbname', metavar='DATABASE NAME|WIKI NAME',
+help='for example commonswiki_p or enwiki')
+parser.add_argument('sqlquery', metavar='SQL QUERY', nargs=argparse.REMAINDER,
+help='SQL query; multiple words will be joined by spaces')
 
-function Log {
-if [ $verbose -eq 1 ];then
-   echo "$1"
-fi
-}
+args = parser.parse_args()
 
-if [ $# -lt 1 ];then
-echo "Usage: \"sql  [-vh]\" type sql --help for 
more help"
-exit 0
-fi
+# Set up logging.
+logging.basicConfig(stream=sys.stderr,
+format='%(message)s',
+level=logging.DEBUG if args.verbose else logging.WARN)
 
-if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
-echo "Usage: sql [_p] [-vh] [command(s)]"
-   echo
-   echo "This tool allows you to easily open a connection to sql database 
without having to provide the credentials or a database host server"
-   echo "Example: sql frwiki_p"
-   echo
-   echo "Parameters:"
-   echo "  -v: verbose - produce various information about the resolution 
of db"
-   echo
-   echo "Report bugs to phabricator: https://phabricator.wikimedia.org;
-   exit 0
-fi
+exec_args = ['mysql']
 
-for i
-do
-   if [ "$i" = "-v" ] || [ "$i" = "--verbose" ]
-   then
-   verbose=1
-   fi
-done
+if os.path.isfile(os.path.expanduser('~/replica.my.cnf')):
+exec_args += ['--defaults-file=' + os.path.expanduser('~/replica.my.cnf')]
+elif not(os.path.isfile(os.path.expanduser('~/.my.cnf'))):
+exec_args += ['-p']
+logging.warn('There is no configuration file for mysql to use, ' +
+ 'you will probably be unable to access the database')
 
-if [ ! -f ~/replica.my.cnf ] && [ ! -f ~/.my.cnf ]
-then
-   Log "WARNING: There is no configuration file for mysql to use, you will 
probably be unable to access the database"
-fi
+# These aliases have historically been supported; no new ones should
+# be added here.
+if args.dbname in ['commons', 'cs', 'de', 'en', 'fr', 'wikidata']:
+server = args.dbname + 'wiki.labsdb'
+db 

[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Package jmail

2017-02-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340276 )

Change subject: Package jmail
..

Package jmail

Bug: T158722
Change-Id: I2a2a86ecf1f0129374733f9222decf241d13e708
---
M configure.ac
M debian/changelog
M debian/control
M debian/copyright
M debian/jobutils.install
M debian/jobutils.manpages
M jobutils/bin/Makefile.am
A jobutils/bin/jmail
M jobutils/man/Makefile.am
A jobutils/man/jmail.1.in
M tox.ini
11 files changed, 124 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/76/340276/1

diff --git a/configure.ac b/configure.ac
index 5a3b7d5..bc7795b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,7 @@
  jobutils/Makefile
  jobutils/bin/Makefile
  jobutils/man/Makefile
+ jobutils/man/jmail.1
  jobutils/man/job.1
  jobutils/man/jstop.1
  jobutils/man/jsub.1
diff --git a/debian/changelog b/debian/changelog
index cd131c6..bbb1283 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.20~precise+1~dev) precise; urgency=medium
+
+  * Package jmail
+
+ -- Tim Landscheidt   Tue, 28 Feb 2017 03:25:32 +
+
 toollabs (1.19~precise+1) precise; urgency=medium
 
   * Remove toolwatcher
diff --git a/debian/control b/debian/control
index fa8b889..a99e382 100644
--- a/debian/control
+++ b/debian/control
@@ -22,7 +22,8 @@
 Package: jobutils
 Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends},
- gridengine-client, libipc-run-perl, libstring-shellquote-perl, python
+ gridengine-client, libipc-run-perl, libstring-shellquote-perl,
+ python, python3
 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
diff --git a/debian/copyright b/debian/copyright
index f3d9372..f545288 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,6 +5,10 @@
 Copyright: 2013 Marc-André Pelletier 
 License: ISC
 
+Files: jobutils/bin/jmail jobutils/man/jmail.1.in
+Copyright: Copyright 2017 Tim Landscheidt 
+License: GPL-3.0+
+
 Files: debian/*
 Copyright: 2013 Carl Fürstenberg 
 License: GPL-3.0+
diff --git a/debian/jobutils.install b/debian/jobutils.install
index 3b8bf2f..956f91f 100644
--- a/debian/jobutils.install
+++ b/debian/jobutils.install
@@ -1,3 +1,4 @@
+usr/bin/jmail
 usr/bin/job
 usr/bin/jstart
 usr/bin/jstop
diff --git a/debian/jobutils.manpages b/debian/jobutils.manpages
index 92a5a84..c6a457c 100644
--- a/debian/jobutils.manpages
+++ b/debian/jobutils.manpages
@@ -1,3 +1,4 @@
+debian/tmp/usr/share/man/man1/jmail.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/bin/Makefile.am b/jobutils/bin/Makefile.am
index 764fc98..7312c92 100644
--- a/jobutils/bin/Makefile.am
+++ b/jobutils/bin/Makefile.am
@@ -1,4 +1,4 @@
-bin_SCRIPTS = job jstop jsub
+bin_SCRIPTS = jmail job jstop jsub
 
 install-exec-hook:
cd $(DESTDIR)$(bindir) && \
diff --git a/jobutils/bin/jmail b/jobutils/bin/jmail
new file mode 100755
index 000..d996f68
--- /dev/null
+++ b/jobutils/bin/jmail
@@ -0,0 +1,61 @@
+#!/usr/bin/python3
+#
+# Copyright (C) 2017  Tim Landscheidt
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+import os
+import pwd
+import shutil
+import subprocess
+import sys
+import tempfile
+
+# Both temporary files need to be created in the tool's home directory
+# on NFS so they can be accessed from any grid host.
+home_directory = pwd.getpwuid(os.getuid()).pw_dir
+with tempfile.NamedTemporaryFile(mode='w+',
+ suffix='.in',
+ prefix='jmail-',
+ dir=home_directory) as input, \
+ tempfile.NamedTemporaryFile(mode='w+',
+ suffix='.out',
+ prefix='jmail-',
+ dir=home_directory) as output:
+# Determine the full path of the program to execute.
+program = shutil.which(sys.argv[1])
+if 

[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Cut release 1.20

2017-02-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340275 )

Change subject: Cut release 1.20
..

Cut release 1.20

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/75/340275/1

diff --git a/debian/changelog b/debian/changelog
index bcea7a5..d310893 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-toollabs (1.20~dev) trusty; urgency=medium
+toollabs (1.20) trusty; urgency=medium
 
   * Package jmail
   * Port sql to Python

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13aa2562b1826a7ed2a500ba51e44af8e36d3c40
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Port sql to Python

2017-02-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340233 )

Change subject: Port sql to Python
..

Port sql to Python

Change-Id: I038d14fb73a9bfe633003a6ab89d712510f61f61
---
M debian/changelog
M debian/control
M misctools/sql
M tox.ini
4 files changed, 98 insertions(+), 115 deletions(-)


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

diff --git a/debian/changelog b/debian/changelog
index 0d8b543..fe312ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.20~dev) trusty; urgency=medium
+
+  * Port sql to Python
+
+ -- Tim Landscheidt   Mon, 27 Feb 2017 18:13:24 +
+
 toollabs (1.19) trusty; urgency=medium
 
   * Remove toolwatcher
diff --git a/debian/control b/debian/control
index 3c9c82c..8c6dc30 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@
 Package: misctools
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
- mariadb-client-core-5.5, python, python-mysql.connector
+ mariadb-client-core-5.5, python, python3, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
diff --git a/misctools/sql b/misctools/sql
index 65f5314..9621886 100755
--- a/misctools/sql
+++ b/misctools/sql
@@ -1,120 +1,93 @@
-#!/bin/bash
+#!/usr/bin/python3
+#
+# Copyright (C) 2017  Tim Landscheidt
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
 
-# this tool allow you to connect quickly to sql database
-# it should work for all newbies
+import argparse
+import logging
+import os
+import os.path
+import socket
+import sys
 
-verbose=0
+parser = argparse.ArgumentParser(description='Connect to or run SQL query ' +
+ 'on replica or Tools database server',
+ epilog='Report bugs to Phabricator: ' +
+ 'https://phabricator.wikimedia.org')
+parser.add_argument('-v', '--verbose', action='store_true', default=False,
+help='show debugging information')
+parser.add_argument('dbname', metavar='DATABASE NAME|WIKI NAME',
+help='for example commonswiki_p or enwiki')
+parser.add_argument('sqlquery', metavar='SQL QUERY', nargs=argparse.REMAINDER,
+help='SQL query; multiple words will be joined by spaces')
 
-function Log {
-if [ $verbose -eq 1 ];then
-   echo "$1"
-fi
-}
+args = parser.parse_args()
 
-if [ $# -lt 1 ];then
-echo "Usage: \"sql  [-vh]\" type sql --help for 
more help"
-exit 0
-fi
+# Set up logging.
+logging.basicConfig(stream=sys.stderr,
+format='%(message)s',
+level=logging.DEBUG if args.verbose else logging.WARN)
 
-if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
-echo "Usage: sql [_p] [-vh] [command(s)]"
-   echo
-   echo "This tool allows you to easily open a connection to sql database 
without having to provide the credentials or a database host server"
-   echo "Example: sql frwiki_p"
-   echo
-   echo "Parameters:"
-   echo "  -v: verbose - produce various information about the resolution 
of db"
-   echo
-   echo "Report bugs to phabricator: https://phabricator.wikimedia.org;
-   exit 0
-fi
+exec_args = ['mysql']
 
-for i
-do
-   if [ "$i" = "-v" ] || [ "$i" = "--verbose" ]
-   then
-   verbose=1
-   fi
-done
+if os.path.isfile(os.path.expanduser('~/replica.my.cnf')):
+exec_args += ['--defaults-file=' + os.path.expanduser('~/replica.my.cnf')]
+elif not(os.path.isfile(os.path.expanduser('~/.my.cnf'))):
+exec_args += ['-p']
+logging.warn('There is no configuration file for mysql to use, ' +
+ 'you will probably be unable to access the database')
 
-if [ ! -f ~/replica.my.cnf ] && [ ! -f ~/.my.cnf ]
-then
-   Log "WARNING: There is no configuration file for mysql to use, you will 
probably be unable to access the database"
-fi
+# These aliases have historically been supported; no new ones should
+# be added here.
+if args.dbname in ['commons', 'cs', 'de', 'en', 'fr', 'wikidata']:
+server = args.dbname + 'wiki.labsdb'
+db = args.dbname + 'wiki_p'
+elif args.dbname in ['meta', 'meta_p']:
+# 

[MediaWiki-commits] [Gerrit] labs/private[master]: Move puppetdb::password variables to hieradata/labs.yaml

2017-02-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340148 )

Change subject: Move puppetdb::password variables to hieradata/labs.yaml
..

Move puppetdb::password variables to hieradata/labs.yaml

The files under hieradata/common are not actually read by Labs
puppetmasters, thus this change moves the puppetdb::password variables
to hieradata/labs.yaml.

Change-Id: Ib37ccdcff6c2ee24c202e01dd1877805db3e4f73
---
D hieradata/common/puppetdb/password.yaml
M hieradata/labs.yaml
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/48/340148/1

diff --git a/hieradata/common/puppetdb/password.yaml 
b/hieradata/common/puppetdb/password.yaml
deleted file mode 100644
index bce623a..000
--- a/hieradata/common/puppetdb/password.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-puppetdb::password::rw: somepassword
-puppetdb::password::replication: replication
diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index 17203da..313fcec 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -4,3 +4,6 @@
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'
 observer_user: 'novaobserver'
 observer_password: 'Fs6Dq2RtG8KwmM2Z'
+
+puppetdb::password::rw: somepassword
+puppetdb::password::replication: replication

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib37ccdcff6c2ee24c202e01dd1877805db3e4f73
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet: Remove requirement on python3-ldap3

2017-02-26 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: puppet: Remove requirement on python3-ldap3
..

puppet: Remove requirement on python3-ldap3

Since c658ac3d3795d3186cce7f43ddd3a3cd0603e3a4,
modules/role/files/labs/puppet-enc.py no longer queries the LDAP
server and thus does not use ldap3 any longer.  This change removes
the now obsolete requirement in the manifests.

Change-Id: I25e783fe6b4c59d04e024620bebd179ee8767a71
---
M modules/puppet/manifests/self/config.pp
M modules/role/manifests/puppetmaster/standalone.pp
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/340064/1

diff --git a/modules/puppet/manifests/self/config.pp 
b/modules/puppet/manifests/self/config.pp
index 84e6f13..2f35c23 100644
--- a/modules/puppet/manifests/self/config.pp
+++ b/modules/puppet/manifests/self/config.pp
@@ -28,7 +28,7 @@
 fail('Ldap puppet node definitions are no longer supported.  The 
$use_enc param must be true.')
 }
 
-require_package('python3-yaml', 'python3-ldap3')
+require_package('python3-yaml')
 
 include ::ldap::yamlcreds
 
diff --git a/modules/role/manifests/puppetmaster/standalone.pp 
b/modules/role/manifests/puppetmaster/standalone.pp
index 8fd8516..58d1fe4 100644
--- a/modules/role/manifests/puppetmaster/standalone.pp
+++ b/modules/role/manifests/puppetmaster/standalone.pp
@@ -48,7 +48,7 @@
 }
 
 # Setup ENC
-require_package('python3-yaml', 'python3-ldap3')
+require_package('python3-yaml')
 
 include ldap::yamlcreds
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25e783fe6b4c59d04e024620bebd179ee8767a71
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Fix test for enabled PHP module mcrypt

2017-02-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340059 )

Change subject: Tools: Fix test for enabled PHP module mcrypt
..

Tools: Fix test for enabled PHP module mcrypt

The current test erroneously assumes that the PHP SAPIs are always
called "apache2" and "cli".  This change amends the test to check the
actually installed PHP SAPIs.

Bug: T159022
Change-Id: I6a3dabcc6ea325eeb5d9a37054bacb819c5d6994
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/340059/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index ebd3bfb..7bacac6 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -400,7 +400,7 @@
 # Enable PHP mcrypt module (T97857).
 exec { 'tools_enable_php_mcrypt_module':
 command => '/usr/sbin/php5enmod mcrypt',
-unless  => '/usr/sbin/php5query -s apache2 -m mcrypt && 
/usr/sbin/php5query -s cli -m mcrypt',
+unless  => '/usr/bin/php5query -S | /usr/bin/xargs -rI {} 
/usr/sbin/php5query -s {} -m mcrypt',
 require => Package['php5-cli', 'php5-mcrypt'],
 }
 } elsif $::lsbdistcodename == 'jessie' {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a3dabcc6ea325eeb5d9a37054bacb819c5d6994
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Unpuppetize sql

2017-02-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340058 )

Change subject: Tools: Unpuppetize sql
..

Tools: Unpuppetize sql

sql is now deployed as part of misctools.

Change-Id: I98ac8d4952a6cdbadfba8af42c91a41f585645be
---
D modules/toollabs/files/sql
M modules/toollabs/manifests/exec_environ.pp
2 files changed, 0 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/340058/1

diff --git a/modules/toollabs/files/sql b/modules/toollabs/files/sql
deleted file mode 100755
index 65f5314..000
--- a/modules/toollabs/files/sql
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/bash
-
-# this tool allow you to connect quickly to sql database
-# it should work for all newbies
-
-verbose=0
-
-function Log {
-if [ $verbose -eq 1 ];then
-   echo "$1"
-fi
-}
-
-if [ $# -lt 1 ];then
-echo "Usage: \"sql  [-vh]\" type sql --help for 
more help"
-exit 0
-fi
-
-if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
-echo "Usage: sql [_p] [-vh] [command(s)]"
-   echo
-   echo "This tool allows you to easily open a connection to sql database 
without having to provide the credentials or a database host server"
-   echo "Example: sql frwiki_p"
-   echo
-   echo "Parameters:"
-   echo "  -v: verbose - produce various information about the resolution 
of db"
-   echo
-   echo "Report bugs to phabricator: https://phabricator.wikimedia.org;
-   exit 0
-fi
-
-for i
-do
-   if [ "$i" = "-v" ] || [ "$i" = "--verbose" ]
-   then
-   verbose=1
-   fi
-done
-
-if [ ! -f ~/replica.my.cnf ] && [ ! -f ~/.my.cnf ]
-then
-   Log "WARNING: There is no configuration file for mysql to use, you will 
probably be unable to access the database"
-fi
-
-param=""
-# check if the user has a replica file
-if [ -f ~/replica.my.cnf ];then
-param=" --defaults-file=~/replica.my.cnf"
-else
-if [ ! -f ~/.my.cnf ];then
-param=" -p"
-fi
-fi
-
-server="enwiki.labsdb"
-db="enwiki_p"
-
-case "$1" in
-"en" | "enwiki" | "enwiki_p")
-server="enwiki.labsdb"
-db="enwiki_p"
-;;
-"de" | "dewiki" | "dewiki_p")
-server="dewiki.labsdb"
-db="dewiki_p"
-;;
-"fr" | "frwiki" | "frwiki_p")
-server="frwiki.labsdb"
-db="frwiki_p"
-;;
-"cs" | "cswiki" | "cswiki_p")
-server="cswiki.labsdb"
-db="cswiki_p"
-;;
-"commons" | "commonswiki" | "commonswiki_p")
-server="commonswiki.labsdb"
-db="commonswiki_p"
-;;
-"wikidata" | "wikidatawiki" | "wikidatawiki_p")
-server="wikidatawiki.labsdb"
-db="wikidatawiki_p"
-;;
-"meta" | "meta_p")
-# Not to confuse with metawiki[_p]
-# 
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Metadata_database
-server="s7.labsdb"
-db="meta_p"
-;;
-"local")
-server=tools-db
-db=""
-if [ -f ~/.my.cnf ];then
-   param=""
-fi
-   ;;
-   *)
-   # we don't know what the database is so we check if it exist first
-   Log "This database name is not known by sql script, fallback to dblist 
resolution"
-   db="${1%_p}_p"
-   server="${db%_p}.labsdb"
-   if getent hosts -- "$server" > /dev/null
-   then
-   Log "Resolved to $server $db"
-   else
-   echo "Could not find requested database"
-if [ "$db" != "$1" ]; then
-echo 'Make sure to ask for a db in format of _p'
-fi
-   exit 1
-   fi
-   ;;
-esac
-
-shift
-Log "Connecting to $server"
-if [ $# -lt 1 ]; then
-  exec mysql $param -h $server $db "$@"
-else
-  echo "$@" | mysql $param -h $server $db
-fi
diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index ebd3bfb..a4d68bf 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -429,14 +429,6 @@
 ensure => latest,
 }
 
-file { '/usr/bin/sql':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0755',
-source => 'puppet:///modules/toollabs/sql',
-}
-
 sysctl::parameters { 'tool labs':
 values => {
 'vm.overcommit_memory' => 2,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98ac8d4952a6cdbadfba8af42c91a41f585645be
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Cut release 1.19~precise+1

2017-02-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340056 )

Change subject: Cut release 1.19~precise+1
..

Cut release 1.19~precise+1

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


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

diff --git a/debian/changelog b/debian/changelog
index 781345a..cd131c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-toollabs (1.19~precise+1~dev) precise; urgency=medium
+toollabs (1.19~precise+1) precise; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9355fee3b252e45834589dc196dee691a32ff407
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: ubuntu/precise
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Cut release 1.19

2017-02-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340055 )

Change subject: Cut release 1.19
..

Cut release 1.19

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/55/340055/1

diff --git a/debian/changelog b/debian/changelog
index 0a35cde..0d8b543 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-toollabs (1.19~dev) trusty; urgency=medium
+toollabs (1.19) trusty; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e4c678e79981810e765293630d8978a68e58e15
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Add man page for sql

2017-02-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340010 )

Change subject: Add man page for sql
..

Add man page for sql

Change-Id: I198b5ad25eaf8bdf99f8056b18e7dea7fa4530de
---
M configure.ac
M debian/changelog
M debian/misctools.manpages
M misctools/Makefile.am
A misctools/sql.1.in
5 files changed, 49 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/10/340010/1

diff --git a/configure.ac b/configure.ac
index 1cc660e..5a3b7d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@
  misctools/Makefile
  misctools/become.1
  misctools/list-user-databases.1
+ misctools/sql.1
  src/Makefile
  src/take.1
  tests/Makefile])
diff --git a/debian/changelog b/debian/changelog
index 79d7aaa..781345a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@
   * Set target distribution to Ubuntu Trusty
   * Set target distribution for branch ubuntu/precise to Ubuntu Precise
   * Import sql from operations/puppet
+  * Add man page for sql
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 21:27:04 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 21:34:29 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/misctools.manpages b/debian/misctools.manpages
index 52c8ebc..7e2f080 100644
--- a/debian/misctools.manpages
+++ b/debian/misctools.manpages
@@ -1,3 +1,4 @@
 debian/tmp/usr/share/man/man1/become.1
 debian/tmp/usr/share/man/man1/list-user-databases.1
+debian/tmp/usr/share/man/man1/sql.1
 debian/tmp/usr/share/man/man1/take.1
diff --git a/misctools/Makefile.am b/misctools/Makefile.am
index 1d9c38a..b715aa9 100644
--- a/misctools/Makefile.am
+++ b/misctools/Makefile.am
@@ -1,2 +1,2 @@
-man_MANS = become.1 list-user-databases.1
+man_MANS = become.1 list-user-databases.1 sql.1
 bin_SCRIPTS = become list-user-databases setup-tomcat sql
diff --git a/misctools/sql.1.in b/misctools/sql.1.in
new file mode 100644
index 000..a52ff42
--- /dev/null
+++ b/misctools/sql.1.in
@@ -0,0 +1,44 @@
+.TH SQL 1 @TOOLLABS_RELEASEDATE@ @PACKAGE_VERSION@ "Wikimedia Labs Tools 
misctools"
+.SH NAME
+sql \- connect to database or execute SQL command
+.SH SYNOPSIS
+.B sql
+.I database
+
+.B sql
+.I database
+.I statement
+.SH DESCRIPTION
+.B sql
+connects to the named
+.I database
+with
+.BR mysql ;
+if an SQL statement is given, it is executed, otherwise an interactive
+session is started.
+
+There are three categories of databases that can be specified by
+.IR database :
+.IR enwiki_p ,
+etc. refers to the database for the English Wikipedia, etc.  on the
+replica servers.
+.I local
+only works in the form
+.B sql local
+and connects to the
+.I tools-db
+server.
+.IR meta_p ,
+not to be confused with
+.IR metawiki_p ,
+refers to the database that contains meta information about Wikimedia wikis 
(cf.
+.RB < 
https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database#Metadata_database 
>).
+.SH EXIT STATUS
+.B sql
+returns the exit status of the spawned
+.B mysql
+command.
+.SH AUTHORS
+Petr Bena
+.SH SEE ALSO
+.BR mysql (1)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I198b5ad25eaf8bdf99f8056b18e7dea7fa4530de
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: ubuntu/precise
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Import sql from operations/puppet

2017-02-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/340009 )

Change subject: Import sql from operations/puppet
..

Import sql from operations/puppet

As this change introduces a difference in the binary packages, it adds
the suffix "~precise+1" to the upstream version.

Change-Id: I159b49371a995ca32e1d37bc69d17308d10d8164
---
M debian/changelog
M debian/control
M debian/misctools.install
M misctools/Makefile.am
A misctools/sql
5 files changed, 126 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/09/340009/1

diff --git a/debian/changelog b/debian/changelog
index 379ff65..79d7aaa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,13 @@
-toollabs (1.19~dev) precise; urgency=medium
+toollabs (1.19~precise+1~dev) precise; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
   * Set target distribution to Ubuntu Trusty
   * Set target distribution for branch ubuntu/precise to Ubuntu Precise
+  * Import sql from operations/puppet
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 02:49:21 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 21:27:04 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index ee2e5c8..fa8b889 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@
 Package: misctools
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
- python, python-mysql.connector
+ mysql-client-core-5.5, python, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
diff --git a/debian/misctools.install b/debian/misctools.install
index 8480b2b..924a3f9 100644
--- a/debian/misctools.install
+++ b/debian/misctools.install
@@ -1,4 +1,5 @@
 usr/bin/become
 usr/bin/list-user-databases
+usr/bin/sql
 usr/bin/take
 usr/bin/setup-tomcat
diff --git a/misctools/Makefile.am b/misctools/Makefile.am
index 4d2ee2b..1d9c38a 100644
--- a/misctools/Makefile.am
+++ b/misctools/Makefile.am
@@ -1,2 +1,2 @@
 man_MANS = become.1 list-user-databases.1
-bin_SCRIPTS = become list-user-databases setup-tomcat
+bin_SCRIPTS = become list-user-databases setup-tomcat sql
diff --git a/misctools/sql b/misctools/sql
new file mode 100755
index 000..65f5314
--- /dev/null
+++ b/misctools/sql
@@ -0,0 +1,120 @@
+#!/bin/bash
+
+# this tool allow you to connect quickly to sql database
+# it should work for all newbies
+
+verbose=0
+
+function Log {
+if [ $verbose -eq 1 ];then
+   echo "$1"
+fi
+}
+
+if [ $# -lt 1 ];then
+echo "Usage: \"sql  [-vh]\" type sql --help for 
more help"
+exit 0
+fi
+
+if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
+echo "Usage: sql [_p] [-vh] [command(s)]"
+   echo
+   echo "This tool allows you to easily open a connection to sql database 
without having to provide the credentials or a database host server"
+   echo "Example: sql frwiki_p"
+   echo
+   echo "Parameters:"
+   echo "  -v: verbose - produce various information about the resolution 
of db"
+   echo
+   echo "Report bugs to phabricator: https://phabricator.wikimedia.org;
+   exit 0
+fi
+
+for i
+do
+   if [ "$i" = "-v" ] || [ "$i" = "--verbose" ]
+   then
+   verbose=1
+   fi
+done
+
+if [ ! -f ~/replica.my.cnf ] && [ ! -f ~/.my.cnf ]
+then
+   Log "WARNING: There is no configuration file for mysql to use, you will 
probably be unable to access the database"
+fi
+
+param=""
+# check if the user has a replica file
+if [ -f ~/replica.my.cnf ];then
+param=" --defaults-file=~/replica.my.cnf"
+else
+if [ ! -f ~/.my.cnf ];then
+param=" -p"
+fi
+fi
+
+server="enwiki.labsdb"
+db="enwiki_p"
+
+case "$1" in
+"en" | "enwiki" | "enwiki_p")
+server="enwiki.labsdb"
+db="enwiki_p"
+;;
+"de" | "dewiki" | "dewiki_p")
+server="dewiki.labsdb"
+db="dewiki_p"
+;;
+"fr" | "frwiki" | "frwiki_p")
+server="frwiki.labsdb"
+db="frwiki_p"
+;;
+"cs" | "cswiki" | "cswiki_p")
+server="cswiki.labsdb"
+db="cswiki_p"
+;;
+"commons" | "commonswiki" | "commonswiki_p")
+server="commonswiki.labsdb"
+db="commonswiki_p"
+;;
+"wikidata" | "wikidatawiki" | "wikidatawiki_p")
+server="wikidatawiki.labsdb"
+db="wikidatawiki_p"
+;;
+"meta" | "meta_p")
+# Not to confuse with metawiki[_p]
+# 
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Metadata_database
+server="s7.labsdb"
+db="meta_p"
+;;
+"local")
+server=tools-db
+db=""
+if [ -f ~/.my.cnf ];then
+   param=""
+fi
+   ;;
+   *)
+   # we don't know what the database is so 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Require gridengine-master for gridengine_resource

2017-02-25 Thread Tim Landscheidt (Code Review)
Hello Chasemp, Merlijn van Deen,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Tools: Require gridengine-master for gridengine_resource
..

Tools: Require gridengine-master for gridengine_resource

Bug: T127388
Change-Id: Ief54f613b2cdcb912215b22300f9a3494fdfd565
---
M modules/toollabs/manifests/master.pp
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index ea8e58d..d21091c 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -11,6 +11,7 @@
 ensure  => present,
 requestable => 'FORCED',
 consumable  => 'YES',
+require => Service['gridengine-master'],
 }
 
 gridengine_resource { 'release':
@@ -22,6 +23,7 @@
 consumable  => 'NO',
 default => 'NONE',
 urgency => '0',
+require => Service['gridengine-master'],
 }
 
 gridengine_resource { 'user_slot':
@@ -33,6 +35,7 @@
 consumable  => 'YES',
 default => '0',
 urgency => '0',
+require => Service['gridengine-master'],
 }
 
 file { "${toollabs::collectors}/hostgroups":

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief54f613b2cdcb912215b22300f9a3494fdfd565
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Package jmail

2017-02-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339920 )

Change subject: Package jmail
..

Package jmail

Bug: T158722
Change-Id: I2a2a86ecf1f0129374733f9222decf241d13e708
---
M configure.ac
M debian/changelog
M debian/copyright
M debian/jobutils.install
M debian/jobutils.manpages
M jobutils/bin/Makefile.am
A jobutils/bin/jmail
M jobutils/man/Makefile.am
A jobutils/man/jmail.1.in
9 files changed, 103 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/20/339920/1

diff --git a/configure.ac b/configure.ac
index 1cc660e..0f72408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,7 @@
  jobutils/Makefile
  jobutils/bin/Makefile
  jobutils/man/Makefile
+ jobutils/man/jmail.1
  jobutils/man/job.1
  jobutils/man/jstop.1
  jobutils/man/jsub.1
diff --git a/debian/changelog b/debian/changelog
index 8ed41f5..0bc809e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
   * Set target distribution to Ubuntu Trusty
+  * Package jmail
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 05:42:05 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/copyright b/debian/copyright
index f3d9372..f545288 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,6 +5,10 @@
 Copyright: 2013 Marc-André Pelletier 
 License: ISC
 
+Files: jobutils/bin/jmail jobutils/man/jmail.1.in
+Copyright: Copyright 2017 Tim Landscheidt 
+License: GPL-3.0+
+
 Files: debian/*
 Copyright: 2013 Carl Fürstenberg 
 License: GPL-3.0+
diff --git a/debian/jobutils.install b/debian/jobutils.install
index 3b8bf2f..956f91f 100644
--- a/debian/jobutils.install
+++ b/debian/jobutils.install
@@ -1,3 +1,4 @@
+usr/bin/jmail
 usr/bin/job
 usr/bin/jstart
 usr/bin/jstop
diff --git a/debian/jobutils.manpages b/debian/jobutils.manpages
index 92a5a84..c6a457c 100644
--- a/debian/jobutils.manpages
+++ b/debian/jobutils.manpages
@@ -1,3 +1,4 @@
+debian/tmp/usr/share/man/man1/jmail.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/bin/Makefile.am b/jobutils/bin/Makefile.am
index 764fc98..7312c92 100644
--- a/jobutils/bin/Makefile.am
+++ b/jobutils/bin/Makefile.am
@@ -1,4 +1,4 @@
-bin_SCRIPTS = job jstop jsub
+bin_SCRIPTS = jmail job jstop jsub
 
 install-exec-hook:
cd $(DESTDIR)$(bindir) && \
diff --git a/jobutils/bin/jmail b/jobutils/bin/jmail
new file mode 100755
index 000..3c2793d
--- /dev/null
+++ b/jobutils/bin/jmail
@@ -0,0 +1,54 @@
+#!/usr/bin/python3
+#
+# Copyright (C) 2017  Tim Landscheidt
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+import os
+import pwd
+import shutil
+import subprocess
+import sys
+import tempfile
+
+# Both temporary files need to be created in the tool's home directory
+# on NFS so they can be accessed from any grid host.
+home_directory = pwd.getpwuid(os.getuid()).pw_dir
+with tempfile.NamedTemporaryFile(mode='w+', suffix='.in', prefix='jmail-', 
dir=home_directory) as input, tempfile.NamedTemporaryFile(mode='w+', 
suffix='.out', prefix='jmail-', dir=home_directory) as output:
+# Determine the full path of the program to execute.
+program = shutil.which(sys.argv[1])
+if program is None:
+sys.exit('Processing program unavailable')
+
+# Copy the incoming message from stdin to the temporary file.
+shutil.copyfileobj(sys.stdin, input)
+input.flush()
+
+# Execute the given program synchronously on the grid.
+rv = subprocess.call(['/usr/bin/qsub',
+  '-N', 'mail.' + pwd.getpwuid(os.getuid()).pw_name,
+  '-sync', 'y',
+  '-b', 'y',
+  '-m', 'n',
+  '-o', output.name,
+  '-j', 'y',
+  '-i', input.name,
+  '-q', 'mailq',
+  '-l', 

[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Set target distribution for branch ubuntu/precise to Ubuntu ...

2017-02-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339917 )

Change subject: Set target distribution for branch ubuntu/precise to Ubuntu 
Precise
..

Set target distribution for branch ubuntu/precise to Ubuntu Precise

Bug: T156886
Change-Id: I68582bc68f6745de6eb59f899309f44095f2c932
---
M .gitreview
M debian/changelog
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/17/339917/1

diff --git a/.gitreview b/.gitreview
index fb155a2..7ab5ba8 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=labs/toollabs.git
-defaultbranch=master
+defaultbranch=ubuntu/precise
 defaultrebase=0
diff --git a/debian/changelog b/debian/changelog
index 8ed41f5..379ff65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
-toollabs (1.19~dev) trusty; urgency=medium
+toollabs (1.19~dev) precise; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
   * Set target distribution to Ubuntu Trusty
+  * Set target distribution for branch ubuntu/precise to Ubuntu Precise
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 02:49:21 +
 
 toollabs (1.18) unstable; urgency=medium
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68582bc68f6745de6eb59f899309f44095f2c932
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: ubuntu/precise
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: labs/toollabs: Make debian-glue voting

2017-02-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339914 )

Change subject: labs/toollabs: Make debian-glue voting
..

labs/toollabs: Make debian-glue voting

Bug: T95098
Change-Id: Ibc723c9cf0f14197a4583f25aff8b4dfbbe24405
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/14/339914/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index c048171..f9f28ac 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1629,10 +1629,11 @@
   - name: labs/toollabs
 test:
  - tox-jessie
- - debian-glue-non-voting
+ - debian-glue
  - php53lint
 gate-and-submit:
  - tox-jessie
+ - debian-glue
  - php53lint
 
   - name: labs/tools/crosswatch

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc723c9cf0f14197a4583f25aff8b4dfbbe24405
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Set primary target distribution to Ubuntu Trusty

2017-02-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339913 )

Change subject: Set primary target distribution to Ubuntu Trusty
..

Set primary target distribution to Ubuntu Trusty

Bug: T156886
Change-Id: I1e95c4ad3e78e2807f37be0e921a7eaee5d4a183
---
M debian/changelog
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/13/339913/1

diff --git a/debian/changelog b/debian/changelog
index be48185..8ed41f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
-toollabs (1.19~dev) unstable; urgency=medium
+toollabs (1.19~dev) trusty; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
+  * Set target distribution to Ubuntu Trusty
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
 
 toollabs (1.18) unstable; urgency=medium
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e95c4ad3e78e2807f37be0e921a7eaee5d4a183
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Expand description of misctools

2017-02-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339911 )

Change subject: Expand description of misctools
..

Expand description of misctools

Bug: T157413
Change-Id: I02ab6285c39907841dfb22fc6a17864f793eec93
---
M debian/changelog
M debian/control
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/11/339911/1

diff --git a/debian/changelog b/debian/changelog
index be48185..2c931d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,9 @@
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
+  * Expand description of misctools
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 00:40:59 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index ee2e5c8..0ad4c50 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@
 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
  python, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
- Miscellaneous Labs-specific Tools used on Tool Labs
+ This package contains four tools for use in Tool Labs: become,
+ list-user-databases, setup-tomcat and take.
 
 Package: jobutils
 Architecture: all

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02ab6285c39907841dfb22fc6a17864f793eec93
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: State dependency on python

2017-02-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339910 )

Change subject: State dependency on python
..

State dependency on python

Change-Id: I67cfe7341eecb29ee8c1141dd260ef5a29e98114
---
M debian/changelog
M debian/control
M jobutils/bin/jsub
3 files changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/10/339910/1

diff --git a/debian/changelog b/debian/changelog
index b43d6cf..be48185 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
+  * State dependency on python
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:15:16 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 633b88a..ee2e5c8 100644
--- a/debian/control
+++ b/debian/control
@@ -14,13 +14,15 @@
 
 Package: misctools
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, 
python-mysql.connector
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
+ python, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends}, 
gridengine-client, libipc-run-perl, libstring-shellquote-perl
+Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends},
+ gridengine-client, libipc-run-perl, libstring-shellquote-perl, python
 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
diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index 4668fc2..26c46d7 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -1,4 +1,4 @@
-#!/usr/bin/python2 -Es
+#!/usr/bin/python -Es
 # -*- coding: utf-8 -*-
 #
 # Submit a job to the job grid.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67cfe7341eecb29ee8c1141dd260ef5a29e98114
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Do not create sudo policies for chown ("-chmod")

2017-02-25 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott, Alex Monk, Madhuvishy, Chasemp, Yuvipanda,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Do not create sudo policies for chown ("-chmod")
..

Do not create sudo policies for chown ("-chmod")

Initially on Tool Labs users were supposed to fix ownership issues in
the home directories of their tools by executing:

| sudo /bin/chown -R tools.$TOOL:tools.$TOOL /data/project/$TOOL

This usage was never promoted and so did not catch on, but was
replaced by the utility take(1) which allows tool accounts to assume
ownership of files in their home directories if they share a group
with the files.

This change thus removes the creation of the unpromoted and unused
sudo policies.  After merging, existing sudo policies
"tools.$TOOL-chmod" can be removed manually.

Change-Id: Ie13f33765e7c3995b001e754ed2c8e81eb1eea3a
---
M nova/OpenStackNovaServiceGroup.php
1 file changed, 0 insertions(+), 14 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager 
refs/changes/32/339832/1

diff --git a/nova/OpenStackNovaServiceGroup.php 
b/nova/OpenStackNovaServiceGroup.php
index d1d18dc..f8404de 100644
--- a/nova/OpenStackNovaServiceGroup.php
+++ b/nova/OpenStackNovaServiceGroup.php
@@ -353,20 +353,6 @@
return null;
}
 
-   # Create Sudo policy so that the service user can chown files 
in its homedir
-   if ( OpenStackNovaSudoer::createSudoer( $groupName . '-chmod',
-   $project->getProjectName(),
-   array( $groupName ),
-   array(),
-   array( '/bin/chown -R ' . $groupName . '\:' . 
$groupName . ' ' . $homeDir ),
-   array( '!authenticate' ) ) ) {
-   $ldap->printDebug( "Successfully created chmod sudo 
policy for $groupName",
-   NONSENSITIVE );
-   } else {
-   $ldap->printDebug( "Failed to  creat chmod sudo policy 
for $groupName",
-   NONSENSITIVE );
-   }
-
# Create Sudo policy so that members of the group can sudo as 
the service user
if ( OpenStackNovaSudoer::createSudoer( 'runas-' . $groupName,
$project->getProjectName(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie13f33765e7c3995b001e754ed2c8e81eb1eea3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Revert "Set minimum requirement of websocket-client"

2017-02-24 Thread Tim Landscheidt (Code Review)
Hello Anoopchandu18, John Vandenberg, jenkins-bot, Xqt,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Set minimum requirement of websocket-client"
..

Revert "Set minimum requirement of websocket-client"

Pywikibot does not depend on a particular version of websocket-client;
in fact it does not even interact directly with its API.  Stating a
requirement on a particular version because some bug was fixed there
has the disadvantage that it disallows previous versions to be used
where the bug did not occur (< 0.27.0), and it also prevents
backporting fixes (0.27.1 or 0.27.0~local_patch).

This change reverts commit b96e7f57905751c08a0b5c5197d47dff3bcfe182.

Change-Id: Ie2ba76cf0280dc095539c6b2648adc5e67085782
---
M requirements.txt
M setup.py
2 files changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/07/339807/1

diff --git a/requirements.txt b/requirements.txt
index 0aeb72d..9b4400a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -54,9 +54,6 @@
 google >= 1.7
 socketIO-client<0.6.1
 
-# websocket-client>=0.33 is required by socketIO-client (T114913)
-websocket-client>=0.33
-
 # scripts/script_wui.py:
 crontab
 
diff --git a/setup.py b/setup.py
index f688df5..06f3f03 100644
--- a/setup.py
+++ b/setup.py
@@ -61,8 +61,7 @@
 'mwparserfromhell': ['mwparserfromhell>=0.3.3'],
 'Tkinter': ['Pillow'],
 # 0.6.1 supports socket.io 1.0, but WMF is using 0.9 (T91393 and T85716)
-# websocket-client>=0.33 is required by socketIO-client (T114913)
-'rcstream': ['socketIO-client<0.6.1', 'websocket-client>=0.33'],
+'rcstream': ['socketIO-client<0.6.1'],
 'security': ['requests[security]'],
 'mwoauth': ['mwoauth>=0.2.4'],
 'html': ['BeautifulSoup4'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2ba76cf0280dc095539c6b2648adc5e67085782
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Anoopchandu18 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: graphite: Unquote octal number in parameter default

2017-02-22 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: graphite: Unquote octal number in parameter default
..

graphite: Unquote octal number in parameter default

Change-Id: I96f8a4e5240454cf17cd2ab5e19931b67bb5bca3
---
M modules/graphite/files/archive-instances
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/graphite/files/archive-instances 
b/modules/graphite/files/archive-instances
index b80702b..7b7f0d0 100755
--- a/modules/graphite/files/archive-instances
+++ b/modules/graphite/files/archive-instances
@@ -41,7 +41,7 @@
 ))
 
 
-def makedirs_exist_ok(path, mode='0o777'):
+def makedirs_exist_ok(path, mode=0o777):
 try:
 os.makedirs(path, mode)
 except OSError as exc:  # Python >2.5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96f8a4e5240454cf17cd2ab5e19931b67bb5bca3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: Update links to Tool Labs apt repository

2017-02-22 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339201 )

Change subject: Update links to Tool Labs apt repository
..

Update links to Tool Labs apt repository

Bug: T158383
Change-Id: I93acba0180ef9ba4ede13a2c60e779c470c00d15
---
M base/tools.list
M trusty-legacy/tools.list
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/docker-images/toollabs-images 
refs/changes/01/339201/1

diff --git a/base/tools.list b/base/tools.list
index 8d01227..871ed51 100644
--- a/base/tools.list
+++ b/base/tools.list
@@ -1 +1 @@
-deb [trusted=yes] http://deb.tools.wmflabs.org/repo jessie-tools main
+deb [trusted=yes] http://deb-tools.wmflabs.org/repo jessie-tools main
diff --git a/trusty-legacy/tools.list b/trusty-legacy/tools.list
index 2f1c56f..06acaa4 100644
--- a/trusty-legacy/tools.list
+++ b/trusty-legacy/tools.list
@@ -1 +1 @@
-deb [trusted=yes] http://deb.tools.wmflabs.org/repo trusty-tools main
+deb [trusted=yes] http://deb-tools.wmflabs.org/repo trusty-tools main

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93acba0180ef9ba4ede13a2c60e779c470c00d15
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/toollabs-images
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ganglia: Remove now-duplicate parser function suffix()

2017-02-21 Thread Tim Landscheidt (Code Review)
Hello Giuseppe Lavagetto,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: ganglia: Remove now-duplicate parser function suffix()
..

ganglia: Remove now-duplicate parser function suffix()

stdlib was upgraded to 4.15.0 with
5c04d25eee93d64a63ebf5da0b0c581b1696b896.  That change included a new
parser function suffix() that had been added previously to the ganglia
module.

This change removes the now-duplicate instance in the ganglia module.

Change-Id: Idc9580d71260619a739ed84573e7aaef08a8e0a6
---
D modules/ganglia/lib/puppet/parser/functions/suffix.rb
1 file changed, 0 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/339069/1

diff --git a/modules/ganglia/lib/puppet/parser/functions/suffix.rb 
b/modules/ganglia/lib/puppet/parser/functions/suffix.rb
deleted file mode 100644
index f7792d6..000
--- a/modules/ganglia/lib/puppet/parser/functions/suffix.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# suffix.rb
-#
-
-module Puppet::Parser::Functions
-  newfunction(:suffix, :type => :rvalue, :doc => <<-EOS
-This function applies a suffix to all elements in an array.
-
-*Examples:*
-
-suffix(['a','b','c'], 'p')
-
-Will return: ['ap','bp','cp']
-EOS
-  ) do |arguments|
-
-# Technically we support two arguments but only first is mandatory ...
-raise(Puppet::ParseError, "suffix(): Wrong number of arguments " +
-  "given (#{arguments.size} for 1)") if arguments.size < 1
-
-array = arguments[0]
-
-unless array.is_a?(Array)
-  raise Puppet::ParseError, "suffix(): expected first argument to be an 
Array, got #{array.inspect}"
-end
-
-suffix = arguments[1] if arguments[1]
-
-if suffix
-  unless suffix.is_a? String
-raise Puppet::ParseError, "suffix(): expected second argument to be a 
String, got #{suffix.inspect}"
-  end
-end
-
-# Turn everything into string same as join would do ...
-result = array.collect do |i|
-  i = i.to_s
-  suffix ? i + suffix : i
-end
-
-return result
-  end
-end
-
-# vim: set ts=2 sw=2 et :

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc9580d71260619a739ed84573e7aaef08a8e0a6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolserver_legacy: Use Redirect instead of RedirectMatch

2017-02-18 Thread Tim Landscheidt (Code Review)
Hello DatGuy, Dzahn,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: toolserver_legacy: Use Redirect instead of RedirectMatch
..

toolserver_legacy: Use Redirect instead of RedirectMatch

Change-Id: Ic79292fdc3c1d54ba58b32aaa157e74d81533143
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 0657086..3fd77d5 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -214,7 +214,7 @@
 Redirect 301 /~magnus/geohack https://tools.wmflabs.org/geohack
 Redirect 301 /~magnus/geo https://tools.wmflabs.org/geohack
 Redirect 301 /~magnus/joanjoc/sugart.php 
https://tools.wmflabs.org/joanjoc/sugart.php
-RedirectMatch 301 \/~magnus\/(.*) https://tools.wmflabs.org/magnustools/$1
+Redirect 301 /~magnus https://tools.wmflabs.org/magnustools
 Redirect 301 /~master https://tools.wmflabs.org/wiwosm
 Redirect 303 /~mathbot https://tools.wmflabs.org/mathbot/
 Redirect 301 /~multichill/coordinates.php 
https://tools.wmflabs.org/locator/coordinates.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic79292fdc3c1d54ba58b32aaa157e74d81533143
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: DatGuy 
Gerrit-Reviewer: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet: Remove templatedir setting

2017-02-18 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338540 )

Change subject: puppet: Remove templatedir setting
..

puppet: Remove templatedir setting

All templates are now part of modules, eliminating the need for the
global templates/ directory.

Bug: T95158
Change-Id: I063781e9fd1fb09ef2b250eae0c2ca407a3fea04
---
M modules/puppet/templates/self.conf.erb
M modules/puppetmaster/templates/master.conf.erb
D templates/DO_NOT_ADD_FILES_HERE
3 files changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/338540/1

diff --git a/modules/puppet/templates/self.conf.erb 
b/modules/puppet/templates/self.conf.erb
index 831fd44..f3ce85c 100644
--- a/modules/puppet/templates/self.conf.erb
+++ b/modules/puppet/templates/self.conf.erb
@@ -29,7 +29,6 @@
 bindaddress = <%= bindaddress %>
 certname = <%= certname %>
 thin_storeconfigs = true
-templatedir = /etc/puppet/templates
 modulepath = 
/etc/puppet/secret/modules:/etc/puppet/private/modules:/etc/puppet/modules
 
 # SSL
diff --git a/modules/puppetmaster/templates/master.conf.erb 
b/modules/puppetmaster/templates/master.conf.erb
index f422c7d..5a16a6d 100644
--- a/modules/puppetmaster/templates/master.conf.erb
+++ b/modules/puppetmaster/templates/master.conf.erb
@@ -1,7 +1,6 @@
 
 [master]
 certname = <%= scope.lookupvar('puppetmaster::server_name') %>
-templatedir = /etc/puppet/templates
 <% if @is_37_plus >= 0 %>base<% end %>modulepath = 
/etc/puppet/private/modules:/etc/puppet/modules
 
 # puppetmaster($config) settings
diff --git a/templates/DO_NOT_ADD_FILES_HERE b/templates/DO_NOT_ADD_FILES_HERE
deleted file mode 100644
index 95774ce..000
--- a/templates/DO_NOT_ADD_FILES_HERE
+++ /dev/null
@@ -1,5 +0,0 @@
-Using a templatedir is not only deprecated, but also prints large red
-warnings for every damn catalog compilation or other puppet action. 
-
-We're getting rid of them as fast as possible. If you add one, well,
-that means you've done so disregarding this large sign...

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I063781e9fd1fb09ef2b250eae0c2ca407a3fea04
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolserver_legacy: Add redirect for ~wiegels/wikipedia-termi...

2017-02-09 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336764 )

Change subject: toolserver_legacy: Add redirect for 
~wiegels/wikipedia-termine.php
..

toolserver_legacy: Add redirect for ~wiegels/wikipedia-termine.php

Bug: T62888
Change-Id: I192139869dd3fb1d0aad472a1b5c0f4e8eea36d8
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/336764/1

diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 5ac33e8..0657086 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -277,6 +277,7 @@
 Redirect 301 /~webboy/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/nlwiki
 Redirect 301 /~webboy/nowiki/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/nowiki
 Redirect 301 /~webboy/commonswiki/stats.php 
https://tools.wmflabs.org/unpatrollededitstats/commonswiki
+Redirect 301 /~wiegels/wikipedia-termine.php 
https://tools.wmflabs.org/icalendar/
 Redirect 301 /~wikifeeds https://tools.wmflabs.org/wikifeeds/
 
 # things that are GONE and clients should stop even trying

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I192139869dd3fb1d0aad472a1b5c0f4e8eea36d8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Remove toolwatcher

2017-02-07 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336425 )

Change subject: Remove toolwatcher
..

Remove toolwatcher

toolwatcher has been replaced by operation/puppet's
modules/role/files/labs/db/maintain-dbusers.py and
modules/toollabs/files/maintain-kubeusers.  The directories cgi-bin
and public_html are no longer created by default.

Change-Id: I644bc5cd8d2d2cc0d94d3a8884ff8b33e11dd135
---
M configure.ac
M debian/changelog
M debian/misctools.install
M debian/misctools.manpages
M misctools/.gitignore
M misctools/Makefile.am
D misctools/toolwatcher
D misctools/toolwatcher.8.in
8 files changed, 7 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/25/336425/1

diff --git a/configure.ac b/configure.ac
index 5041f1f..1cc660e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,6 @@
  misctools/Makefile
  misctools/become.1
  misctools/list-user-databases.1
- misctools/toolwatcher.8
  src/Makefile
  src/take.1
  tests/Makefile])
diff --git a/debian/changelog b/debian/changelog
index b17cf44..c6f5d53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.19~dev) unstable; urgency=medium
+
+  * Remove toolwatcher
+
+ -- Tim Landscheidt   Tue, 07 Feb 2017 15:57:45 +
+
 toollabs (1.18) unstable; urgency=medium
 
   * jsub: Change IOError string substitution conversion from '%e'
diff --git a/debian/misctools.install b/debian/misctools.install
index 7493d64..8480b2b 100644
--- a/debian/misctools.install
+++ b/debian/misctools.install
@@ -2,4 +2,3 @@
 usr/bin/list-user-databases
 usr/bin/take
 usr/bin/setup-tomcat
-usr/sbin/toolwatcher
diff --git a/debian/misctools.manpages b/debian/misctools.manpages
index e198cda..52c8ebc 100644
--- a/debian/misctools.manpages
+++ b/debian/misctools.manpages
@@ -1,4 +1,3 @@
 debian/tmp/usr/share/man/man1/become.1
 debian/tmp/usr/share/man/man1/list-user-databases.1
 debian/tmp/usr/share/man/man1/take.1
-debian/tmp/usr/share/man/man8/toolwatcher.8
diff --git a/misctools/.gitignore b/misctools/.gitignore
index c4d5659..5b26402 100644
--- a/misctools/.gitignore
+++ b/misctools/.gitignore
@@ -2,4 +2,3 @@
 /Makefile.in
 /become.1
 /list-user-databases.1
-/toolwatcher.8
diff --git a/misctools/Makefile.am b/misctools/Makefile.am
index c8e19e7..4d2ee2b 100644
--- a/misctools/Makefile.am
+++ b/misctools/Makefile.am
@@ -1,3 +1,2 @@
-man_MANS = become.1 list-user-databases.1 toolwatcher.8
+man_MANS = become.1 list-user-databases.1
 bin_SCRIPTS = become list-user-databases setup-tomcat
-sbin_SCRIPTS = toolwatcher
diff --git a/misctools/toolwatcher b/misctools/toolwatcher
deleted file mode 100755
index 35d0d50..000
--- a/misctools/toolwatcher
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Copyright © 2013 Marc-André Pelletier 
-#
-# 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
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-cd /data/project
-export HOME=/root
-PREFIX=$(cat /etc/wmflabs-project)
-
-while true; do
-# Iterate over all service groups of this project.
-getent passwd | sed -ne "s/^$PREFIX\\.\([^:]\+\):.*\$/\\1/p;" | while read 
TOOL; do
-# If the service group's home directory doesn't exist already,
-# create it with a basic structure and especially set setgid
-# on the directories so that files created are owned by the
-# service group's group.
-if [ ! -d "$TOOL" ]; then
-logger -t toolwatcher "Creating tool $TOOL"
-
-mkdir -m u=rwx,g=rwsx,o=rx "$TOOL" "$TOOL/public_html"
-chown -R "$PREFIX.$TOOL:$PREFIX.$TOOL" "$TOOL"
-fi
-done
-
-# Sleep for two minutes.
-sleep 120
-done
diff --git a/misctools/toolwatcher.8.in b/misctools/toolwatcher.8.in
deleted file mode 100644
index db072cb..000
--- a/misctools/toolwatcher.8.in
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH TOOLWATCHER 8 @TOOLLABS_RELEASEDATE@ @PACKAGE_VERSION@ "Wikimedia Labs 
Tools misctools"
-.SH NAME
-toolwatcher \- create home directories for tool accounts
-.SH SYNOPSIS
-.B toolwatcher
-.SH DESCRIPTION
-.B toolwatcher
-is a daemon that 

[MediaWiki-commits] [Gerrit] integration/config[master]: operations/software/tools-manifest: Make debian-glue voting

2017-02-06 Thread Tim Landscheidt (Code Review)
Hello Hashar,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: operations/software/tools-manifest: Make debian-glue voting
..

operations/software/tools-manifest: Make debian-glue voting

Bug: T156651
Change-Id: I8e2ddd007492b14fd4231cc515b354a107afd069
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/69/336369/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 222461f..31e2be0 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2457,7 +2457,9 @@
 template:
   - name: tox-jessie
 test:
-  - debian-glue-non-voting
+  - debian-glue
+gate-and-submit:
+  - debian-glue
 
   - name: operations/software/tools-webservice
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e2ddd007492b14fd4231cc515b354a107afd069
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Hashar 

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


[MediaWiki-commits] [Gerrit] operations...tools-manifest[master]: Cut release 0.11

2017-02-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336368 )

Change subject: Cut release 0.11
..

Cut release 0.11

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/68/336368/1

diff --git a/debian/changelog b/debian/changelog
index f21fc13..49c44c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-tools-manifest (0.11~dev) trusty; urgency=medium
+tools-manifest (0.11) trusty; urgency=medium
 
   * Correct weekday in changelog entry
   * Add extended description to control
   * Generate man page for collector-runner
   * Do not manage service with package scripts
 
- -- Tim Landscheidt   Tue, 07 Feb 2017 03:41:10 +
+ -- Tim Landscheidt   Tue, 07 Feb 2017 04:17:35 +
 
 tools-manifest (0.10) trusty; urgency=low
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a9a105994c2b20db935661658c234a103bd0d20
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations...tools-manifest[master]: Do not manage service with package scripts

2017-02-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336367 )

Change subject: Do not manage service with package scripts
..

Do not manage service with package scripts

dh_installinit does not seem to generate a postrm script for
upstart-only services.  However as the service is explicitly managed
by Puppet, there is no need for starting or stopping the service on
package installation or removal anyway, so this change disables
dh_installinit amending the package scripts.

Bug: T156651
Change-Id: I22370a5d6c8e89ab7aa99d6a0e667a7e4ae5dc43
---
M debian/changelog
M debian/rules
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/67/336367/1

diff --git a/debian/changelog b/debian/changelog
index 4b2122f..f21fc13 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,9 @@
   * Correct weekday in changelog entry
   * Add extended description to control
   * Generate man page for collector-runner
+  * Do not manage service with package scripts
 
- -- Tim Landscheidt   Sun, 05 Feb 2017 06:33:23 +
+ -- Tim Landscheidt   Tue, 07 Feb 2017 03:41:10 +
 
 tools-manifest (0.10) trusty; urgency=low
 
diff --git a/debian/rules b/debian/rules
index 05287db..80bfd91 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,5 +18,9 @@
rm -f collector-runner.1
dh_clean
 
+# The service is explicitly managed by Puppet, so there is no need to
+# start or stop it on package installation or removal.  In addition,
+# dh_installinit does not seem to generate a postrm script for
+# upstart-only services.
 override_dh_installinit:
-   dh_installinit --name=webservicemonitor
+   dh_installinit --noscripts --name=webservicemonitor

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22370a5d6c8e89ab7aa99d6a0e667a7e4ae5dc43
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Do not install adminbot

2017-02-06 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336351 )

Change subject: Tools: Do not install adminbot
..

Tools: Do not install adminbot

The package adminbot was used exclusively by the tool morebots which
has been replaced by the tool stashbot.

Bug: T157400
Change-Id: I8c875b5a027f9155edccb351befe2ca4701154f9
---
M modules/toollabs/manifests/exec_environ.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/336351/1

diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 2082338..2e48512 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -238,7 +238,6 @@
 'tesseract-ocr-vie',
 
 # Other packages
-'adminbot',
 'bison',   # T67974.
 'calibre', # T100165
 'csh', # common user request

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c875b5a027f9155edccb351befe2ca4701154f9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: k8s: Use same logic for systemd and upstart configuration

2017-02-06 Thread Tim Landscheidt (Code Review)
Hello Madhuvishy, Chasemp, Yuvipanda, Alexandros Kosiaris,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: k8s: Use same logic for systemd and upstart configuration
..

k8s: Use same logic for systemd and upstart configuration

Currently the options "--masquerade-all=true" and
"--proxy-mode=iptables" are passed unconditionally to kube-proxy in
upstart environments, but depend on class parameters in systemd.  This
change uses the latter logic for upstart as well.

Change-Id: I543dd37c20760d90c5a102805be8a50849b0090e
---
M modules/k8s/templates/initscripts/kube-proxy.upstart.erb
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/336238/1

diff --git a/modules/k8s/templates/initscripts/kube-proxy.upstart.erb 
b/modules/k8s/templates/initscripts/kube-proxy.upstart.erb
index bd1ae24..61cbd8e 100644
--- a/modules/k8s/templates/initscripts/kube-proxy.upstart.erb
+++ b/modules/k8s/templates/initscripts/kube-proxy.upstart.erb
@@ -5,9 +5,16 @@
 setuid root
 setgid root
 
+<%-
+daemon_args = ['--kubeconfig=/etc/kubernetes/kubeconfig']
+if @proxy_mode
+   daemon_args.push("--proxy-mode=#{@proxy_mode}")
+end
+if @masquerade_all
+   daemon_args.push("--masquerade-all=true")
+end
+-%>
 exec /usr/bin/kube-proxy \
---kubeconfig=/etc/kubernetes/kubeconfig \
---proxy-mode=iptables \
---masquerade-all=true
+<%= daemon_args.join(" \\\n") %>
 
 respawn

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I543dd37c20760d90c5a102805be8a50849b0090e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: k8s: Update path to kube-proxy

2017-02-06 Thread Tim Landscheidt (Code Review)
Hello Chasemp, Yuvipanda, Alexandros Kosiaris,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: k8s: Update path to kube-proxy
..

k8s: Update path to kube-proxy

Bug: T157243
Change-Id: Id046776e09a71c798b8aaa791fe5f70f333a060a
---
M modules/k8s/templates/initscripts/kube-proxy.upstart.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/336214/1

diff --git a/modules/k8s/templates/initscripts/kube-proxy.upstart.erb 
b/modules/k8s/templates/initscripts/kube-proxy.upstart.erb
index 4609577..bd1ae24 100644
--- a/modules/k8s/templates/initscripts/kube-proxy.upstart.erb
+++ b/modules/k8s/templates/initscripts/kube-proxy.upstart.erb
@@ -5,7 +5,7 @@
 setuid root
 setgid root
 
-exec /usr/local/bin/kube-proxy \
+exec /usr/bin/kube-proxy \
 --kubeconfig=/etc/kubernetes/kubeconfig \
 --proxy-mode=iptables \
 --masquerade-all=true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id046776e09a71c798b8aaa791fe5f70f333a060a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Do not hardcore database hosts in list-user-databases

2017-02-05 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336171 )

Change subject: Do not hardcore database hosts in list-user-databases
..

Do not hardcore database hosts in list-user-databases

The database host that served c2.labsdb was decommissioned and is no
longer accessible.  This causes list-user-databases to fail because
c2.labsdb is in the hardcoded list of database servers to check for a
user's databases.

There is no easy authoritative source for a list of active database
servers; role::labs::db::maintain_dbusers lists all database servers,
but does not differentiate between hosts that are accessible from the
Labs network and hosts that are firewalled.  Therefore this change
removes the hardcoded list completely and instead requires that
list-user-databases is called with an explicit list of database
servers to check for a user's database.

For the active database servers current at the time of this change,
list-user-databases would be invoked as:

| $ list-user-databases -H labsdb1001.eqiad.wmnet \
|   -H labsdb1003.eqiad.wmnet \
|   -H labsdb1005.eqiad.wmnet \
|   /path/to/replica.my.cnf

Change-Id: I861375502a04a839db69fa1b92e4acfecf6470e1
---
M debian/changelog
M misctools/list-user-databases
M misctools/list-user-databases.1.in
3 files changed, 27 insertions(+), 9 deletions(-)


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

diff --git a/debian/changelog b/debian/changelog
index b17cf44..32d9cfa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.19) unstable; urgency=medium
+
+  * Do not hardcore database hosts in list-user-databases
+
+ -- Tim Landscheidt   Sun, 05 Feb 2017 22:22:41 +
+
 toollabs (1.18) unstable; urgency=medium
 
   * jsub: Change IOError string substitution conversion from '%e'
diff --git a/misctools/list-user-databases b/misctools/list-user-databases
index cc9f374..5dc81eb 100755
--- a/misctools/list-user-databases
+++ b/misctools/list-user-databases
@@ -7,12 +7,13 @@
 
 import mysql.connector
 
-# Servers to search databases on.
-DATABASE_SERVERS = ('c1.labsdb', 'c2.labsdb', 'c3.labsdb', 'tools.labsdb')
-
 if __name__ == '__main__':
 # Get list of defaults files to extract user information from.
 parser = argparse.ArgumentParser(description='List databases owned by 
users, given by the credentials files.')
+parser.add_argument('-H', '--host',
+action='append',
+required=True,
+help='database hosts to check')
 parser.add_argument('mycnffilenames',
 metavar='MYCNFFILENAME',
 nargs='+',
@@ -25,7 +26,7 @@
 username = c.get('client', 'user').strip("'")
 password = c.get('client', 'password').strip("'")
 databases_found = []
-for server in DATABASE_SERVERS:
+for server in args.host:
 conn = mysql.connector.connect(user=username,
password=password,
host=server,
diff --git a/misctools/list-user-databases.1.in 
b/misctools/list-user-databases.1.in
index d32ec71..0af7574 100644
--- a/misctools/list-user-databases.1.in
+++ b/misctools/list-user-databases.1.in
@@ -2,16 +2,27 @@
 .SH NAME
 list-user-databases \- list databases a MySQL account has access to
 .SH SYNOPSIS
-.B list-user-databases
+.B list-user-databases -H
+.I host
+.RB [ -H
+.I host
+\[char46]..]
 .I filename
-.RI [filename ...]
+.RI [ filename
+\[char46]..]
 .SH DESCRIPTION
 .B list-user-databases
-lists all databases on the replica servers and
-.I tools.labsdb
-that the user has access to whose
+lists all databases on the given database servers that the user has
+access to whose
 .I replica.my.cnf
 file has been given as a command line argument.
+
+A list of potential database servers to check against can be gathered
+from
+.IR operation/puppet 's
+.IR modules/role/manifests/labs/db/maintain_dbusers.pp .
+Note that some of the database servers listed there are not accessible
+from Labs and connection attempts will time out.
 .SH EXIT STATUS
 In case of success,
 .B list-user-databases

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I861375502a04a839db69fa1b92e4acfecf6470e1
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Remove create-dbusers

2017-02-05 Thread Tim Landscheidt (Code Review)
Hello Madhuvishy, Chasemp, Yuvipanda,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: labstore: Remove create-dbusers
..

labstore: Remove create-dbusers

create-dbusers was replaced by maintain-dbusers in
c5f0338767a4394b3d82de3283455379f62eee21.  This change removes the
remnant and now unused file and a reference to it that only made sense
during the migration.

Change-Id: I1cf97904cc20582d256ccb3c3e7e74c720a3a80a
---
D modules/labstore/files/create-dbusers
M modules/role/files/labs/db/maintain-dbusers.py
2 files changed, 1 insertion(+), 334 deletions(-)


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

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
deleted file mode 100755
index edea94a..000
--- a/modules/labstore/files/create-dbusers
+++ /dev/null
@@ -1,332 +0,0 @@
-#!/usr/bin/python3
-"""
-This script does the following:
-
-  - Check if users / service groups in opted in projects have
-a replica.my.cnf file with mysql credentials
-  - If they do not exist, create a mysql user, give them
-appropriate grants and write the replica.my.cnf file
-  - If there is no replica.my.cnf but grants already exist, do
-nothing. This needs to be fixed with appropriate solution
-later on - either by recreating the replica.my.cnf or...
-something else
-  - perms for grant files (how the user gets the creds + password)
-are 0400 and chattr +i making them user readonly and immutable.
-"""
-import logging
-import argparse
-import ldap3
-import pymysql
-import yaml
-import os
-import string
-import random
-import configparser
-import io
-import time
-import subprocess
-
-
-class User:
-
-def __init__(self, project, name, uid, kind):
-self.project = project
-self.name = name
-self.uid = int(uid)
-
-if kind not in ['user', 'servicegroup']:
-raise("{} not allowed".format(kind))
-
-self.kind = kind
-
-self.project_root = '/exp/project'
-
-@property
-def db_username(self):
-"""
-The db username to use for this user.
-
-Guaranteed to be of the form (s|u)\d+
-"""
-prefix = 'u' if self.kind == 'user' else 's'
-return prefix + str(self.uid)
-
-@property
-def homedir(self):
-prefix = os.path.join(self.project_root, self.project)
-
-if self.kind == 'user':
-trail = os.path.join(prefix,
- 'home',
- self.name,
-)
-else:
-trail = os.path.join(prefix,
- 'project',
- self.name[len(self.project) + 1:],
-)
-
-return trail
-
-def __repr__(self):
-return "%s(name=%s, uid=%s)" % (
-self.kind, self.name, self.uid)
-
-@classmethod
-def from_ldap_servicegroups(cls, conn, project):
-
-logging.debug('Collecting servicegroups from ldap for 
{}'.format(project))
-conn.search(
-'ou=people,ou=servicegroups,dc=wikimedia,dc=org',
-'(cn=%s.*)' % project,
-ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
-attributes=['uidNumber', 'cn'],
-time_limit=5
-)
-
-users = []
-for resp in conn.response:
-attrs = resp['attributes']
-users.append(cls(project, attrs['cn'][0], attrs['uidNumber'][0], 
'servicegroup'))
-
-logging.debug('Found {} ldap servicegroups'.format(len(users)))
-logging.debug('First 10 members of ldap servicegroups: 
{}'.format(users[:10]))
-return users
-
-@classmethod
-def from_ldap_users(cls, conn, project):
-
-logging.debug('Collecting ldap users for {}'.format(project))
-conn.search(
-'ou=groups,dc=wikimedia,dc=org',
-'(cn=project-%s)' % project,
-ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
-attributes=['member']
-)
-
-users = []
-members = conn.response[0]['attributes']['member']
-
-logging.debug('Found {} ldap users'.format(len(members)))
-logging.debug('First 10 members of ldap users: {} 
...'.format(members[:10]))
-
-# example member: uid=foo,ou=people,dc=wikimedia,dc=org
-for member in members:
-
-# strip off all but 'uid=foo'
-search_string = member.replace(',ou=people,dc=wikimedia,dc=org', 
'')
-
-conn.search(
-'ou=people,dc=wikimedia,dc=org',
-'(%s)' % search_string,
-ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
-attributes=['uid', 'uidNumber']
-)
-
-# Example of ldap query response:
-# [
-# 

[MediaWiki-commits] [Gerrit] operations...tools-manifest[master]: Add extended description to control

2017-02-04 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336056 )

Change subject: Add extended description to control
..

Add extended description to control

Bug: T156651
Change-Id: Ic4aa4ddb42e8574fca29b66d12faf57cd7a1d5fb
---
M debian/changelog
M debian/control
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/56/336056/1

diff --git a/debian/changelog b/debian/changelog
index d574e04..41571ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 tools-manifest (0.11~dev) trusty; urgency=medium
 
   * Correct weekday in changelog entry
+  * Add extended description to control
 
- -- Tim Landscheidt   Sun, 05 Feb 2017 06:15:27 +
+ -- Tim Landscheidt   Sun, 05 Feb 2017 06:20:38 +
 
 tools-manifest (0.10) trusty; urgency=low
 
diff --git a/debian/control b/debian/control
index 03ed4dd..256cc26 100644
--- a/debian/control
+++ b/debian/control
@@ -9,3 +9,6 @@
 Architecture: all
 Depends: ${misc:Depends}, ${python3:Depends}
 Description: Infrastructure for running services on tools.wmflabs.org
+
+tools-manifest sets up an upstart service that (re-)starts webservices
+if a tool's service.manifest requires it, but no running webservice is found.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4aa4ddb42e8574fca29b66d12faf57cd7a1d5fb
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations...tools-manifest[master]: Generate man page for collector-runner

2017-02-04 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336057 )

Change subject: Generate man page for collector-runner
..

Generate man page for collector-runner

Bug: T156651
Change-Id: I1df500f9101448f68e1558bd0eff0843e31ac377
---
M debian/changelog
M debian/control
M debian/rules
3 files changed, 19 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/57/336057/1

diff --git a/debian/changelog b/debian/changelog
index 41571ed..4b2122f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@
 
   * Correct weekday in changelog entry
   * Add extended description to control
+  * Generate man page for collector-runner
 
- -- Tim Landscheidt   Sun, 05 Feb 2017 06:20:38 +
+ -- Tim Landscheidt   Sun, 05 Feb 2017 06:33:23 +
 
 tools-manifest (0.10) trusty; urgency=low
 
diff --git a/debian/control b/debian/control
index 256cc26..0e92b15 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,8 @@
 Maintainer: Yuvi Panda 
 Section: python
 Priority: optional
-Build-Depends: python3-setuptools, python3-all, debhelper (>= 9)
+Build-Depends: debhelper (>= 9), help2man, python3-setuptools,
+ python3-all
 Standards-Version: 3.9.5
 
 Package: tools-manifest
diff --git a/debian/rules b/debian/rules
index 7c58135..371c0c6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,22 @@
 #!/usr/bin/make -f
 
+DEB_VERSION=$(shell dpkg-parsechangelog | sed -rne \
+'s,^Version: ([^-]+).*,\1,p')
+
 %:
dh $@ --with python3 --buildsystem=pybuild
 
+collector-runner.1:
+   PYTHONPATH=${CURDIR} help2man --no-info \
+   --version-string="${DEB_VERSION}" -o $@ \
+   $(CURDIR)/debian/tools-manifest/usr/bin/collector-runner
+
+override_dh_installman: collector-runner.1
+   dh_installman collector-runner.1
+
+clean:
+   rm -f collector-runner.1
+   dh $@ --with python3 --buildsystem=pybuild
+
 override_dh_installinit:
dh_installinit --name=webservicemonitor

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1df500f9101448f68e1558bd0eff0843e31ac377
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations...tools-manifest[master]: Correct weekday in changelog entry

2017-02-04 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336055 )

Change subject: Correct weekday in changelog entry
..

Correct weekday in changelog entry

Bug: T156651
Change-Id: Ic1925d09e54ec60cc58f561f342905382b155ef9
---
M debian/changelog
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/55/336055/1

diff --git a/debian/changelog b/debian/changelog
index 9554278..d574e04 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
+tools-manifest (0.11~dev) trusty; urgency=medium
+
+  * Correct weekday in changelog entry
+
+ -- Tim Landscheidt   Sun, 05 Feb 2017 06:15:27 +
+
 tools-manifest (0.10) trusty; urgency=low
 
   * Only monitor gridengine webservices (ignore k8s ones)
 
- -- Yuvi Panda   Tue, 6 Jun 2016 16:30:00 -0800
+ -- Yuvi Panda   Mon, 6 Jun 2016 16:30:00 -0800
 
 tools-manifest (0.9) trusty; urgency=low
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1925d09e54ec60cc58f561f342905382b155ef9
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations...tools-webservice[master]: Wait for the Kubernetes pod to shut down after "stop"

2017-02-04 Thread Tim Landscheidt (Code Review)
Hello Yuvipanda,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Wait for the Kubernetes pod to shut down after "stop"
..

Wait for the Kubernetes pod to shut down after "stop"

Currently, with the Kubernetes backend "webservice stop" only waits
until the corresponding service and deployment have been deleted, but
not the pod itself.  If a webservice is started immediately
afterwards, for example by "webservice restart", this means that for a
short while two pods can exist, one for the terminating and one for
the starting webservice.  This causes the script to fail because it
cannot cope with two parallel webservice pods, and there are probably
other code paths that do not expect this.  In addition, this behaviour
can be surprising to users and administrators because the SGE backend
waits for the webservice job to be gone.

This change amends the logic of "webservice stop" for Kubernetes
backends so that it wait until the webservice pod has been deleted.

Bug: T156626
Change-Id: I51a38c5a6c096f269669e8fdfd3ac19af24ec20b
---
M debian/changelog
M toollabs/webservice/backends/kubernetesbackend.py
2 files changed, 14 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/tools-webservice 
refs/changes/49/336049/1

diff --git a/debian/changelog b/debian/changelog
index 8c99636..b31375a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs-webservice (0.33~dev) unstable; urgency=medium
+
+  * Wait for the Kubernetes pod to shut down after "stop"
+
+ -- Tim Landscheidt   Sun, 05 Feb 2017 03:15:10 +
+
 toollabs-webservice (0.32) trusty; urgency=medium
 
   * change absolute kubectl path to '/usr/bin/kubectl'
diff --git a/toollabs/webservice/backends/kubernetesbackend.py 
b/toollabs/webservice/backends/kubernetesbackend.py
index 39a6bbd..808f43c 100644
--- a/toollabs/webservice/backends/kubernetesbackend.py
+++ b/toollabs/webservice/backends/kubernetesbackend.py
@@ -380,15 +380,18 @@
 self._delete_obj(pykube.Pod, self.webservice_label_selector)
 
 def get_state(self):
+pod = self._find_obj(pykube.Pod, self.webservice_label_selector)
+if pod is not None:
+if pod.obj['status']['phase'] == 'Running':
+return Backend.STATE_RUNNING
+elif  pod.obj['status']['phase'] == 'Pending':
+return Backend.STATE_PENDING
 svc = self._find_obj(pykube.Service, self.webservice_label_selector)
 deployment = self._find_obj(pykube.Deployment, 
self.webservice_label_selector)
 if svc is not None and deployment is not None:
-pod = self._find_obj(pykube.Pod, self.webservice_label_selector)
-if pod is not None:
-if pod.obj['status']['phase'] == 'Running':
-return Backend.STATE_RUNNING
 return Backend.STATE_PENDING
-return Backend.STATE_STOPPED
+else:
+return Backend.STATE_STOPPED
 
 def shell(self):
 podSpec = self._get_shell_pod()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51a38c5a6c096f269669e8fdfd3ac19af24ec20b
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-webservice
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Outfactor jobkill script to toollabs::node::all

2017-02-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335755 )

Change subject: Tools: Outfactor jobkill script to toollabs::node::all
..

Tools: Outfactor jobkill script to toollabs::node::all

Change-Id: Iac3b5c5c8b5e48930eebd85cdd15b12451003d13
---
M modules/role/manifests/toollabs/node/compute/dedicated.pp
M modules/role/manifests/toollabs/node/compute/general.pp
M modules/role/manifests/toollabs/node/web.pp
M modules/toollabs/manifests/node/all.pp
4 files changed, 8 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/335755/1

diff --git a/modules/role/manifests/toollabs/node/compute/dedicated.pp 
b/modules/role/manifests/toollabs/node/compute/dedicated.pp
index aed44b3..a0ecc61 100644
--- a/modules/role/manifests/toollabs/node/compute/dedicated.pp
+++ b/modules/role/manifests/toollabs/node/compute/dedicated.pp
@@ -44,13 +44,4 @@
 config  => 'toollabs/gridengine/host-unrestricted.erb',
 require => File['/var/lib/gridengine'],
 }
-
-file { '/usr/local/bin/jobkill':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/jobkill',
-}
-
 }
diff --git a/modules/role/manifests/toollabs/node/compute/general.pp 
b/modules/role/manifests/toollabs/node/compute/general.pp
index 8b2a916..050a550 100644
--- a/modules/role/manifests/toollabs/node/compute/general.pp
+++ b/modules/role/manifests/toollabs/node/compute/general.pp
@@ -23,14 +23,4 @@
 }
 
 class { '::toollabs::hostgroups': groups => [ '@general' ] }
-
-file { '/usr/local/bin/jobkill':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/jobkill',
-}
-
 }
-
diff --git a/modules/role/manifests/toollabs/node/web.pp 
b/modules/role/manifests/toollabs/node/web.pp
index 8968b29..d118d87 100644
--- a/modules/role/manifests/toollabs/node/web.pp
+++ b/modules/role/manifests/toollabs/node/web.pp
@@ -54,13 +54,4 @@
 source  => 'puppet:///modules/toollabs/portreleaser',
 require => 
File['/usr/local/lib/python2.7/dist-packages/portgrabber.py'],
 }
-
-file { '/usr/local/bin/jobkill':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/jobkill',
-}
-
 }
diff --git a/modules/toollabs/manifests/node/all.pp 
b/modules/toollabs/manifests/node/all.pp
index 722892b..762542c 100644
--- a/modules/toollabs/manifests/node/all.pp
+++ b/modules/toollabs/manifests/node/all.pp
@@ -21,4 +21,12 @@
 size => inline_template('<%= @memorysize_mb.to_i * 3 %>MB'),
 }
 }
+
+file { '/usr/local/bin/jobkill':
+ensure => file,
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+source => 'puppet:///modules/toollabs/jobkill',
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac3b5c5c8b5e48930eebd85cdd15b12451003d13
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Fix typo in realm.pp

2017-02-01 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335548 )

Change subject: Fix typo in realm.pp
..

Fix typo in realm.pp

Change-Id: I4377b58b2bb8a844fb2c2e29fe1eb502a5cece58
---
M manifests/realm.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/realm.pp b/manifests/realm.pp
index 6a6bbac..b1b1bbf 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -50,7 +50,7 @@
 }
 
 if $::labsproject == undef {
-fail('Failed to determined $::labsproject')
+fail('Failed to determine $::labsproject')
 }
 
 if $::projectgroup == undef {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4377b58b2bb8a844fb2c2e29fe1eb502a5cece58
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: WIP: Don't ignore fchdir()'s errors

2017-01-08 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331227 )

Change subject: WIP: Don't ignore fchdir()'s errors
..

WIP: Don't ignore fchdir()'s errors

Change-Id: Ibe4b9f7a890a2a9f34c5e0baa7d9db10591c077b
---
M src/take.cc
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/27/331227/1

diff --git a/src/take.cc b/src/take.cc
index 45ba55e..380fd38 100755
--- a/src/take.cc
+++ b/src/take.cc
@@ -152,7 +152,8 @@
 if(d->d_name[1]=='.' && d->d_name[2]==0)
 continue;
 }
-fchdir(file);
+if (fchdir(file))
+return error(path, d->d_name);
 cwdchanged = true;
 ok &= takeover(d->d_name, true);
 }
@@ -221,7 +222,8 @@
 bool ok = true;
 for(int arg=optind; arg

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dynamicproxy: Indent @ssl_settings in NGINX configurations

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329750 )

Change subject: dynamicproxy: Indent @ssl_settings in NGINX configurations
..

dynamicproxy: Indent @ssl_settings in NGINX configurations

Change-Id: I7f3907c09b33f66ebe5d1e6122a9c09ff0abd5e4
---
M modules/dynamicproxy/templates/domainproxy.conf
M modules/dynamicproxy/templates/urlproxy.conf
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/329750/1

diff --git a/modules/dynamicproxy/templates/domainproxy.conf 
b/modules/dynamicproxy/templates/domainproxy.conf
index a220a91..9103618 100644
--- a/modules/dynamicproxy/templates/domainproxy.conf
+++ b/modules/dynamicproxy/templates/domainproxy.conf
@@ -44,7 +44,7 @@
 ssl_session_cache shared:SSL:50m;
 ssl_session_timeout 5m;
 
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 <%- end -%>
 
diff --git a/modules/dynamicproxy/templates/urlproxy.conf 
b/modules/dynamicproxy/templates/urlproxy.conf
index 5aa24c3..0a2877c 100644
--- a/modules/dynamicproxy/templates/urlproxy.conf
+++ b/modules/dynamicproxy/templates/urlproxy.conf
@@ -55,7 +55,7 @@
 ssl_session_cache shared:SSL:50m;
 ssl_session_timeout 5m;
 
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 <%- end -%>
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f3907c09b33f66ebe5d1e6122a9c09ff0abd5e4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Indent @ssl_settings in NGINX configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329749 )

Change subject: Tools: Indent @ssl_settings in NGINX configuration
..

Tools: Indent @ssl_settings in NGINX configuration

Change-Id: I5dab6084b95257336997af377d25a81f5bc14c6b
---
M modules/toollabs/templates/static-server.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/329749/1

diff --git a/modules/toollabs/templates/static-server.conf.erb 
b/modules/toollabs/templates/static-server.conf.erb
index 700544f..9c2939a 100644
--- a/modules/toollabs/templates/static-server.conf.erb
+++ b/modules/toollabs/templates/static-server.conf.erb
@@ -31,7 +31,7 @@
 ssl_session_cache shared:SSL:50m;
 ssl_session_timeout 5m;
 
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 <%- end -%>
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5dab6084b95257336997af377d25a81f5bc14c6b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: toolserver_legacy: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329748 )

Change subject: toolserver_legacy: Indent @ssl_settings in Apache configuration
..

toolserver_legacy: Indent @ssl_settings in Apache configuration

Change-Id: Ibef145c8439be1316a92ca3ecf9edbbbc6b168db
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 72f922a..d323970 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -47,7 +47,7 @@
 SSLCertificateFile /etc/acme/cert/toolserver.crt
 SSLCertificateChainFile /etc/acme/cert/toolserver.chain.crt
 SSLCertificateKeyFile /etc/acme/key/toolserver.key
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 DocumentRoot /var/www/html
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibef145c8439be1316a92ca3ecf9edbbbc6b168db
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tendril: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329747 )

Change subject: tendril: Indent @ssl_settings in Apache configuration
..

tendril: Indent @ssl_settings in Apache configuration

Change-Id: Ifbcd409d2e48bcfd30ce71b31c565fa2d93fbb1e
---
M modules/tendril/templates/apache/tendril.wikimedia.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/tendril/templates/apache/tendril.wikimedia.org.erb 
b/modules/tendril/templates/apache/tendril.wikimedia.org.erb
index 519f5c4..cfefaf4 100644
--- a/modules/tendril/templates/apache/tendril.wikimedia.org.erb
+++ b/modules/tendril/templates/apache/tendril.wikimedia.org.erb
@@ -9,7 +9,7 @@
 SSLCertificateFile /etc/ssl/localcerts/tendril.wikimedia.org.crt
 SSLCertificateChainFile /etc/ssl/localcerts/tendril.wikimedia.org.chain.crt
 SSLCertificateKeyFile /etc/ssl/private/tendril.wikimedia.org.key
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 DocumentRoot <%= @docroot %>
 php_admin_flag short_open_tag on
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbcd409d2e48bcfd30ce71b31c565fa2d93fbb1e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: requesttracker: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329746 )

Change subject: requesttracker: Indent @ssl_settings in Apache configuration
..

requesttracker: Indent @ssl_settings in Apache configuration

Change-Id: I91f43c39f3605f56aeed9f06063fcab5068a81bc
---
M modules/requesttracker/templates/rt4.apache.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/329746/1

diff --git a/modules/requesttracker/templates/rt4.apache.erb 
b/modules/requesttracker/templates/rt4.apache.erb
index ad42871..da1db0d 100644
--- a/modules/requesttracker/templates/rt4.apache.erb
+++ b/modules/requesttracker/templates/rt4.apache.erb
@@ -18,7 +18,7 @@
   SSLCertificateFile /etc/acme/cert/rt.crt
   SSLCertificateChainFile /etc/acme/cert/rt.chain.crt
   SSLCertificateKeyFile /etc/acme/key/rt.key
-  <%= @ssl_settings.join("\n") %>
+  <%= @ssl_settings.join("\n  ") %>
 
   AddDefaultCharset UTF-8
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91f43c39f3605f56aeed9f06063fcab5068a81bc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetmaster: Indent @ssl_settings in Apache and NGINX confi...

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329745 )

Change subject: puppetmaster: Indent @ssl_settings in Apache and NGINX 
configurations
..

puppetmaster: Indent @ssl_settings in Apache and NGINX configurations

Change-Id: I55497a5b54faab8326735a8069a0360dbf8d52b8
---
M modules/puppetmaster/templates/nginx-puppetdb.conf.erb
M modules/puppetmaster/templates/puppetmaster-backend.conf.erb
M modules/puppetmaster/templates/puppetmaster.erb
M modules/puppetmaster/templates/web-frontend.conf.erb
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/329745/1

diff --git a/modules/puppetmaster/templates/nginx-puppetdb.conf.erb 
b/modules/puppetmaster/templates/nginx-puppetdb.conf.erb
index 450eed5..58b54f1 100644
--- a/modules/puppetmaster/templates/nginx-puppetdb.conf.erb
+++ b/modules/puppetmaster/templates/nginx-puppetdb.conf.erb
@@ -9,7 +9,7 @@
 ssl_certificate_key /etc/nginx/ssl/server.key;
 ssl_session_cache shared:SSL:50m;
 ssl_session_timeout 5m;
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 access_log   /var/log/nginx/puppetdb_access.log;
 error_log/var/log/nginx/puppetdb_error.log;
diff --git a/modules/puppetmaster/templates/puppetmaster-backend.conf.erb 
b/modules/puppetmaster/templates/puppetmaster-backend.conf.erb
index 9b0f8e0..832c5cf 100644
--- a/modules/puppetmaster/templates/puppetmaster-backend.conf.erb
+++ b/modules/puppetmaster/templates/puppetmaster-backend.conf.erb
@@ -2,7 +2,7 @@
 
 :8141>
 SSLEngine on
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 SSLCertificateFile  /var/lib/puppet/ssl/certs/<%= @fqdn %>.pem
 SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/<%= @fqdn %>.pem
diff --git a/modules/puppetmaster/templates/puppetmaster.erb 
b/modules/puppetmaster/templates/puppetmaster.erb
index fd5f5c8..39ab649 100644
--- a/modules/puppetmaster/templates/puppetmaster.erb
+++ b/modules/puppetmaster/templates/puppetmaster.erb
@@ -2,7 +2,7 @@
 
 :8140>
 SSLEngine on
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 SSLCertificateFile  /var/lib/puppet/server/ssl/certs/<%= 
scope.lookupvar('puppetmaster::server_name') %>.pem
 SSLCertificateKeyFile   /var/lib/puppet/server/ssl/private_keys/<%= 
scope.lookupvar('puppetmaster::server_name') %>.pem
 SSLCACertificateFile/var/lib/puppet/server/ssl/ca/ca_crt.pem
diff --git a/modules/puppetmaster/templates/web-frontend.conf.erb 
b/modules/puppetmaster/templates/web-frontend.conf.erb
index 324fdb8..1ece9cd 100644
--- a/modules/puppetmaster/templates/web-frontend.conf.erb
+++ b/modules/puppetmaster/templates/web-frontend.conf.erb
@@ -3,7 +3,7 @@
 ServerName <%= @server_name %>
 <%- if @alt_names %>ServerAlias <%= @alt_names.sort.join(" ") %><% end %>
 SSLEngine on
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 SSLCertificateFile  <%= @ssldir %>/certs/<%= @server_name %>.pem
 SSLCertificateKeyFile   <%= @ssldir %>/private_keys/<%= @server_name %>.pem
 SSLCACertificateFile/var/lib/puppet/ssl/certs/ca.pem

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I55497a5b54faab8326735a8069a0360dbf8d52b8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329744 )

Change subject: openstack: Indent @ssl_settings in Apache configuration
..

openstack: Indent @ssl_settings in Apache configuration

Change-Id: Id9c666e2c86e2a7cea4a9f9546a787639c5280b5
---
M modules/openstack/templates/common/wikitech.wikimedia.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/openstack/templates/common/wikitech.wikimedia.org.erb 
b/modules/openstack/templates/common/wikitech.wikimedia.org.erb
index 29dfec1..d5871b5 100644
--- a/modules/openstack/templates/common/wikitech.wikimedia.org.erb
+++ b/modules/openstack/templates/common/wikitech.wikimedia.org.erb
@@ -65,7 +65,7 @@
 SSLCertificateChainFile /etc/ssl/localcerts/<%= @certificate %>.chain.crt
 SSLCertificateKeyFile /etc/ssl/private/<%= @certificate %>.key
 <% end -%>
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 RedirectMatch ^/$ https://<%= @webserver_hostname %>/wiki/
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9c666e2c86e2a7cea4a9f9546a787639c5280b5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mirrors: Indent @ssl_settings in NGINX configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329743 )

Change subject: mirrors: Indent @ssl_settings in NGINX configuration
..

mirrors: Indent @ssl_settings in NGINX configuration

Change-Id: I847ae9f6a47ba50cf0c499c16194f358af9badbf
---
M modules/mirrors/templates/mirrors.wikimedia.org.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/329743/1

diff --git a/modules/mirrors/templates/mirrors.wikimedia.org.conf.erb 
b/modules/mirrors/templates/mirrors.wikimedia.org.conf.erb
index 0f54094..7092503 100644
--- a/modules/mirrors/templates/mirrors.wikimedia.org.conf.erb
+++ b/modules/mirrors/templates/mirrors.wikimedia.org.conf.erb
@@ -27,7 +27,7 @@
 
ssl_certificate /etc/acme/cert/mirrors.chained.crt;
ssl_certificate_key /etc/acme/key/mirrors.key;
-   <%= @ssl_settings.join("\n")  %>
+   <%= @ssl_settings.join("\n   ") %>
 
root /srv/mirrors;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I847ae9f6a47ba50cf0c499c16194f358af9badbf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mailman: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329742 )

Change subject: mailman: Indent @ssl_settings in Apache configuration
..

mailman: Indent @ssl_settings in Apache configuration

Change-Id: Ia3f63097a51933be883e79e35b17e2f693c9e66a
---
M modules/mailman/templates/lists.wikimedia.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/329742/1

diff --git a/modules/mailman/templates/lists.wikimedia.org.erb 
b/modules/mailman/templates/lists.wikimedia.org.erb
index 2e0f99f..7dc0a77 100644
--- a/modules/mailman/templates/lists.wikimedia.org.erb
+++ b/modules/mailman/templates/lists.wikimedia.org.erb
@@ -16,7 +16,7 @@
 SSLCertificateFile /etc/ssl/localcerts/lists.wikimedia.org.crt
 SSLCertificateChainFile /etc/ssl/localcerts/lists.wikimedia.org.chain.crt
 SSLCertificateKeyFile /etc/ssl/private/lists.wikimedia.org.key
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 # Does not obey robots.txt; causing operational issues, 2014-06-23
 BrowserMatch "ArchiveTeam ArchiveBot" bad_browser

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3f63097a51933be883e79e35b17e2f693c9e66a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install_server: Indent @ssl_settings in NGINX configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329740 )

Change subject: install_server: Indent @ssl_settings in NGINX configuration
..

install_server: Indent @ssl_settings in NGINX configuration

Change-Id: Ie99edb85175c9ba78da39121764ca1daf38c5b60
---
M modules/install_server/templates/apt.wikimedia.org.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/329740/1

diff --git a/modules/install_server/templates/apt.wikimedia.org.conf.erb 
b/modules/install_server/templates/apt.wikimedia.org.conf.erb
index b642ff0..f9fef66 100644
--- a/modules/install_server/templates/apt.wikimedia.org.conf.erb
+++ b/modules/install_server/templates/apt.wikimedia.org.conf.erb
@@ -21,7 +21,7 @@
 
ssl_certificate /etc/acme/cert/apt.chained.crt;
ssl_certificate_key /etc/acme/key/apt.key;
-   <%= @ssl_settings.join("\n")  %>
+   <%= @ssl_settings.join("\n   ") %>
 
root /srv;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie99edb85175c9ba78da39121764ca1daf38c5b60
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: librenms: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329741 )

Change subject: librenms: Indent @ssl_settings in Apache configuration
..

librenms: Indent @ssl_settings in Apache configuration

Change-Id: I6fd179008aeb1133c6ae01f63cdff939ddc425e1
---
M modules/librenms/templates/apache.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/329741/1

diff --git a/modules/librenms/templates/apache.conf.erb 
b/modules/librenms/templates/apache.conf.erb
index 86e9330..88a16e2 100644
--- a/modules/librenms/templates/apache.conf.erb
+++ b/modules/librenms/templates/apache.conf.erb
@@ -15,7 +15,7 @@
 SSLCertificateFile /etc/ssl/localcerts/<%= @sitename %>.crt
 SSLCertificateChainFile /etc/ssl/localcerts/<%= @sitename %>.chain.crt
 SSLCertificateKeyFile /etc/ssl/private/<%= @sitename %>.key
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 DocumentRoot <%= @install_dir %>/html
 /html>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fd179008aeb1133c6ae01f63cdff939ddc425e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329739 )

Change subject: icinga: Indent @ssl_settings in Apache configuration
..

icinga: Indent @ssl_settings in Apache configuration

Change-Id: I1c46e6f03655361b0f5374f4fca0abcf041ca5bf
---
M modules/icinga/templates/icinga.wikimedia.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/329739/1

diff --git a/modules/icinga/templates/icinga.wikimedia.org.erb 
b/modules/icinga/templates/icinga.wikimedia.org.erb
index 0d054c2..92b7258 100644
--- a/modules/icinga/templates/icinga.wikimedia.org.erb
+++ b/modules/icinga/templates/icinga.wikimedia.org.erb
@@ -23,7 +23,7 @@
 SSLCertificateFile /etc/ssl/localcerts/icinga.wikimedia.org.crt
 SSLCertificateChainFile /etc/ssl/localcerts/icinga.wikimedia.org.chain.crt
 SSLCertificateKeyFile /etc/ssl/private/icinga.wikimedia.org.key
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 DocumentRoot /usr/share/icinga/htdocs
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c46e6f03655361b0f5374f4fca0abcf041ca5bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ganglia: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329737 )

Change subject: ganglia: Indent @ssl_settings in Apache configuration
..

ganglia: Indent @ssl_settings in Apache configuration

Change-Id: I59c1f7c17b61d9e5036d40146495310484fda710
---
M modules/ganglia/templates/ganglia.wikimedia.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/329737/1

diff --git a/modules/ganglia/templates/ganglia.wikimedia.org.erb 
b/modules/ganglia/templates/ganglia.wikimedia.org.erb
index 14034d5..3cbedc2 100644
--- a/modules/ganglia/templates/ganglia.wikimedia.org.erb
+++ b/modules/ganglia/templates/ganglia.wikimedia.org.erb
@@ -16,7 +16,7 @@
 SSLCertificateFile <%= @ganglia_ssl_cert %>
 SSLCertificateChainFile <%= @ganglia_ssl_chain %>
 SSLCertificateKeyFile <%= @ganglia_ssl_key %>
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 ">
 Options FollowSymLinks

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59c1f7c17b61d9e5036d40146495310484fda710
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: Indent @ssl_settings in Apache configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329738 )

Change subject: gerrit: Indent @ssl_settings in Apache configuration
..

gerrit: Indent @ssl_settings in Apache configuration

Change-Id: Iab05fee2e832c825d7f9ac69d6ea53798b0482c4
---
M modules/gerrit/templates/gerrit.wikimedia.org.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/329738/1

diff --git a/modules/gerrit/templates/gerrit.wikimedia.org.erb 
b/modules/gerrit/templates/gerrit.wikimedia.org.erb
index 3f4ef71..04a9f0f 100644
--- a/modules/gerrit/templates/gerrit.wikimedia.org.erb
+++ b/modules/gerrit/templates/gerrit.wikimedia.org.erb
@@ -56,7 +56,7 @@
 SSLCertificateFile /etc/acme/cert/gerrit.crt
 SSLCertificateChainFile /etc/acme/cert/gerrit.chain.crt
 SSLCertificateKeyFile /etc/acme/key/gerrit.key
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 RedirectMatch ^/$ /r/
 RedirectMatch ^/r$ /r/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab05fee2e832c825d7f9ac69d6ea53798b0482c4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: docker: Indent @ssl_settings in NGINX configuration

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329735 )

Change subject: docker: Indent @ssl_settings in NGINX configuration
..

docker: Indent @ssl_settings in NGINX configuration

Change-Id: I2737037c48227b994555f4cd6c510f2e17b1c958
---
M modules/docker/templates/registry-nginx.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/docker/templates/registry-nginx.conf.erb 
b/modules/docker/templates/registry-nginx.conf.erb
index 3ce8a97..f6f460b 100644
--- a/modules/docker/templates/registry-nginx.conf.erb
+++ b/modules/docker/templates/registry-nginx.conf.erb
@@ -25,7 +25,7 @@
 ssl_session_cache shared:SSL:50m;
 ssl_session_timeout 5m;
 
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 # Images can be pretty large!
 client_max_body_size 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2737037c48227b994555f4cd6c510f2e17b1c958
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dumps: Indent @ssl_settings in NGINX configurations

2016-12-30 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329736 )

Change subject: dumps: Indent @ssl_settings in NGINX configurations
..

dumps: Indent @ssl_settings in NGINX configurations

Change-Id: Ib8215a6e8060baf7c0ae0fb053f0faf820491781
---
M modules/dumps/templates/nginx.dumps.conf.erb
M modules/role/templates/labs/novaproxy-wmflabs.org.conf
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/dumps/templates/nginx.dumps.conf.erb 
b/modules/dumps/templates/nginx.dumps.conf.erb
index ec0f449..d5458dd 100644
--- a/modules/dumps/templates/nginx.dumps.conf.erb
+++ b/modules/dumps/templates/nginx.dumps.conf.erb
@@ -16,7 +16,7 @@
ssl_session_cache shared:SSL:50m;
ssl_session_timeout 5m;
 
-   <%= @ssl_settings.join("\n") %>
+   <%= @ssl_settings.join("\n   ") %>
 
root /data/xmldatadumps/public;
 
diff --git a/modules/role/templates/labs/novaproxy-wmflabs.org.conf 
b/modules/role/templates/labs/novaproxy-wmflabs.org.conf
index 75ba2ab..0f6feff 100644
--- a/modules/role/templates/labs/novaproxy-wmflabs.org.conf
+++ b/modules/role/templates/labs/novaproxy-wmflabs.org.conf
@@ -24,7 +24,7 @@
 ssl_certificate /etc/ssl/localcerts/star.wmflabs.org.chained.crt;
 ssl_certificate_key /etc/ssl/private/star.wmflabs.org.key;
 
-<%= @ssl_settings.join("\n") %>
+<%= @ssl_settings.join("\n") %>
 
 listen 80;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8215a6e8060baf7c0ae0fb053f0faf820491781
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetmaster: Specify $group for all repositories

2016-12-29 Thread Tim Landscheidt (Code Review)
Hello Yuvipanda,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: puppetmaster: Specify $group for all repositories
..

puppetmaster: Specify $group for all repositories

Bug: T152060
Change-Id: I3466a4225980f1f13225551a13f3fc09c5fc2327
---
M modules/puppetmaster/manifests/gitclone.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/329595/1

diff --git a/modules/puppetmaster/manifests/gitclone.pp 
b/modules/puppetmaster/manifests/gitclone.pp
index 8c414ee..4b900a2 100644
--- a/modules/puppetmaster/manifests/gitclone.pp
+++ b/modules/puppetmaster/manifests/gitclone.pp
@@ -218,6 +218,7 @@
 git::clone { 'labs/private':
 require   => File["${puppetmaster::gitdir}/labs"],
 owner => $user,
+group => $group,
 directory => "${puppetmaster::gitdir}/labs/private",
 }
 
@@ -232,6 +233,7 @@
 'operations/software':
 require   => File["${puppetmaster::gitdir}/operations"],
 owner => $user,
+group => $group,
 directory => "${puppetmaster::gitdir}/operations/software",
 origin=> 
'https://gerrit.wikimedia.org/r/p/operations/software';
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3466a4225980f1f13225551a13f3fc09c5fc2327
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmflib: Fix typo in cron_splay()

2016-12-28 Thread Tim Landscheidt (Code Review)
Hello BBlack,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: wmflib: Fix typo in cron_splay()
..

wmflib: Fix typo in cron_splay()

Change-Id: I6ad6286622909f084c229779523404e5adb80496
---
M modules/wmflib/lib/puppet/parser/functions/cron_splay.rb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/wmflib/lib/puppet/parser/functions/cron_splay.rb 
b/modules/wmflib/lib/puppet/parser/functions/cron_splay.rb
index 08fa6ab..af76bf6 100644
--- a/modules/wmflib/lib/puppet/parser/functions/cron_splay.rb
+++ b/modules/wmflib/lib/puppet/parser/functions/cron_splay.rb
@@ -114,7 +114,7 @@
 output['minute'] = tval % 60
 
 if period == 'hourly'
-  outout['hour'] = '*'
+  output['hour'] = '*'
 else
   output['hour'] = (tval / 60) % 24
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ad6286622909f084c229779523404e5adb80496
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: Use tuning.conf only in production

2016-12-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329390 )

Change subject: puppetdb: Use tuning.conf only in production
..

puppetdb: Use tuning.conf only in production

tuning.conf is tailored for the actual production hosts PuppetDB runs
on.  In Labs, its "shared_buffers = 7680MB" will make it impossible to
start PostgreSQL on most types of instances.

Rather than trying to optimize for possibly vastly different
environments (small vs. large instances, instances with only PuppetDB
running or other applications as well, etc.), for Labs this change
just uses the PostgreSQL defaults instead.

Change-Id: Iacb20d86a7ff04412f578108c6e42c268680a4ff
---
M modules/role/manifests/puppetmaster/puppetdb.pp
1 file changed, 22 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/329390/1

diff --git a/modules/role/manifests/puppetmaster/puppetdb.pp 
b/modules/role/manifests/puppetmaster/puppetdb.pp
index ac03a10..80b1ff6 100644
--- a/modules/role/manifests/puppetmaster/puppetdb.pp
+++ b/modules/role/manifests/puppetmaster/puppetdb.pp
@@ -68,12 +68,28 @@
 }
 
 # Tuning
-file { '/etc/postgresql/9.4/main/tuning.conf':
-ensure => 'present',
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => 'puppet:///modules/role/puppetdb/tuning.conf',
+if $::realm == 'production' {
+file { '/etc/postgresql/9.4/main/tuning.conf':
+ensure => 'present',
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 'puppet:///modules/role/puppetdb/tuning.conf',
+}
+} else {
+# tuning.conf is tailored for the actual production hosts
+# PuppetDB runs on.  For Labs, rather than trying to optimize
+# for possibly vastly different environments (small vs. large
+# instances, instances with only PuppetDB running or other
+# applications as well, etc.), we rely on PostgreSQL defaults
+# instead.
+file { '/etc/postgresql/9.4/main/tuning.conf':
+ensure  => 'present',
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+content => '',
+}
 }
 
 sysctl::parameters { 'postgres_shmem':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacb20d86a7ff04412f578108c6e42c268680a4ff
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Use exported resources for ssh host keys

2016-12-27 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329382 )

Change subject: Tools: Use exported resources for ssh host keys
..

Tools: Use exported resources for ssh host keys

In the past, Tools used the central Labs puppetmaster that did not and
does not support exported resources.  Therefore each instance needed
to store its ssh host key on a NFS share where it was processed from
by all others.

Tools has since switched to its own puppetmaster where exported
resources are available.  This change makes use of that and shares ssh
host keys with the same manifests used in production.

As Labs instances do not have IPv6 addresses, this change also amends
the template for /etc/ssh/ssh_known_hosts to handle host aliases that
are undefined.

Bug: T153163
Change-Id: Iee22dab01af78f38103743644061e4387d254d12
---
M modules/ssh/manifests/client.pp
M modules/ssh/templates/known_hosts.erb
M modules/toollabs/manifests/init.pp
3 files changed, 24 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/329382/1

diff --git a/modules/ssh/manifests/client.pp b/modules/ssh/manifests/client.pp
index 8cf8808..cbd7797 100644
--- a/modules/ssh/manifests/client.pp
+++ b/modules/ssh/manifests/client.pp
@@ -3,24 +3,23 @@
 ensure => present,
 }
 
-# no exported resources on Labs == no sshknowngen
-if $::realm == 'production' {
-if $::use_puppetdb {
-file { '/etc/ssh/ssh_known_hosts':
-content => template('ssh/known_hosts.erb'),
-backup  => false,
-owner   => 'root',
-group   => 'root',
-mode=> '0644',
-}
-} else {
-file { '/etc/ssh/ssh_known_hosts':
-content => generate('/usr/local/bin/sshknowngen'),
-backup  => false,
-owner   => 'root',
-group   => 'root',
-mode=> '0644',
-}
+if $::use_puppetdb {
+file { '/etc/ssh/ssh_known_hosts':
+content => template('ssh/known_hosts.erb'),
+backup  => false,
+owner   => 'root',
+group   => 'root',
+mode=> '0644',
+}
+} elsif $::realm == 'production' {
+# The central Labs puppetmaster does not support exported
+# resources, so sshknowngen would not work there.
+file { '/etc/ssh/ssh_known_hosts':
+content => generate('/usr/local/bin/sshknowngen'),
+backup  => false,
+owner   => 'root',
+group   => 'root',
+mode=> '0644',
 }
 }
 }
diff --git a/modules/ssh/templates/known_hosts.erb 
b/modules/ssh/templates/known_hosts.erb
index 799114a..682fc11 100644
--- a/modules/ssh/templates/known_hosts.erb
+++ b/modules/ssh/templates/known_hosts.erb
@@ -2,7 +2,8 @@
 <%-
 scope.function_query_resources([false, '@@Sshkey', false, 'title asc']).each 
do |resource|
   parameters = resource['parameters']
-  aliases = parameters['host_aliases'].select{ |el| el !~ /^---/}.join(',')
+  aliases = parameters['host_aliases'].select{ |el| el !~ /^---/ && el != 
'undef'}.join(',')
+
   if parameters['ensure'] == 'present' -%>
 <%= resource['certname'] %>,<%= aliases %> <%= parameters['type'] %> <%= 
parameters['key'] %>
 <%-
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index a590802..a170340 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -70,28 +70,15 @@
 require => File[$sysdir],
 }
 
+# TODO: Remove after Puppet cycle.
 file { "${store}/hostkey-${::fqdn}":
-ensure  => file,
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
-content => "${::fqdn},${::hostname},${::ipaddress} ssh-rsa 
${::sshrsakey}\n${::fqdn},${::hostname},${::ipaddress} ecdsa-sha2-nistp256 
${::sshecdsakey}\n",
+ensure  => absent,
 require => File[$store],
 }
 
-exec { 'make_known_hosts':
-command => "/bin/cat ${store}/hostkey-* >/etc/ssh/ssh_known_hosts~",
-onlyif  => "/usr/bin/test -n \"\$(/usr/bin/find ${store} -maxdepth 1 
\\( -type d -or -type f -name hostkey-\\* \\) -newer 
/etc/ssh/ssh_known_hosts~)\" -o ! -s /etc/ssh/ssh_known_hosts~",
-require => File[$store],
-}
-
-file { '/etc/ssh/ssh_known_hosts':
-ensure  => file,
-source  => '/etc/ssh/ssh_known_hosts~',
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
-require => Exec['make_known_hosts'],
+# TODO: Remove after Puppet cycle.
+file { '/etc/ssh/ssh_known_hosts~':
+ensure => absent,
 }
 
 File['/var/lib/gridengine'] -> Package <| title == 'gridengine-common' |>

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: Do not hardcode puppetmasters

2016-12-27 Thread Tim Landscheidt (Code Review)
Hello Alexandros Kosiaris,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: puppetdb: Do not hardcode puppetmasters
..

puppetdb: Do not hardcode puppetmasters

For Labs PuppetDB setups, it is necessary to be able to specify
different puppetmasters so that they are not blocked by the firewall.
In the general case, for an instance set up to serve as a PuppetDB it
is most likely that "the" puppetmaster is all the puppetmasters, so
this change sets it as default for Labs.

Bug: T153577
Change-Id: I01874494b7a4671b4eeb00eb6766b3265574328c
---
M hieradata/labs.yaml
M modules/role/manifests/puppetmaster/puppetdb.pp
2 files changed, 4 insertions(+), 16 deletions(-)


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

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index c20b7a6..fd912dc 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -33,6 +33,9 @@
 archiva::proxy::ssl_enabled: false
 archiva::proxy::certificate_name: ssl-cert-snakeoil
 statsite::instance::graphite_host: 'labmon1001.eqiad.wmnet'
+puppetmaster::servers:
+  "%{hiera('puppetmaster')}":
+- { worker: "%{hiera('puppetmaster')}", loadfactor: 10 }
 
 # Default to Dummy authenticator in JupyterHubs in labs
 jupyterhub::authenticator: dummy
diff --git a/modules/role/manifests/puppetmaster/puppetdb.pp 
b/modules/role/manifests/puppetmaster/puppetdb.pp
index ac03a10..642bf6c 100644
--- a/modules/role/manifests/puppetmaster/puppetdb.pp
+++ b/modules/role/manifests/puppetmaster/puppetdb.pp
@@ -39,22 +39,7 @@
 }
 
 # Only the TLS-terminating nginx proxy will be exposed
-# TODO: Use map() once we migrate to the future parser
-# It should have been
-#
-# $puppetmasters = map(values(hiera('puppetmaster::servers')) |p| { 
p['worker'] })
-#
-# Instead, we will have to jump through hoops (templates, yaml parsing,
-# parser functions) for this simple thing. So don't and just hardcode it.
-#  Does it suck ? Yes it does. But we are not going through all that
-$puppetmasters = [
-'puppetmaster1001.eqiad.wmnet',
-'puppetmaster1002.eqiad.wmnet',
-'puppetmaster2001.codfw.wmnet',
-'puppetmaster2002.codfw.wmnet',
-'rhodium.eqiad.wmnet',
-]
-$puppetmasters_ferm = join($puppetmasters, ' ')
+$puppetmasters_ferm = inline_template('<%= 
scope.function_hiera([\'puppetmaster::servers\']).values.flatten(1).map { |p| 
p[\'worker\'] }.sort.join(\' \')%>')
 ferm::service { 'puppetdb':
 proto   => 'tcp',
 port=> 443,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01874494b7a4671b4eeb00eb6766b3265574328c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: Do not set up Ganglia in Labs

2016-12-27 Thread Tim Landscheidt (Code Review)
Hello Alexandros Kosiaris,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: puppetdb: Do not set up Ganglia in Labs
..

puppetdb: Do not set up Ganglia in Labs

Bug: T154104
Change-Id: Ic8648d3e1db7bec6b5abe6dab4311de32255fe24
---
M modules/role/manifests/puppetmaster/puppetdb.pp
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/329329/1

diff --git a/modules/role/manifests/puppetmaster/puppetdb.pp 
b/modules/role/manifests/puppetmaster/puppetdb.pp
index ac03a10..663d6bc 100644
--- a/modules/role/manifests/puppetmaster/puppetdb.pp
+++ b/modules/role/manifests/puppetmaster/puppetdb.pp
@@ -30,8 +30,6 @@
 description => 'PuppetDB server',
 }
 
-ganglia::plugin::python { 'diskstat': }
-
 ferm::service { 'postgresql_puppetdb':
 proto  => 'tcp',
 port   => 5432,
@@ -62,9 +60,13 @@
 srange  => "@resolve((${puppetmasters_ferm}))",
 }
 
-class { 'postgresql::ganglia':
-pgstats_user => $passwords::postgres::ganglia_user,
-pgstats_pass => $passwords::postgres::ganglia_pass,
+if $::standard::has_ganglia {
+class { 'postgresql::ganglia':
+pgstats_user => $passwords::postgres::ganglia_user,
+pgstats_pass => $passwords::postgres::ganglia_pass,
+}
+
+ganglia::plugin::python { 'diskstat': }
 }
 
 # Tuning

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8648d3e1db7bec6b5abe6dab4311de32255fe24
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: postgresql: Only set user password if different

2016-12-27 Thread Tim Landscheidt (Code Review)
Hello Alexandros Kosiaris,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: postgresql: Only set user password if different
..

postgresql: Only set user password if different

Change-Id: I7c74cca5e978ab9d6073e1d2d5c028e7c072d3d1
---
M modules/postgresql/manifests/user.pp
1 file changed, 4 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/329328/1

diff --git a/modules/postgresql/manifests/user.pp 
b/modules/postgresql/manifests/user.pp
index 327fb74..10bcd14 100644
--- a/modules/postgresql/manifests/user.pp
+++ b/modules/postgresql/manifests/user.pp
@@ -58,18 +58,15 @@
 user=> 'postgres',
 unless  => $userexists,
 }
-# This will set the password and attributes on every puppet run. We 
explicitly dont
-# depend on anything to ensure consistency with configuration and that
-# password is always the one defined
-# NOTE: This has the potential of the password leaking by process
-# listing tools like ps. Need to investigate better ways of setting the
-# password .e.g. hashed with md5 in the manifest
+
 # This will not be run on a slave as it is read-only
 if $master {
+$password_md5 = md5("${password}${user}")
+
 exec { "pass_set-${name}":
 command   => $pass_set,
 user  => 'postgres',
-onlyif=> $userexists,
+onlyif=> "/usr/bin/test -n \"\$(/usr/bin/psql -Atc 
\"SELECT 1 FROM pg_shadow WHERE usename = '${user}' AND passwd <> 
'md5${password_md5}';\")\"",
 subscribe => Exec["create_user-${name}"],
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c74cca5e978ab9d6073e1d2d5c028e7c072d3d1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetmaster: Enable expand_path for Hiera in Labs as well

2016-12-26 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329226 )

Change subject: puppetmaster: Enable expand_path for Hiera in Labs as well
..

puppetmaster: Enable expand_path for Hiera in Labs as well

With the current settings when Hiera looks up a key, it searches the
labs/private repository only for the files:

- /etc/puppet/private/hieradata/labs/%{::labsproject}/common.yaml
- /etc/puppet/private/hieradata/%{::labsproject}.yaml
- /etc/puppet/private/hieradata/labs.yaml
- /etc/puppet/private/hieradata/common.yaml

However for example the key puppetdb::password::rw is defined in the
file /etc/puppet/private/hieradata/common/puppetdb/password.yaml, thus
it cannot be found.

This change enables expand_path for Hiera in Labs as well, causing it
to additionally search
/etc/puppet/private/hieradata/common/puppetdb/password.yaml for the
key puppetdb::password::rw.

Change-Id: Iaf73d6f52ec402cb7c1b7eebd0bc462b55343825
---
M modules/puppetmaster/files/labs.hiera.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/26/329226/1

diff --git a/modules/puppetmaster/files/labs.hiera.yaml 
b/modules/puppetmaster/files/labs.hiera.yaml
index 5a1fa0d..232ebbf 100644
--- a/modules/puppetmaster/files/labs.hiera.yaml
+++ b/modules/puppetmaster/files/labs.hiera.yaml
@@ -4,6 +4,8 @@
   - nuyaml
 :nuyaml:
   :datadir: /etc/puppet/hieradata
+  :expand_path:
+- common
 :mwyaml:
   :host: https://wikitech.wikimedia.org
   :cache_ttl: 120

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf73d6f52ec402cb7c1b7eebd0bc462b55343825
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "tools: store verbose logrotate logs"

2016-12-26 Thread Tim Landscheidt (Code Review)
Hello Yuvipanda, Merlijn van Deen, jenkins-bot, Coren,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "tools: store verbose logrotate logs"
..

Revert "tools: store verbose logrotate logs"

The changes to the cron file apparently did not produce debugging
output, and the underlying issue has mostly gone away, if not
completely.  Restoring /etc/cron.daily/logrotate will be done by
manually running:

| sudo rm -f /etc/cron.daily/logrotate &&
| sudo apt-get --reinstall -o Dpkg::Options::=--force-confmiss install logrotate

on all Tools instances with clush after this change has been merged.

Bug: T96007
Change-Id: Ia1a045952b34ed16d774c3e26a8b24dfd503724d
---
D modules/toollabs/files/logrotate.crondaily
M modules/toollabs/manifests/init.pp
2 files changed, 0 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/329217/1

diff --git a/modules/toollabs/files/logrotate.crondaily 
b/modules/toollabs/files/logrotate.crondaily
deleted file mode 100644
index 964b2b2..000
--- a/modules/toollabs/files/logrotate.crondaily
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# This file is managed by Puppet.
-# Based on logrotate-bundled cron file, Version: 3.8.7-1ubuntu1
-# Clean non existent log file entries from status file
-cd /var/lib/logrotate
-test -e status || touch status
-head -1 status > status.clean
-sed 's/"//g' status | while read logfile date
-do
-[ -e "$logfile" ] && echo "\"$logfile\" $date"
-done >> status.clean
-mv status.clean status
-
-test -x /usr/sbin/logrotate || exit 0
-# > instead of >> to clear logrotate.log daily
-# copy output to stderr on non-zero exit code to trigger a cron email
-/usr/sbin/logrotate -v /etc/logrotate.conf > /var/log/logrotate.log 2>&1 || 
cat /var/log/logrotate.log >&2
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 27ec24a..19979fe 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -207,14 +207,5 @@
 source => 'puppet:///modules/toollabs/40-tools-sudoers-no-warning',
 }
 
-file { '/etc/cron.daily/logrotate':
-ensure  => file,
-mode=> '0664',
-owner   => 'root',
-group   => 'root',
-source  => 'puppet:///modules/toollabs/logrotate.crondaily',
-require => Package['logrotate']
-}
-
 diamond::collector::localcrontab { 'localcrontabcollector': }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1a045952b34ed16d774c3e26a8b24dfd503724d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Do not ignore all .mli files in texvccheck

2016-12-25 Thread Tim Landscheidt (Code Review)
Hello TheDJ,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Do not ignore all .mli files in texvccheck
..

Do not ignore all .mli files in texvccheck

The pattern "*.mli" was incorrectly added to texvccheck/.gitignore by
4c9dc2f08e03ad23e1e2f0cefc52ca6893fbe6a2 with the comment "Compiled
source".  As with d9a7da14f10f6c53bdf1a18febab030d48f0a960, .mli files
define the interfaces for the corresponding .ml module and thus should
not be ignored.

The only exception to this is parser.mli which is generated by the
ocamlyacc from the parser.mly definition, so this change only ignores
those files.

Change-Id: I263df70e58fb14a7228c32d5c985ff7f1b841891
---
M math/.gitignore
M texvccheck/.gitignore
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/30/329130/1

diff --git a/math/.gitignore b/math/.gitignore
index 18dc1ad..9216c19 100644
--- a/math/.gitignore
+++ b/math/.gitignore
@@ -2,6 +2,7 @@
 *.cmi
 *.cmx
 *.o
+parser.mli
 
 # The binaries
 texvc
diff --git a/texvccheck/.gitignore b/texvccheck/.gitignore
index be7dcb9..3c1635a 100644
--- a/texvccheck/.gitignore
+++ b/texvccheck/.gitignore
@@ -1,9 +1,8 @@
 # Compiled source
-*.mli
-!tex.mli
 *.cmi
 *.cmx
 *.o
+parser.mli
 
 # The binaries
 texvccheck

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I263df70e58fb14a7228c32d5c985ff7f1b841891
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Remove broken test script texvccheck/test.pl

2016-12-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329129 )

Change subject: Remove broken test script texvccheck/test.pl
..

Remove broken test script texvccheck/test.pl

The script has a syntax error, the program tex2svg is not contained in
this repository, "texvc" should probably be "texvccheck", and the
result of this invocation is thrown away, thus always outputting
"bad".

Change-Id: I9ca0324d58f81dbb9e1bfb31e677fc877172675f
---
D texvccheck/test.pl
1 file changed, 0 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/29/329129/1

diff --git a/texvccheck/test.pl b/texvccheck/test.pl
deleted file mode 100755
index 898032d..000
--- a/texvccheck/test.pl
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /usr/bin/perl
-my $texvc = `texvc '\\sin(x)+{}{}\\cos(x)^2 newcommand'`;
-if (substr($result,0,1) eq "+") {
-   print "good";
-} else {
-   print "bad";
-}
-print $result;
-my $ = `tex2svg '\\sin(x)+{}{}\\cos(x)^2 newcommand'`;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ca0324d58f81dbb9e1bfb31e677fc877172675f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Remove unused Makefile variable "DIRS"

2016-12-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329128 )

Change subject: Remove unused Makefile variable "DIRS"
..

Remove unused Makefile variable "DIRS"

Change-Id: I72eb49e2c0c1bd3afd0e3f76bb596fa87d10dc2b
---
M Makefile
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/28/329128/1

diff --git a/Makefile b/Makefile
index 004b752..76fafa3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,3 @@
-DIRS = texvc texvccheck
-
 .PHONY: all
 
 all: texvc texvccheck

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72eb49e2c0c1bd3afd0e3f76bb596fa87d10dc2b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Fix "make texvccheck" in top-level Makefile

2016-12-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329127 )

Change subject: Fix "make texvccheck" in top-level Makefile
..

Fix "make texvccheck" in top-level Makefile

As texvccheck is a directory, make always considered the target
texvccheck to be up-to-date, thus never invocating make in the
subdirectory itself.  This change marks texvccheck as a .PHONY target,
causing make to compile texvccheck in the subdirectory.

Change-Id: Ib758965c1eb53e1f7221e304fc808dc68136a219
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/27/329127/1

diff --git a/Makefile b/Makefile
index 004b752..adc3abf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 DIRS = texvc texvccheck
 
-.PHONY: all
+.PHONY: all texvccheck
 
 all: texvc texvccheck
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib758965c1eb53e1f7221e304fc808dc68136a219
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Do not ignore .mli files

2016-12-25 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329126 )

Change subject: Do not ignore .mli files
..

Do not ignore .mli files

The pattern "*.mli" was incorrectly added to math/.gitignore by
159708754ce957fb9931dbdd5bb69a309aada69e with the comment "Compiled
source".  Actually, .mli files define the interfaces for the
corresponding .ml module.  They are manually created and maintained,
akin to .h files in C, and thus changes to them should not be ignored.

Change-Id: I1eee6b46f8f81a7a0085901f602eb7a1f4ae6fd4
---
M math/.gitignore
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/26/329126/1

diff --git a/math/.gitignore b/math/.gitignore
index cac42e2..18dc1ad 100644
--- a/math/.gitignore
+++ b/math/.gitignore
@@ -1,5 +1,4 @@
 # Compiled source
-*.mli
 *.cmi
 *.cmx
 *.o

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eee6b46f8f81a7a0085901f602eb7a1f4ae6fd4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] aptly: Make aptly work with Apache

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328467 )

Change subject: [WIP] aptly: Make aptly work with Apache
..

[WIP] aptly: Make aptly work with Apache

Currently aptly (only) installs an nginx server.  This is inconvenient
for instances where there is already an Apache server in use, for
example as a standalone puppetmaster.  This change adds a parameter
$manage_apache that enables support for Apache servers.

Bug: T153814
Change-Id: I3f638c6837675e41bc7966ab293cc2ffd48aaa70
---
M modules/aptly/manifests/init.pp
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/328467/1

diff --git a/modules/aptly/manifests/init.pp b/modules/aptly/manifests/init.pp
index 79d2687..b0a9680 100644
--- a/modules/aptly/manifests/init.pp
+++ b/modules/aptly/manifests/init.pp
@@ -3,6 +3,7 @@
 #
 # Set up to only allow root to add packages
 class aptly(
+$manage_apache=false,
 $manage_nginx=true,
 $owner='root',
 $group='root',
@@ -25,6 +26,13 @@
 mode   => '0444',
 }
 
+if $manage_apache {
+apache::static_site { 'aptly-server':
+servername => $::fqdn,
+docroot=> '/srv/packages/public',
+}
+}
+
 if $manage_nginx {
 nginx::site { 'aptly-server':
 source => 'puppet:///modules/aptly/aptly.nginx.conf',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f638c6837675e41bc7966ab293cc2ffd48aaa70
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: apache: Fix some issues with apache::static_site

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328466 )

Change subject: apache: Fix some issues with apache::static_site
..

apache: Fix some issues with apache::static_site

apache::static_site:

- Uses the function any2array() that is not defined,
- specifies the wrong path to the template static_site.conf.erb,
- calls apache::site with the non-existent parameter conf_type, and
- calls the function is_domain_name() with the parameter $servername
  which fails when a string constant like $::fqdn is passed.

This change fixes those issues.

Bug: T153816
Change-Id: I3b48f44a3c6532bacc75eba766e200d183eac299
---
M modules/apache/manifests/static_site.pp
M modules/apache/templates/static_site.conf.erb
M modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
3 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/328466/1

diff --git a/modules/apache/manifests/static_site.pp 
b/modules/apache/manifests/static_site.pp
index 81238c8..3bf68de 100644
--- a/modules/apache/manifests/static_site.pp
+++ b/modules/apache/manifests/static_site.pp
@@ -43,7 +43,6 @@
 validate_ensure($ensure)
 validate_absolute_path($docroot)
 
-$ldap_groups = any2array($restricted_to)
 $servername_safe = regsubst($servername, '[\W_]', '-', 'G')
 $servername_real = is_domain_name($servername) ? {
 true  => $servername,
@@ -54,7 +53,7 @@
 include ::apache::mod::headers
 include ::apache::mod::rewrite
 
-if ! empty($ldap_groups) {
+if ! empty($restricted_to) {
 include ::apache::mod::authnz_ldap
 include ::passwords::ldap::production
 }
@@ -67,8 +66,7 @@
 
 apache::site { $name:
 ensure=> $ensure,
-content   => template('apache/static.conf.erb'),
-conf_type => 'sites',
+content   => template('apache/static_site.conf.erb'),
 priority  => $priority,
 }
 }
diff --git a/modules/apache/templates/static_site.conf.erb 
b/modules/apache/templates/static_site.conf.erb
index 9c14f8c..65a7156 100644
--- a/modules/apache/templates/static_site.conf.erb
+++ b/modules/apache/templates/static_site.conf.erb
@@ -11,14 +11,14 @@
 Header always merge Vary X-Forwarded-Proto
 Header set Strict-Transport-Security "max-age=604800"
 
-<%- if @ldap_groups.length -%>
+<%- if @restricted_to -%>
 AuthName "<%= @auth_realm %>"
 AuthType Basic
 AuthBasicProvider ldap
 AuthLDAPBindDN cn=proxyagent,ou=profile,dc=wikimedia,dc=org
 AuthLDAPBindPassword <%= 
scope.lookupvar('::passwords::ldap::production::proxypass') %>
 AuthLDAPURL "ldaps://ldap-labs.eqiad.wikimedia.org 
ldap-labs.codfw.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn"
-<%- @ldap_groups.each do |group| -%>
+<%- @restricted_to.each do |group| -%>
 Require ldap-group "cn=<%= group %>,ou=groups,dc=wikimedia,dc=org"
 <%- end -%>
 <%- end -%>
diff --git a/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb 
b/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
index 5826dc0..18f1e57 100644
--- a/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
@@ -13,7 +13,7 @@
 "given #{arguments.size} for 1")
 end
 
-domain = arguments[0]
+domain = arguments[0].dup
 
 # Limits (rfc1035, 3.1)
 domain_max_length=255

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b48f44a3c6532bacc75eba766e200d183eac299
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: trebuchet: Fully qualify hostname

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328457 )

Change subject: trebuchet: Fully qualify hostname
..

trebuchet: Fully qualify hostname

Bug: T153608
Change-Id: Icbeffe40c4038cf8d4076522090e256aa7cd382f
---
M modules/trebuchet/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/trebuchet/manifests/init.pp 
b/modules/trebuchet/manifests/init.pp
index 9a0d9bc..9acafb2 100644
--- a/modules/trebuchet/manifests/init.pp
+++ b/modules/trebuchet/manifests/init.pp
@@ -8,7 +8,7 @@
 $deployment_server = $::deployment_server_override
 ) {
 $trebuchet_master = $::realm ? {
-labs   => pick($deployment_server, 
"${::labsproject}-deploy.eqiad.wmflabs"),
+labs   => pick($deployment_server, 
"${::labsproject}-deploy.${::labsproject}.eqiad.wmflabs"),
 default=> hiera('deployment_server','tin.eqiad.wmnet'),
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbeffe40c4038cf8d4076522090e256aa7cd382f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: staging: Fully qualify hostname

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328456 )

Change subject: staging: Fully qualify hostname
..

staging: Fully qualify hostname

Bug: T153608
Change-Id: I05951a4e5b7a670701f6aa50beae2882e2c5d398
---
M hieradata/labs/staging/common.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/328456/1

diff --git a/hieradata/labs/staging/common.yaml 
b/hieradata/labs/staging/common.yaml
index 8644a7b..5ddde52 100644
--- a/hieradata/labs/staging/common.yaml
+++ b/hieradata/labs/staging/common.yaml
@@ -6,7 +6,7 @@
 salt::master::salt_pillar_roots: { base: [ '/srv/pillars' ] }
 salt::master::salt_module_roots: { base: [ '/srv/salt/_modules' ] }
 salt::master::salt_returner_roots: { base: [ '/srv/salt/_returners' ] }
-role::deployment::salt_masters::deployment_server: staging-tin.eqiad.wmflabs
+role::deployment::salt_masters::deployment_server: 
staging-tin.staging.eqiad.wmflabs
 trebuchet::deployment_server: staging-tin.staging.eqiad.wmflabs
 elasticsearch::expected_nodes: 3
 elasticsearch::minimum_master_nodes: 3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05951a4e5b7a670701f6aa50beae2882e2c5d398
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: deployment-prep: Fully qualify hostnames

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328455 )

Change subject: deployment-prep: Fully qualify hostnames
..

deployment-prep: Fully qualify hostnames

Bug: T153608
Change-Id: Ia32b47d04a8e7112d3aabb5e02207f015f30907e
---
M hieradata/labs.yaml
M hieradata/labs/deployment-prep/common.yaml
M modules/scap/manifests/init.pp
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/328455/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index c20b7a6..f19ca0b 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -78,7 +78,7 @@
   restbase:
 route: eqiad
 backends:
-  eqiad: 'deployment-restbase01.eqiad.wmflabs'
+  eqiad: 'deployment-restbase01.deployment-prep.eqiad.wmflabs'
 cache::upload::apps:
   swift:
 route: eqiad
diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index c5ddf9c..0584493 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -117,7 +117,7 @@
 restbase::pdfrender_uri: 
http://deployment-pdfrender02.deployment-prep.eqiad.wmflabs:5252
 restbase::citoid_uri: 
http://deployment-sca02.deployment-prep.eqiad.wmflabs:1970
 restbase::trendingedits_uri: 
http://deployment-trending01.deployment-prep.eqiad.wmflabs:6699
-"mediawiki::log_aggregator": deployment-fluorine02.eqiad.wmflabs:8420
+"mediawiki::log_aggregator": 
deployment-fluorine02.deployment-prep.eqiad.wmflabs:8420
 "mediawiki::forward_syslog": 
deployment-logstash2.deployment-prep.eqiad.wmflabs:10514
 mediawiki_memcached_servers:
 - 10.68.23.25:11211:1  # deployment-memc04
@@ -137,7 +137,7 @@
 "misc::syslog-server::basepath": /data/project/syslog
 "cxserver::apertium": http://apertium-beta.wmflabs.org
 role::deployment::mediawiki::key_fingerprint: 
f0:54:06:fa:17:27:97:a2:cc:69:a0:a7:df:4c:0a:e3
-"role::deployment::salt_masters::deployment_server": 
deployment-tin.eqiad.wmflabs
+"role::deployment::salt_masters::deployment_server": 
deployment-tin.deployment-prep.eqiad.wmflabs
 "hhvm::extra::fcgi":
 hhvm:
 pcre_cache_type: lru
diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp
index 38c5972..2a08dc9 100644
--- a/modules/scap/manifests/init.pp
+++ b/modules/scap/manifests/init.pp
@@ -11,7 +11,7 @@
 #Default 'deployment-tin.eqiad.wmflabs'.
 class scap (
 $deployment_server = 'deployment',
-$wmflabs_master = 'deployment-tin.eqiad.wmflabs',
+$wmflabs_master = 'deployment-tin.deployment-prep.eqiad.wmflabs',
 $version = '3.4.2-1',
 ) {
 package { 'scap':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia32b47d04a8e7112d3aabb5e02207f015f30907e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Remove redundant tools-db entry from /etc/hosts

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328453 )

Change subject: Tools: Remove redundant tools-db entry from /etc/hosts
..

Tools: Remove redundant tools-db entry from /etc/hosts

The alias tools-db.tools.eqiad.wmflabs has been added to DNS with
9816b226f36154f52d794c9a186ebcd994775fb6; since then, with
/etc/resolv.conf's:

| search tools.eqiad.wmflabs eqiad.wmflabs

queries for the hostname "tools-db" will be properly resolved by DNS
alone; thus this change removes the redundant entry from /etc/hosts.

Bug: T139190
Change-Id: Ifdbbbc87fb2d68fe415af10c9fe8069a3c80e9f8
---
M modules/toollabs/templates/hosts.erb
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/modules/toollabs/templates/hosts.erb 
b/modules/toollabs/templates/hosts.erb
index 9ab8d86..b209e65 100644
--- a/modules/toollabs/templates/hosts.erb
+++ b/modules/toollabs/templates/hosts.erb
@@ -11,5 +11,3 @@
 ff02::3 ip6-allhosts
 
 <%= @active_redis_ip %> tools-redis tools-redis.eqiad.wmflabs
-
-10.64.37.9 tools-db

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdbbbc87fb2d68fe415af10c9fe8069a3c80e9f8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Fully qualify hostnames

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328451 )

Change subject: Tools: Fully qualify hostnames
..

Tools: Fully qualify hostnames

This change fully qualifies some hostnames in the "flat" namespace
beneath .eqiad.wmflabs.  Hostnames should only refer to the
project-specific instance, i. e. beneath .tools.eqiad.wmflabs.

This is most obvious in the case of role::toollabs::services: Here the
parameter $active_host was tested for equality with $::fqdn.  However,
due to $active_host being "tools-services-01.eqiad.wmflabs" and
$::fqdn being "tools-services-01.tools.eqiad.wmflabs", this would have
failed if $active_host had not been overwritten at
https://wikitech.wikimedia.org/wiki/Hiera:Tools.

An exception to this rule are modules/toollabs/files/host_aliases and
modules/toollabs/templates/mail-relay.exim4.conf.erb that need to list
legacy hostnames.

Bug: T153608
Change-Id: I6888bb449bd59bf4c522e3b14d6a38dc2540decd
---
M modules/role/manifests/toollabs/services.pp
M modules/toollabs/files/exec-manage
M modules/toollabs/manifests/init.pp
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/328451/1

diff --git a/modules/role/manifests/toollabs/services.pp 
b/modules/role/manifests/toollabs/services.pp
index 7b76a1d..f2f44db 100644
--- a/modules/role/manifests/toollabs/services.pp
+++ b/modules/role/manifests/toollabs/services.pp
@@ -1,6 +1,6 @@
 # filtertags: labs-project-tools
 class role::toollabs::services(
-$active_host = 'tools-services-01.eqiad.wmflabs',
+$active_host = 'tools-services-01.tools.eqiad.wmflabs',
 ) {
 system::role { 'role::toollabs::services':
 description => 'Tool Labs manifest based services',
diff --git a/modules/toollabs/files/exec-manage 
b/modules/toollabs/files/exec-manage
index bb82f32..8c221ce 100644
--- a/modules/toollabs/files/exec-manage
+++ b/modules/toollabs/files/exec-manage
@@ -11,7 +11,7 @@
 echo "exec-manage [status|depool|repool|test] exec_host_name"
 echo "exec-manage [list]"
 echo ""
-echo "Example: exec-manage status tools-exec1001.eqiad.wmflabs "
+echo "Example: exec-manage status tools-exec1001.tools.eqiad.wmflabs"
 }
 
 if [[ ! "$1" || "$1" == '-h' ]]; then
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index a590802..cbb9fc4 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -4,7 +4,7 @@
 $external_hostname = undef,
 $external_ip = undef,
 $is_mail_relay = false,
-$active_mail_relay = 'tools-mail.eqiad.wmflabs',
+$active_mail_relay = 'tools-mail.tools.eqiad.wmflabs',
 $mail_domain = 'tools.wmflabs.org',
 ) {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6888bb449bd59bf4c522e3b14d6a38dc2540decd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: WIP

2016-12-17 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328031 )

Change subject: WIP
..

WIP

Bug: T150726
Change-Id: I6e06e9e2e4c4be5b3f6555c22c0bb36181675318
---
M modules/role/manifests/toollabs/services.pp
1 file changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/328031/1

diff --git a/modules/role/manifests/toollabs/services.pp 
b/modules/role/manifests/toollabs/services.pp
index 7b76a1d..f521b92 100644
--- a/modules/role/manifests/toollabs/services.pp
+++ b/modules/role/manifests/toollabs/services.pp
@@ -16,14 +16,15 @@
 mode   => '0770',
 }
 
-file { "/data/project/.system/aptly/${::fqdn}":
-ensure=> directory,
-source=> '/srv/packages',
-owner => 'root',
-group => "${::labsproject}.admin",
-mode  => '0440',
-recurse   => true,
-show_diff => false,
+# TODO: It would look nicer not to subscribe to the Execs but the
+# defined type, if the Exec triggers the defined type.  Needs to
+# be tested.
+exec { 'backup_aptly_packages':
+command   => "/usr/bin/rsync --chmod 440 --chown 
root:${::labsproject}.admin -ilrt /srv/packages/ 
/data/project/.system/aptly/${::fqdn}",
+subscribe => Exec["publish-aptly-repo-jessie-${::labsproject}",
+  "publish-aptly-repo-precise-${::labsproject}",
+  "publish-aptly-repo-trusty-${::labsproject}"],
+logoutput => true,
 }
 
 class { '::toollabs::services':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e06e9e2e4c4be5b3f6555c22c0bb36181675318
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Generate node sets dynamically

2016-12-17 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328030 )

Change subject: Tools: Generate node sets dynamically
..

Tools: Generate node sets dynamically

Currently, the list of nodes per hostgroup is regenerated every
minute.  This is far more often than clush is actually used according
to the log file, and additionally this two-step process can result in
confusing behaviour in cases where the cron job fails in some way.

This change generates the node sets dynamically, on demand.  Thus they
are always up-to-date and errors in generating the list make
themselves known immediately.  Technically, the generated "load" on
wikitech will be reduced, but given the low frequency of API calls
(once per clush invocation) this is not a factor.

Change-Id: I5bb630836beb1c6a2aa2b346bef03687db9f4732
---
D modules/role/files/toollabs/clush/tools-clush-generator
A modules/role/files/toollabs/clush/tools-clush-generator.py
D modules/role/files/toollabs/clush/tools-clush-interpreter
M modules/role/manifests/toollabs/clush/master.pp
4 files changed, 108 insertions(+), 131 deletions(-)


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

diff --git a/modules/role/files/toollabs/clush/tools-clush-generator 
b/modules/role/files/toollabs/clush/tools-clush-generator
deleted file mode 100644
index 2b8f7cb..000
--- a/modules/role/files/toollabs/clush/tools-clush-generator
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/python3
-"""
-Simple script that generates a YAML file classifying all instances
-on the tools project into groups based on the role they perform.
-
-This YAML file can then be read by `tools-clush-interpreter` to
-list instances within a group. This can be used by `clush` to
-allow arbitrary command execution on targeted list of instances.
-
-This is run in a cron every hour.
-"""
-import json
-import yaml
-import argparse
-from urllib.request import urlopen
-
-
-# Maps prefixes to hostgroup names
-TOOLS_PREFIX_CLASSIFIER = {
-'webgrid-lighttpd-12': 'webgrid-lighttpd-precise',
-'webgrid-lighttpd-14': 'webgrid-lighttpd-trusty',
-'webgrid-generic': 'webgrid-generic',
-'webgrid-': 'webgrid',
-'exec-': 'exec',
-'exec-12': 'exec-precise',
-'exec-14': 'exec-trusty',
-'proxy-': 'webproxy',
-'checker-': 'checker',
-'redis-': 'redis',
-'services-': 'services',
-'bastion-': 'bastion',
-'cron-': 'cron',
-'grid-master': 'grid-master',
-'grid-shadow': 'grid-shadow',
-'mail': 'mail',
-'static-': 'static',
-'worker': 'k8s-worker',
-'k8s-master': 'k8s-master',
-'flannel-etcd': 'flannel-etcd',
-'k8s-etcd': 'k8s-etcd',
-'logs': 'logs',
-'precise-dev': 'precise-dev',
-'docker-builder': 'docker-builder',
-'prometheus': 'prometheus',
-'': 'all',
-}
-
-
-def get_hostgroups(classifier, project_name):
-hostgroups = {name: [] for name in classifier.values()}
-
-api_url = 'https://wikitech.wikimedia.org/w/api.php' \
-'?action=query=novainstances=eqiad=json' \
-'=' + project_name
-
-data = json.loads(urlopen(api_url).read().decode('utf-8'))
-
-for instance in data['query']['novainstances']:
-name = instance['name']
-for prefix in classifier:
-if name.startswith('%s-%s' % (project_name, prefix)):
-role = classifier[prefix]
-hostgroups[role].append('%s.%s.eqiad.wmflabs' % (name, 
project_name))
-
-return hostgroups
-
-
-if __name__ == '__main__':
-parser = argparse.ArgumentParser()
-parser.add_argument(
-'outputpath',
-help='Path to output hostgroup to host mappings'
-)
-args = parser.parse_args()
-
-with open('/etc/wmflabs-project', 'r') as f:
-project_name = f.read().rstrip('\n')
-
-hostgroups = get_hostgroups(TOOLS_PREFIX_CLASSIFIER, project_name)
-with open(args.outputpath, 'w') as f:
-f.write(yaml.safe_dump(hostgroups, default_flow_style=False))
diff --git a/modules/role/files/toollabs/clush/tools-clush-generator.py 
b/modules/role/files/toollabs/clush/tools-clush-generator.py
new file mode 100644
index 000..15b54c4
--- /dev/null
+++ b/modules/role/files/toollabs/clush/tools-clush-generator.py
@@ -0,0 +1,95 @@
+#!/usr/bin/python3
+
+
+"""Simple generator script for clustershell to dynamically list all
+   instances and classify them into groups based on their hostname.
+
+"""
+
+
+import argparse
+import json
+import urllib.request
+
+
+# Maps hostgroup names to prefixes.
+TOOLS_HOSTGROUPS = {
+'all': '',
+'bastion': 'bastion-',
+'checker': 'checker-',
+'cron': 'cron-',
+'docker-builder': 'docker-builder',
+'exec': 'exec-',
+'exec-precise': 'exec-12',
+'exec-trusty': 'exec-14',
+'flannel-etcd': 'flannel-etcd',
+'grid-master': 'grid-master',
+'grid-shadow': 'grid-shadow',
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Make tools-clush-generator project-agnostic

2016-12-12 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326892 )

Change subject: Tools: Make tools-clush-generator project-agnostic
..

Tools: Make tools-clush-generator project-agnostic

Change-Id: I7ec7bac459e9e256f24e0636e1d540081cfca13e
---
M modules/role/files/toollabs/clush/tools-clush-generator
1 file changed, 8 insertions(+), 5 deletions(-)


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

diff --git a/modules/role/files/toollabs/clush/tools-clush-generator 
b/modules/role/files/toollabs/clush/tools-clush-generator
index 4fbf845..2b8f7cb 100644
--- a/modules/role/files/toollabs/clush/tools-clush-generator
+++ b/modules/role/files/toollabs/clush/tools-clush-generator
@@ -46,21 +46,21 @@
 }
 
 
-def get_hostgroups(classifier):
+def get_hostgroups(classifier, project_name):
 hostgroups = {name: [] for name in classifier.values()}
 
 api_url = 'https://wikitech.wikimedia.org/w/api.php' \
 '?action=query=novainstances=eqiad=json' \
-'=tools'
+'=' + project_name
 
 data = json.loads(urlopen(api_url).read().decode('utf-8'))
 
 for instance in data['query']['novainstances']:
 name = instance['name']
 for prefix in classifier:
-if name.startswith('tools-' + prefix):
+if name.startswith('%s-%s' % (project_name, prefix)):
 role = classifier[prefix]
-hostgroups[role].append(name + ".tools.eqiad.wmflabs")
+hostgroups[role].append('%s.%s.eqiad.wmflabs' % (name, 
project_name))
 
 return hostgroups
 
@@ -73,6 +73,9 @@
 )
 args = parser.parse_args()
 
-hostgroups = get_hostgroups(TOOLS_PREFIX_CLASSIFIER)
+with open('/etc/wmflabs-project', 'r') as f:
+project_name = f.read().rstrip('\n')
+
+hostgroups = get_hostgroups(TOOLS_PREFIX_CLASSIFIER, project_name)
 with open(args.outputpath, 'w') as f:
 f.write(yaml.safe_dump(hostgroups, default_flow_style=False))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ec7bac459e9e256f24e0636e1d540081cfca13e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Remove bashisms from clush

2016-12-11 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326379 )

Change subject: Tools: Remove bashisms from clush
..

Tools: Remove bashisms from clush

Change-Id: Ia2da9869a78128fcf155fe6350b8d86524469398
---
M modules/role/files/toollabs/clush/clush
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/326379/1

diff --git a/modules/role/files/toollabs/clush/clush 
b/modules/role/files/toollabs/clush/clush
index 8ef..a0f3e1b 100644
--- a/modules/role/files/toollabs/clush/clush
+++ b/modules/role/files/toollabs/clush/clush
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Wrapper script around clush to add some additional features
 #  - Make sure it is *not* being called by someone as root.
 #We do not want people to be using it directly interactively as
@@ -9,7 +9,7 @@
 
 CALLINGUSER="$(whoami)"
 
-if [[ $CALLINGUSER == "root" ]]; then
+if [ "$CALLINGUSER" = root ]; then
 echo "Only members of tools.admin group can use clush interactively"
 echo "This is to make sure we have a nice and clean audit trail"
 echo "Do not run this directly as root or use sudo"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2da9869a78128fcf155fe6350b8d86524469398
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Quote arguments in clush

2016-12-11 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326380 )

Change subject: Tools: Quote arguments in clush
..

Tools: Quote arguments in clush

Change-Id: I0574ee1b06ea0768a95bb4f5264a4420691234c0
---
M modules/role/files/toollabs/clush/clush
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/80/326380/1

diff --git a/modules/role/files/toollabs/clush/clush 
b/modules/role/files/toollabs/clush/clush
index a0f3e1b..ff2fc23 100644
--- a/modules/role/files/toollabs/clush/clush
+++ b/modules/role/files/toollabs/clush/clush
@@ -20,4 +20,4 @@
 # Write an entry into the 'log file'
 echo "`date +%Y-%m-%d:%H:%M:%S` ${CALLINGUSER} ${@}" |
 sudo tee --append /var/log/clush.log >/dev/null
-sudo /usr/bin/clush $@
+sudo /usr/bin/clush "$@"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0574ee1b06ea0768a95bb4f5264a4420691234c0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: sudo: Use validate_cmd for validating sudoers files

2016-12-11 Thread Tim Landscheidt (Code Review)
Hello Faidon Liambotis, Chasemp,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: sudo: Use validate_cmd for validating sudoers files
..

sudo: Use validate_cmd for validating sudoers files

Change-Id: Ifc8f1c3e72d188d8a6ba6a6c72df02aadf6002a9
---
M modules/sudo/manifests/group.pp
M modules/sudo/manifests/user.pp
2 files changed, 12 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/326376/1

diff --git a/modules/sudo/manifests/group.pp b/modules/sudo/manifests/group.pp
index 7c234f4..c13c817 100644
--- a/modules/sudo/manifests/group.pp
+++ b/modules/sudo/manifests/group.pp
@@ -34,18 +34,12 @@
 
 if $ensure == 'present' {
 file { $filename:
-ensure  => $ensure,
-owner   => 'root',
-group   => 'root',
-mode=> '0440',
-content => template('sudo/sudoers.erb'),
-}
-
-exec { "sudo_group_${title}_linting":
-command => "/bin/rm -f ${filename} && /bin/false",
-unless  => "/usr/sbin/visudo -cqf ${filename}",
-refreshonly => true,
-subscribe   => File[$filename],
+ensure   => $ensure,
+owner=> 'root',
+group=> 'root',
+mode => '0440',
+content  => template('sudo/sudoers.erb'),
+validate_cmd => '/usr/sbin/visudo -cqf %'
 }
 } else {
 file { $filename:
diff --git a/modules/sudo/manifests/user.pp b/modules/sudo/manifests/user.pp
index 424491f..200622d 100644
--- a/modules/sudo/manifests/user.pp
+++ b/modules/sudo/manifests/user.pp
@@ -34,18 +34,12 @@
 
 if $ensure == 'present' {
 file { $filename:
-ensure  => $ensure,
-owner   => 'root',
-group   => 'root',
-mode=> '0440',
-content => template('sudo/sudoers.erb'),
-}
-
-exec { "sudo_user_${title}_linting":
-command => "/bin/rm -f ${filename} && /bin/false",
-unless  => "/usr/sbin/visudo -cqf ${filename}",
-refreshonly => true,
-subscribe   => File[$filename],
+ensure   => $ensure,
+owner=> 'root',
+group=> 'root',
+mode => '0440',
+content  => template('sudo/sudoers.erb'),
+validate_cmd => '/usr/sbin/visudo -cqf %'
 }
 } else {
 file { $filename:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc8f1c3e72d188d8a6ba6a6c72df02aadf6002a9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labs: Remove obsolete code

2016-12-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326312 )

Change subject: Labs: Remove obsolete code
..

Labs: Remove obsolete code

Change-Id: I51d3536c078e709373727055eb7f26903a09da16
---
M modules/role/manifests/labs/instance.pp
1 file changed, 0 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/326312/1

diff --git a/modules/role/manifests/labs/instance.pp 
b/modules/role/manifests/labs/instance.pp
index 0431916..bded096 100644
--- a/modules/role/manifests/labs/instance.pp
+++ b/modules/role/manifests/labs/instance.pp
@@ -39,20 +39,6 @@
 require role::labs::nfsclient
 }
 
-if os_version('ubuntu <= precise') {
-# Was used by ssh earlier, not any more
-# Remove in a few weeks?
-file { '/public/keys':
-ensure  => absent,
-force   => true,
-require => Mount['/public/keys'],
-}
-
-mount { '/public/keys':
-ensure  => absent,
-}
-}
-
 # In production, we try to be punctilious about having Puppet manage
 # system state, and thus it's reasonable to purge Apache site configs
 # that have not been declared via Puppet. But on Labs we want to allow

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51d3536c078e709373727055eb7f26903a09da16
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labs: Set SYS_UID_MAX and SYS_GID_MAX to 499

2016-12-10 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326311 )

Change subject: Labs: Set SYS_UID_MAX and SYS_GID_MAX to 499
..

Labs: Set SYS_UID_MAX and SYS_GID_MAX to 499

For historical reasons, LDAP accounts start at uid/gid 500.  However
by default SYS_UID_MAX and SYS_GID_MAX are set to 999, i. e. there is
the theoretical potential for system users being created with
uids/gids already associated with LDAP accounts.

This change sets SYS_UID_MAX and SYS_GID_MAX to 499.

Bug: T45795
Change-Id: Ib2b6c353c0f802f77f900e4330e4eb85c096d67e
---
M modules/role/manifests/labs/instance.pp
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/labs/instance.pp 
b/modules/role/manifests/labs/instance.pp
index 0431916..0727da2 100644
--- a/modules/role/manifests/labs/instance.pp
+++ b/modules/role/manifests/labs/instance.pp
@@ -75,5 +75,18 @@
 source => 'puppet:///modules/diamond/collector/sshsessions.py',
 }
 
+# For historical reasons, LDAP users start at uid/gid 500, so we
+# need to guard against system users being created in that range.
+file_line { 'login.defs-SYS_UID_MAX':
+path => '/etc/login.defs',
+match=> '#?SYS_UID_MAX\b',
+line => 'SYS_UID_MAX   499',
+}
+file_line { 'login.defs-SYS_GID_MAX':
+path => '/etc/login.defs',
+match=> '#?SYS_GID_MAX\b',
+line => 'SYS_GID_MAX   499',
+}
+
 hiera_include('classes', [])
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2b6c353c0f802f77f900e4330e4eb85c096d67e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Update list of host aliases for mail relay

2016-12-10 Thread Tim Landscheidt (Code Review)
Hello Merlijn van Deen,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Tools: Update list of host aliases for mail relay
..

Tools: Update list of host aliases for mail relay

Change-Id: I16588eb97e09929d47c3b0a70e64cef5a01fc67d
---
M modules/toollabs/templates/mail-relay.exim4.conf.erb
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/326308/1

diff --git a/modules/toollabs/templates/mail-relay.exim4.conf.erb 
b/modules/toollabs/templates/mail-relay.exim4.conf.erb
index 1b7f3ba..eb301ef 100644
--- a/modules/toollabs/templates/mail-relay.exim4.conf.erb
+++ b/modules/toollabs/templates/mail-relay.exim4.conf.erb
@@ -30,17 +30,14 @@
# host_aliases has been decommissioned
# (T109485), this list should be empty.
tools-bastion-01.eqiad.wmflabs : \
-   tools-bastion-02.eqiad.wmflabs : \
-   tools-checker-01.eqiad.wmflabs : \
tools-checker-02.eqiad.wmflabs : \
tools-mail.eqiad.wmflabs : \
tools-precise-dev.eqiad.wmflabs : \
-   tools-services-02.eqiad.wmflabs : \
+   tools-services-01.eqiad.wmflabs : \
tools-submit.eqiad.wmflabs : \
tools-webgrid-generic-1401.eqiad.wmflabs : \
tools-webgrid-generic-1402.eqiad.wmflabs : \
tools-webgrid-generic-1403.eqiad.wmflabs : \
-   tools-webgrid-generic-1404.eqiad.wmflabs : \
tools-webgrid-lighttpd-1201.eqiad.wmflabs : \
tools-webgrid-lighttpd-1202.eqiad.wmflabs : \
tools-webgrid-lighttpd-1203.eqiad.wmflabs : \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16588eb97e09929d47c3b0a70e64cef5a01fc67d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Undo obsolete /var/mail customization

2016-12-10 Thread Tim Landscheidt (Code Review)
Hello Merlijn van Deen,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Tools: Undo obsolete /var/mail customization
..

Tools: Undo obsolete /var/mail customization

Starting with 5d48443710d8064954ea00d1bbe29878ef65c2eb/
e0e617f9041a115d7a3155e2b7d577222f0e2e84, mail for user and tool
accounts was stored in /data/project/.system/store/mail.
17ee544c1fb8eb1dd539aa1efb5cca1268406e07 replaced this with the
current setup where mail is only forwarded, but not stored.

Thus /data/project/.system/store/mail is no longer in any use, and
after cleaning out old mail it is also empty.

This change removes /data/project/.system/store/mail and replaces the
symbolic link for /var/mail with the default directory created by
base-files's postinst to minimize the differences with standard
installations.

Change-Id: If5005dd85ef395d502a6ebdb516b61f95a8d8aca
---
M modules/toollabs/manifests/init.pp
1 file changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/326306/1

diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index a590802..4558ff3 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -146,11 +146,18 @@
 }
 }
 
+# TODO: Remove after Puppet cycle.
 file { '/var/mail':
-ensure  => link,
-force   => true,
-target  => "${store}/mail",
-require => File[$store],
+ensure => directory,
+owner  => 'root',
+group  => 'mail',
+mode   => '2775',
+}
+
+# TODO: Remove after Puppet cycle.
+file { "${store}/mail":
+ensure => absent,
+force  => true,
 }
 
 # Link to currently active proxy

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5005dd85ef395d502a6ebdb516b61f95a8d8aca
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Move wikimedia-logo.svg to role module

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

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

Change subject: Move wikimedia-logo.svg to role module
..

Move wikimedia-logo.svg to role module

Change-Id: I5c03b9a179841b5dd2f834f95266b9c4b10078df
---
R modules/role/files/grafana/wikimedia-logo.svg
M modules/role/manifests/grafana/base.pp
2 files changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/325729/1

diff --git a/files/misc/wikimedia-logo.svg 
b/modules/role/files/grafana/wikimedia-logo.svg
similarity index 100%
rename from files/misc/wikimedia-logo.svg
rename to modules/role/files/grafana/wikimedia-logo.svg
diff --git a/modules/role/manifests/grafana/base.pp 
b/modules/role/manifests/grafana/base.pp
index d4f2e58..746f969 100644
--- a/modules/role/manifests/grafana/base.pp
+++ b/modules/role/manifests/grafana/base.pp
@@ -123,16 +123,13 @@
 notify  => Service['grafana-server'],
 }
 
-# move file to module?
-# lint:ignore:puppet_url_without_modules
 file { '/usr/share/grafana/public/img/grafana_icon.svg':
-source  => 'puppet:///files/misc/wikimedia-logo.svg',
+source  => 'puppet:///modules/role/grafana/wikimedia-logo.svg',
 owner   => 'root',
 group   => 'root',
 mode=> '0444',
 require => Package['grafana'],
 }
-# lint:endignore
 
 # We disable account creation, because accounts are created
 # automagically based on the X-WEBAUTH-USER, which is either set

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c03b9a179841b5dd2f834f95266b9c4b10078df
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/software[master]: Fix flake8 errors

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

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

Change subject: Fix flake8 errors
..

Fix flake8 errors

Bug: T152549
Change-Id: I4c8c2eb1eb3f19ff6f89ae913b3d0efe909f2d1c
---
M clouseau/clouseau/retention/utils/magic.py
M clouseau/scripts/retention/rulestore.py
M clouseau/setup.py
M salt-misc/parse_minion_output.py
M salt-misc/salt_fixups.py
M txt2yaml/txt2yaml.py
6 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/15/325715/1

diff --git a/clouseau/clouseau/retention/utils/magic.py 
b/clouseau/clouseau/retention/utils/magic.py
index c0b8393..3adbc1b 100644
--- a/clouseau/clouseau/retention/utils/magic.py
+++ b/clouseau/clouseau/retention/utils/magic.py
@@ -15,6 +15,7 @@
 """
 return ctypes.cdll.LoadLibrary(find_library('magic'))
 
+
 _libraries = {}
 _libraries['magic'] = _init()
 
@@ -49,6 +50,8 @@
 
 class magic_set(Structure):
 pass
+
+
 magic_set._fields_ = []
 magic_t = POINTER(magic_set)
 
diff --git a/clouseau/scripts/retention/rulestore.py 
b/clouseau/scripts/retention/rulestore.py
index eca902b..ad644b5 100644
--- a/clouseau/scripts/retention/rulestore.py
+++ b/clouseau/scripts/retention/rulestore.py
@@ -164,5 +164,6 @@
 hosts = client.cmd_expandminions(hosts, "test.ping", expr_form=htype)
 do_action(cdb, action, hosts, status, path, dryrun)
 
+
 if __name__ == '__main__':
 main()
diff --git a/clouseau/setup.py b/clouseau/setup.py
index 1bfbcd3..a5b7dc8 100644
--- a/clouseau/setup.py
+++ b/clouseau/setup.py
@@ -17,6 +17,7 @@
 else:
 return glob.glob(path + '*.' + extension)
 
+
 setup(
 name="clouseau",
 version="0.0.1",
diff --git a/salt-misc/parse_minion_output.py b/salt-misc/parse_minion_output.py
index 497bcaf..64b0320 100644
--- a/salt-misc/parse_minion_output.py
+++ b/salt-misc/parse_minion_output.py
@@ -307,5 +307,6 @@
 show_salt_too_many_processes(summaries)
 show_salt_no_keysize(summaries)
 
+
 if __name__ == "__main__":
 main()
diff --git a/salt-misc/salt_fixups.py b/salt-misc/salt_fixups.py
index 252853d..39fe9a8 100644
--- a/salt-misc/salt_fixups.py
+++ b/salt-misc/salt_fixups.py
@@ -569,5 +569,6 @@
 elif dryrun:
 print "wrong master encountered, stopping"
 
+
 if __name__ == "__main__":
 main()
diff --git a/txt2yaml/txt2yaml.py b/txt2yaml/txt2yaml.py
index dcf70c6..040fb8e 100755
--- a/txt2yaml/txt2yaml.py
+++ b/txt2yaml/txt2yaml.py
@@ -22,5 +22,6 @@
 # Write amended YAML to stdout.
 yaml.dump(y, sys.stdout)
 
+
 if __name__ == '__main__':
 main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c8c2eb1eb3f19ff6f89ae913b3d0efe909f2d1c
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Move ve files to role module

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

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

Change subject: Move ve files to role module
..

Move ve files to role module

Change-Id: I4986612f0c33c63304b84d77ca9648ab10ed
---
R modules/role/files/ve/devwiki.conf
R modules/role/files/ve/vb
M modules/role/manifests/ve.pp
3 files changed, 2 insertions(+), 5 deletions(-)


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

diff --git a/files/ve/devwiki.conf b/modules/role/files/ve/devwiki.conf
similarity index 100%
rename from files/ve/devwiki.conf
rename to modules/role/files/ve/devwiki.conf
diff --git a/files/ve/vb b/modules/role/files/ve/vb
similarity index 100%
rename from files/ve/vb
rename to modules/role/files/ve/vb
diff --git a/modules/role/manifests/ve.pp b/modules/role/manifests/ve.pp
index d2e1ca4..dc88fbd 100644
--- a/modules/role/manifests/ve.pp
+++ b/modules/role/manifests/ve.pp
@@ -10,18 +10,15 @@
 include ::mediawiki::web::sites
 include ::mediawiki::web::prod_sites
 
-# move files to module?
-# lint:ignore:puppet_url_without_modules
 file { '/usr/local/bin/vb':
-source => 'puppet:///files/ve/vb',
+source => 'puppet:///modules/role/ve/vb',
 owner  => 'root',
 group  => 'root',
 mode   => '0555',
 }
 
 apache::site { 'devwiki':
-source   => 'puppet:///files/ve/devwiki.conf',
+source   => 'puppet:///modules/role/ve/devwiki.conf',
 priority => 4,
 }
-# lint:endignore
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4986612f0c33c63304b84d77ca9648ab10ed
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "elasticsearch: Fix puppet URL in comment"

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

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

Change subject: Revert "elasticsearch: Fix puppet URL in comment"
..

Revert "elasticsearch: Fix puppet URL in comment"

The URL as given was correct; I had misremembered its format.  This
reverts commit 400d76433b94a58a0b379172064de84362530ffa.

Change-Id: I1fe8e4674eb616f6cbcd544c2faaf25e46717a3e
---
M modules/elasticsearch/files/logrotate
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/325639/1

diff --git a/modules/elasticsearch/files/logrotate 
b/modules/elasticsearch/files/logrotate
index 059ecb0..5a5131f 100644
--- a/modules/elasticsearch/files/logrotate
+++ b/modules/elasticsearch/files/logrotate
@@ -1,6 +1,6 @@
 #
 ### THIS FILE IS MANAGED BY PUPPET
-### puppet:///elasticsearch/logrotate
+### puppet:///modules/elasticsearch/logrotate
 #
 
 /var/log/elasticsearch/*.log {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fe8e4674eb616f6cbcd544c2faaf25e46717a3e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: zuul: Fix puppet URL in comment correctly

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

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

Change subject: zuul: Fix puppet URL in comment correctly
..

zuul: Fix puppet URL in comment correctly

Change-Id: I70d09234f41a1979ae0070dc86a1a9f9548a3371
---
M modules/zuul/files/gearman-logging.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/325629/1

diff --git a/modules/zuul/files/gearman-logging.conf 
b/modules/zuul/files/gearman-logging.conf
index 7531dc7..6ebbcec 100644
--- a/modules/zuul/files/gearman-logging.conf
+++ b/modules/zuul/files/gearman-logging.conf
@@ -1,6 +1,6 @@
 #
 ### THIS FILE IS MANAGED BY PUPPET
-### puppet:///zuul/gearman-logging.conf
+### puppet:///modules/zuul/gearman-logging.conf
 #
 # vim: set filetype=dosini:
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70d09234f41a1979ae0070dc86a1a9f9548a3371
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove obsolete file misc/scripts/pcntl

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

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

Change subject: Remove obsolete file misc/scripts/pcntl
..

Remove obsolete file misc/scripts/pcntl

The file was added by 7fc4596035d41fabbbfb852e62b75286f03ee424.  It is
probably not of general use; if it was, it would have been moved to
operations/software or referenced in a manifest.

Change-Id: Ib10d15fdfab2cd1375f2bf6bb8deb77b1ffdffbd
---
D files/misc/scripts/pcntl
1 file changed, 0 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/325587/1

diff --git a/files/misc/scripts/pcntl b/files/misc/scripts/pcntl
deleted file mode 100755
index 7b8007d..000
--- a/files/misc/scripts/pcntl
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/python
-#
-# reads stdin and calculates some percentiles from the first
-# number found on each line.
-#
-
-from __future__ import division
-import sys
-import re
-
-vals = []
-
-for line in sys.stdin:
-   n = re.search('([\d\.]+)', line)
-   if n:
-   vals.append(float(n.group(1)))
-
-vals = sorted(vals)
-
-p50 = int(round(len(vals) * 0.5))-1
-p90 = int(round(len(vals) * 0.9))-1
-p99 = int(round(len(vals) * 0.99))-1
-avg = reduce(lambda x, y: x + y, vals) / len(vals)
-
-print 'min: %.3f, avg: %.3f, max: %.3f' % (vals[0], avg, vals[len(vals)-1])
-print 'p50: %.3f, p90: %.3f, p99: %.3f' % (vals[p50], vals[p90], vals[p99])

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib10d15fdfab2cd1375f2bf6bb8deb77b1ffdffbd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


  1   2   3   4   5   6   7   >