Ori.livneh has uploaded a new change for review.

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

Change subject: Delete the scap scripts that have been moved to 
mediawiki/tools/scap
......................................................................

Delete the scap scripts that have been moved to mediawiki/tools/scap

The files were replaced with symlinks in Ia210f3ced. The links point to a
checkout of the mediawiki/tools/scap repository, managed by Puppet.

Change-Id: Ib2c8e6f43dbce142cd81971c155f5959ff03701e
---
D files/scap/mw-update-l10n
D files/scap/restart-twemproxy
D files/scap/scap
D files/scap/scappy
D files/scap/sync-common-all
D files/scap/sync-common-file
D files/scap/sync-dblist
D files/scap/sync-dir
D files/scap/sync-docroot
D files/scap/sync-file
D files/scap/sync-wikiversions
11 files changed, 0 insertions(+), 598 deletions(-)


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

diff --git a/files/scap/mw-update-l10n b/files/scap/mw-update-l10n
deleted file mode 100755
index 81d5c40..0000000
--- a/files/scap/mw-update-l10n
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/bash
-
-# WARNING: make sure to run any PHP scripts coming from MediaWiki under a
-# dedicated user such as `mwdeploy`. This script is running as user `root` on
-# the beta cluster.
-
-. /usr/local/lib/mw-deployment-vars.sh
-BINDIR=/usr/local/bin
-
-function die() {
-       if [ -n "$*" ]; then
-               echo >&2 "$*"
-       else
-               echo >&2 "Update of MediaWiki localisation messages failed" 
-       fi
-       exit 1
-}
-
-if [ "`uname -s`" != Linux ]; then
-       die "ERROR: This script requires the Linux operating system to function 
correctly"
-fi
-
-QUIET=--quiet
-TEMP=`getopt -o '' -l verbose -- "$@"`
-if [ $? -ne 0 ]; then
-       exit 1
-fi
-eval set -- "$TEMP"
-while true; do
-       case "$1" in
-               --verbose)
-                       QUIET=
-                       shift
-                       ;;
-               --)
-                       shift
-                       break
-       esac
-done
-
-# Calculate the number of parallel threads
-# Leave a couple of cores free for other stuff
-CPUS=`grep -c 'model name' /proc/cpuinfo`
-THREADS=`expr $CPUS - 2`
-
-if [ $THREADS -lt 1 ]; then
-       THREADS=1
-fi
-
-mwExtVerDbSets=$($BINDIR/mwversionsinuse --extended --withdb) || die
-# Regenerate the extension message file list for all active MediaWiki versions
-for i in ${mwExtVerDbSets[@]}; do
-       mwVerNum=${i%=*}
-       mwDbName=${i#*=}
-
-       # Only looks at certain MW version if specified
-       if [ -n "$MW_VERSIONS_SYNC" ]; then
-               skip=1
-               for v in ${MW_VERSIONS_SYNC[@]}; do
-                       if [ "$mwVerNum" == "$v" ]; then
-                               skip=0
-                       fi
-               done
-               if [ "$skip" -eq "1" ]; then
-                       continue
-               fi
-       fi
-
-       echo -n "Updating ExtensionMessages-$mwVerNum.php..."
-       mwTempDest=$(sudo -u apache mktemp) || die
-       sudo -u apache $BINDIR/mwscript mergeMessageFileList.php 
--wiki="$mwDbName" \
-               --list-file=$MW_COMMON_SOURCE/wmf-config/extension-list $QUIET 
--output="$mwTempDest" \
-               || die
-       sudo -u apache chmod 664 "$mwTempDest"  || die
-       cp "$mwTempDest" 
$MW_COMMON_SOURCE/wmf-config/ExtensionMessages-"$mwVerNum".php || die
-       sudo -u apache rm "$mwTempDest" || die
-       echo "done"
-
-       # Update ExtensionMessages-*.php in the local copy
-       # Though only when commons are different files. Beta has everything on 
the same
-       # shared filesystem and thus cp would complain about copying to the 
same file.
-       if [ `readlink -f $MW_COMMON_SOURCE` != `readlink -f $MW_COMMON` ]; then
-               echo "Copying to local copy..."
-               sudo -u mwdeploy \
-                       cp 
$MW_COMMON_SOURCE/wmf-config/ExtensionMessages-"$mwVerNum".php 
$MW_COMMON/wmf-config/ \
-                       || die
-               echo "done"
-       fi
-
-       # Rebuild all the CDB files for each language
-       echo -n "Updating LocalisationCache for $mwVerNum... "
-       sudo -u l10nupdate $BINDIR/mwscript rebuildLocalisationCache.php 
--wiki="$mwDbName" \
-               --outdir=$MW_COMMON_SOURCE/php-$mwVerNum/cache/l10n $QUIET \
-               --threads=$THREADS \
-               || die
-
-       # Include JSON versions of the CDB files and add MD5 files
-       sudo -u l10nupdate $BINDIR/refreshCdbJsonFiles 
--directory="$MW_COMMON_SOURCE/php-$mwVerNum/cache/l10n" \
-               --threads=$THREADS \
-               || die
-
-       echo "done"
-done
-
diff --git a/files/scap/restart-twemproxy b/files/scap/restart-twemproxy
deleted file mode 100755
index 41af489..0000000
--- a/files/scap/restart-twemproxy
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-. /usr/local/lib/mw-deployment-vars.sh
-BINDIR="/usr/local/bin"
-
-if [ ! -S "$SSH_AUTH_SOCK" ]; then
-       echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket."
-       echo >&2 "Did you start your ssh-agent?"
-       exit 1
-fi
-
-# No use going any further if we can't complete the sync
-[ $(which dsh 2>/dev/null) ] || {
-       echo >&2 "Error: no dsh on this host, aborting"
-       exit 1
-}
-
-# Restart twemproxy
-echo 'Restarting twemproxy on all servers'
-dsh -cM -g mediawiki-installation -o -oSetupTimeout=30 -F8 -- "sudo 
/sbin/restart twemproxy"
-
-echo 'Finished'
-
-# Notify
-$BINDIR/dologmsg "!log $USER restarted twemproxy on all servers"
diff --git a/files/scap/scap b/files/scap/scap
deleted file mode 100755
index d43c97c..0000000
--- a/files/scap/scap
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/bash
-
-# Acquire a non-blocking lock to prevent parallel runs
-exec 200>/var/lock/scap || exit 1
-flock -n 200 || { echo "WARNING: could not acquire /var/lock/scap; scap is 
already running." >&2; exit 1; }
-
-SCAP_START=$(date +%s)
-NODEFILE=
-
-function cleanup() {
-       if [ -n "$NODEFILE" ]; then
-               rm -f "$NODEFILE"
-       fi
-       # The lock is automatically released on exit, but do it here for good 
measure
-       flock -u 200
-}
-
-function die() {
-       cleanup
-       if [ -n "$*" ]; then
-               echo >&2 "$*"
-       else
-               echo >&2 "sync failed" 
-       fi
-       exit 1
-}
-
-. /usr/local/lib/mw-deployment-vars.sh
-
-BINDIR=/usr/local/bin
-
-if [ ! -S "$SSH_AUTH_SOCK" ]; then
-       die "SSH_AUTH_SOCK not set or not pointing to a socket. Did you start 
your ssh-agent?"
-fi
-
-DSH_EXPORTS=
-# Only sync the active version(s) if requested
-if [[ "$1" == --versions=?* ]]; then
-       versions="${1#--versions=}"
-       shift
-       if [ "$versions" == "active" ]; then
-               # All active MW versions
-               export MW_VERSIONS_SYNC=$($BINDIR/mwversionsinuse --home)
-       elif [ -d "$MW_COMMON_SOURCE/php-$versions" ]; then
-               # A specific MW version
-               export MW_VERSIONS_SYNC="$versions"
-       else
-               die "Invalid MediaWiki version \"$versions\""
-       fi
-       unset versions
-       # This will export MW_VERSIONS_SYNC to scap-1 on the proxies/servers
-       echo "MediaWiki versions selected for sync (via --versions): 
$MW_VERSIONS_SYNC"
-       DSH_EXPORTS="export MW_VERSIONS_SYNC=\"$MW_VERSIONS_SYNC\";"
-else
-       echo "Syncing all versions."
-fi
-
-if [[ "$MW_SCAP_BETA" == "1" ]]; then
-       DSH_EXPORTS="export MW_SCAP_BETA=1; $DSH_EXPORTS"
-fi
-
-# Perform syntax check
-echo -n "Checking syntax of wmf-config and multiversion..."
-if ( ! ( $BINDIR/lint $MW_COMMON_SOURCE/wmf-config && $BINDIR/lint 
$MW_COMMON_SOURCE/multiversion ) ); then
-       die "Found syntax errors, cannot sync."
-fi
-echo " done"
-
-# Update the current machine so that serialization works.
-# Push wikiversions.dat changes so mwversionsinuse, set-group-write,
-# and mwscript work with the right version of the files.
-/usr/local/bin/sync-common || die
-
-# Update list of extension message files and regenerate
-# the localisation cache
-/usr/local/bin/mw-update-l10n || die
-
-# Notify
-$BINDIR/dologmsg "!log $USER started scap${*:+: }$*"
-
-# Disable logging
-export DOLOGMSGNOLOG=1
-
-echo 'Updating rsync proxies...'
-dsh -cM -g scap-proxies -o -oSetupTimeout=10 -- "$DSH_EXPORTS 
/usr/local/bin/scap-1"
-echo 'Finished'
-
-# Do the main code update in random order to avoid overloading any given rsync 
server
-NODEFILE=$(mktemp)
-shuf < /etc/dsh/group/mediawiki-installation > "$NODEFILE" || die
-
-RSYNC_SERVERS=`sed 's/^#.*//' /etc/dsh/group/scap-proxies` || die
-# Condense whitespace
-RSYNC_SERVERS=`echo $RSYNC_SERVERS`
-
-echo 'Copying code to apaches...'
-dsh -F40 -cM -f "$NODEFILE" -o -oSetupTimeout=10 -- "$DSH_EXPORTS 
/usr/local/bin/scap-1 \""$RSYNC_SERVERS"\""
-echo 'Finished'
-
-echo 'Rebuilding CDB files from /upstream...'
-dsh -cM -g mediawiki-installation -o -oSetupTimeout=10 -- "$DSH_EXPORTS 
/usr/local/bin/scap-rebuild-cdbs"
-echo 'Finished'
-
-# Builds wikiversions.cdb and syncs it to the apaches with the dat file.
-# This is done after all else so that deploying new MW versions is easier.
-sync-wikiversions || die
-
-SCAP_END=$(date +%s)
-DIFF=$((SCAP_END-SCAP_START))
-MINS=$(((DIFF/60)%60))
-SECS=$((DIFF%60))
-printf -v HUMAN_DIFF "%02dm %02ds" $MINS $SECS
-
-echo "scap completed in $HUMAN_DIFF."
-
-export DOLOGMSGNOLOG=""
-$BINDIR/dologmsg "!log $USER finished scap${*:+: }$* (duration: $HUMAN_DIFF)"
-$BINDIR/deploy2graphite scap $DIFF
-
-cleanup
-exit 0
diff --git a/files/scap/scappy b/files/scap/scappy
deleted file mode 100755
index 02c3395..0000000
--- a/files/scap/scappy
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-  Heterogeneous deployment script
-  Deploys MediaWiki code and configuration to a group of servers via rsync.
-
-"""
-import argparse
-import contextlib
-import fcntl
-import imp
-import logging
-import os
-import pipes
-import random
-import socket
-import struct
-import subprocess
-import tempfile
-import time
-
-
-
-class IRCSocketHandler(logging.Handler):
-    """Log handler for logmsgbot on #wikimedia-operation."""
-
-    def __init__(self, host, port, timeout=1.0):
-        super(IRCSocketHandler, self).__init__()
-        self.addr = (host, port)
-        self.level = logging.INFO
-        self.timeout = timeout
-
-    def emit(self, record):
-        message = '!log %s %s' % (os.getlogin(), record.getMessage())
-        try:
-            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-            sock.settimeout(self.timeout)
-            sock.connect(self.addr)
-            sock.sendall(message.encode('utf-8'))
-            sock.close()
-        except (socket.timeout, socket.error, socket.gaierror):
-            self.handleError(record)
-
-
-log = logging.getLogger('scap')
-log.setLevel(logging.DEBUG)
-log.addHandler(IRCSocketHandler('neon.wikimedia.org', 9200))
-log.addHandler(logging.StreamHandler())
-
-
-def shell_map(mapping):
-    """Convert a map to a string of space-separated KEY=VALUE pairs."""
-    return ' '.join('%s=%s' % (k, pipes.quote(v)) for k, v in mapping.items())
-
-
-def get_config():
-    """Load environment variables from mw-deployment-vars.sh."""
-    dep_env = imp.load_source('__env', '/usr/local/lib/mw-deployment-vars.sh')
-    return {k: v for k, v in dep_env.__dict__.items() if k.startswith('MW_')}
-
-
[email protected]
-def lock(filename):
-    """Context manager. Acquires a file lock on entry, releases on exit."""
-    with open(filename, 'w+') as lock_fd:
-        fcntl.lockf(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
-        try:
-            yield
-        finally:
-            fcntl.lockf(lock_fd, fcntl.LOCK_UN)
-
-
-def cdb_items(buf):
-    """Iterates over CDB key/value pairs."""
-    table_start, = struct.unpack_from('<L', buf)
-    offset = 2048
-    while offset < table_start:
-        lengths = struct.unpack_from('<LL', buf, offset)
-        offset += 8
-        yield struct.unpack_from('%ds %ds' % lengths, buf, offset)
-        offset += sum(lengths)
-
-
-def get_branches(wikiversions_cdb_path):
-    """Get the set of active branches from a wikiversions.cdb file."""
-    with open(wikiversions_cdb_path, 'rb') as cdb_file:
-        cdb = cdb_file.read()
-        return {v for k, v in cdb_items(cdb) if k.startswith('ver:')}
-
-
-def dsh(command, group, exports=None):
-    """Run a command on multiple hosts via DSH."""
-    if exports:
-        command = '%s %s' % (shell_map(exports), command)
-    group_file = os.path.join('/etc/dsh/group', group)
-    return subprocess.check_call(['/usr/bin/dsh', '-F40', '-cM', '-f',
-                                  group_file, '-o', '-oSetupTimeout=10', '--',
-                                  command.strip()])
-
-
-def check_syntax(*paths):
-    """Run lint.php on `paths`; raise CalledProcessError if nonzero exit."""
-    command = ['/usr/bin/php', '-n', '-dextension=parsekit.so',
-               '/usr/local/bin/lint.php'] + list(paths)
-    return subprocess.check_call(command)
-
-
-def parse_args():
-    """Parse command-line arguments."""
-    parser = argparse.ArgumentParser(description='Deploy MediaWiki')
-    parser.add_argument('--active', action='store_true', default=False,
-                        help='only sync active branches')
-    parser.add_argument('message', nargs=argparse.REMAINDER)
-    return parser.parse_args()
-
-
-def scap():
-    """Deploy MediaWiki code and configuration."""
-    if 'SSH_AUTH_SOCK' not in os.environ:
-        raise RuntimeError('SSH_AUTH_SOCK is unset. Is your agent running?')
-
-    start = time.time()
-    config = get_config()
-    env = {}
-    args = parse_args()
-    message = ' '.join(args.message) or '(no message)'
-    if args.active:
-        branches = get_branches('%(MW_COMMON)s/wikiversions.cdb' % config)
-        env['MW_VERSIONS_SYNC'] = ' '.join(branches)
-
-    with lock('/var/lock/scap'):
-        # Perform syntax check
-        log.debug('Checking syntax of wmf-config and multiversion')
-        check_syntax('%(MW_COMMON_SOURCE)s/wmf-config' % config)
-        check_syntax('%(MW_COMMON_SOURCE)s/multiversion' % config)
-
-        # Update the current machine so that serialization works.
-        # Push wikiversions.dat changes so mwversionsinuse, set-group-write,
-        # and mwscript work with the right version of the files.
-        subprocess.check_call('/usr/local/bin/sync-common')
-
-        # Update list of extension message files and regenerate
-        # the localisation cache
-        subprocess.check_call('/usr/local/bin/mw-update-l10n')
-
-        # Notify
-        log.info('started scap: %s', message)
-
-        log.debug('updating rsync proxies')
-        dsh('/usr/local/bin/scap-1', 'scap-proxies', env)
-
-        with open('/etc/dsh/group/scap-proxies') as f:
-            rsync_servers = ' '.join(
-                ln.strip() for ln in f if not ln.startswith('#'))
-
-        with open('/etc/dsh/group/mediawiki-installation', 'rt') as f:
-            # Randomize the order of target machines
-            hosts = [ln for ln in f if not ln.startswith('#')]
-            random.shuffle(hosts)
-            with tempfile.NamedTemporaryFile(delete=False) as tmp:
-                try:
-                    tmp.write(''.join(hosts))
-                    log.debug('copying code to apaches')
-                    dsh('/usr/local/bin/scap-1 "%s"' % rsync_servers,
-                        tmp.name, env)
-                    log.debug('rebuilding CDB files from /upstream')
-                    dsh('/usr/local/bin/scap-rebuild-cdbs', tmp.name, env)
-                finally:
-                    os.remove(tmp.name)
-
-        # Builds wikiversions.cdb and syncs it to the apaches with the dat
-        # file. This is done after all else so that deploying new MW versions
-        # is easier.
-        subprocess.check_call('sync-wikiversions')
-
-    stop = time.time()
-    duration = '%02dm %02ds' % divmod(stop - start, 60)
-    log.info('finished scap: %s (duration: %s)', message, duration)
-    # TODO: record scap in graphite
-
-
-if __name__ == '__main__':
-    scap()
diff --git a/files/scap/sync-common-all b/files/scap/sync-common-all
deleted file mode 100755
index c860b3f..0000000
--- a/files/scap/sync-common-all
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-/usr/local/bin/scap
diff --git a/files/scap/sync-common-file b/files/scap/sync-common-file
deleted file mode 100755
index cd95b16..0000000
--- a/files/scap/sync-common-file
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-## synchronizes a single file from common on all apaches
-
-. /usr/local/lib/mw-deployment-vars.sh
-BINDIR=/usr/local/bin
-
-[ $# -lt 1 ] && {
-       echo >&2 "usage: sync-common-file file [message]"
-       exit 1
-}
-
-if [ ! -S "$SSH_AUTH_SOCK" ]; then
-       echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket."
-       echo >&2 "Did you start your ssh-agent?"
-       exit 1
-fi
-
-DIR=$1
-shift
-if [ -n "$1" ]; then
-       MESSAGE=" '"$@"'"
-else
-       MESSAGE=
-fi
-
-[ -e "$MW_COMMON_SOURCE/$DIR" ] || {
-       echo >&2 "$MW_COMMON_SOURCE/$DIR does not exist!"
-       exit 1
-}
-
-# No use going any further if we can't complete the sync
-[ $(which dsh 2>/dev/null) ] || {
-       echo >&2 "no dsh on this host, aborting"
-       exit 1
-}
-
-# copy file to all apaches in node mediawiki-installation
-echo >&2 "copying to apaches"
-
-if [ -d "$MW_COMMON_SOURCE/$DIR" ]; then
-       DESTDIR=$MW_COMMON/$DIR
-       dsh "${MW_DSH_ARGS[@]}" -- "
-               sudo -u mwdeploy rsync ${MW_RSYNC_ARGS[*]} --exclude=cache/l10n 
$MW_RSYNC_HOST::common/$DIR/ $DESTDIR
-       "
-else
-       DESTDIR=$(dirname $MW_COMMON/$DIR)
-       dsh "${MW_DSH_ARGS[@]}" -- "
-               sudo -u mwdeploy rsync -l $MW_RSYNC_HOST::common/$DIR $DESTDIR
-       "
-fi
-
-# Notify (one line only)
-$BINDIR/dologmsg "!log $USER synchronized $DIR $MESSAGE"
-$BINDIR/deploy2graphite sync-common-file
-exit 0
diff --git a/files/scap/sync-dblist b/files/scap/sync-dblist
deleted file mode 100755
index a9e847f..0000000
--- a/files/scap/sync-dblist
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-. /usr/local/lib/mw-deployment-vars.sh
-BINDIR=/usr/local/bin
-echo "Synchronizing $MW_COMMON_SOURCE/*.dblist to $MW_COMMON/*.dblist..."
-echo "mediawiki-installation:"
-
-dsh "${MW_DSH_ARGS[@]}" -- "
-  sudo -u mwdeploy rsync -a $MW_RSYNC_HOST::common/*.dblist $MW_COMMON
-"
-
-$BINDIR/dologmsg "!log $USER synchronized database lists files: $*"
diff --git a/files/scap/sync-dir b/files/scap/sync-dir
deleted file mode 100755
index a9413e1..0000000
--- a/files/scap/sync-dir
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-## synchronizes a directory from common/ on all apaches
-
-. /usr/local/lib/mw-deployment-vars.sh
-BINDIR=/usr/local/bin
-
-[ $# -lt 1 ] && {
-       echo >&2 "Usage: sync-dir directory [message]"
-       exit 1
-}
-
-FILE=$1
-shift
-
-# Sanity check
-if [ ! -d "$MW_COMMON_SOURCE/$FILE" ]; then
-       echo >&2 "Target file is not a directory"
-       exit 1
-fi
-
-# Perform syntax check
-$BINDIR/lint $MW_COMMON_SOURCE/$FILE || {
-       echo >&2 "Aborted due to syntax errors"
-       exit 1
-}
-
-# Actually sync the dir...
-$BINDIR/sync-common-file $FILE "$@"
diff --git a/files/scap/sync-docroot b/files/scap/sync-docroot
deleted file mode 100755
index 2c86916..0000000
--- a/files/scap/sync-docroot
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-. /usr/local/lib/mw-deployment-vars.sh
-echo "Synchronizing $MW_COMMON_SOURCE/docroot to $MW_COMMON/docroot..."
-dsh "${MW_DSH_ARGS[@]}" -- "sudo -u mwdeploy rsync -a --no-perms 
$MW_RSYNC_HOST::common/docroot $MW_RSYNC_HOST::common/w $MW_COMMON"
-echo "done!"
-
-BINDIR=/usr/local/bin
-$BINDIR/dologmsg "!log $USER synchronized docroot and w"
-$BINDIR/deploy2graphite sync-docroot
-exit 0
diff --git a/files/scap/sync-file b/files/scap/sync-file
deleted file mode 100755
index eefabf2..0000000
--- a/files/scap/sync-file
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-## synchronizes a single file from common/ on all apaches
-
-. /usr/local/lib/mw-deployment-vars.sh
-
-BINDIR=/usr/local/bin
-
-[ $# -lt 1 ] && {
-       echo >&2 "Usage: sync-file file [message]"
-       exit 1
-}
-
-FILE=$1
-shift
-
-# Sanity check
-if [ -d "$MW_COMMON_SOURCE/$FILE" ]; then
-       echo >&2 "Target file is a directory, not a single file"
-       exit 1
-fi
-
-# Perform syntax check
-php -l $MW_COMMON_SOURCE/$FILE || {
-       echo >&2 "Aborted due to syntax errors"
-       exit 1
-}
-
-$BINDIR/sync-common-file $FILE "$@"
diff --git a/files/scap/sync-wikiversions b/files/scap/sync-wikiversions
deleted file mode 100755
index a7b9102..0000000
--- a/files/scap/sync-wikiversions
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-. /usr/local/lib/mw-deployment-vars.sh
-BINDIR="/usr/local/bin"
-
-if [ ! -S "$SSH_AUTH_SOCK" ]; then
-       echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket."
-       echo >&2 "Did you start your ssh-agent?"
-       exit 1
-fi
-
-if ! $MW_COMMON_SOURCE/multiversion/refreshWikiversionsCDB; then
-       echo 'Error: could not rebuild the wikiversions.cdb file'
-fi
-
-# No use going any further if we can't complete the sync
-[ $(which dsh 2>/dev/null) ] || {
-       echo >&2 "Error: no dsh on this host, aborting"
-       exit 1
-}
-
-# Copy files to apaches
-echo -n 'Copying wikiversions dat and cdb files to apaches...'
-dsh -cM -g mediawiki-installation -o -oSetupTimeout=10 -- "sudo -u mwdeploy 
rsync -l $MW_RSYNC_HOST::common/wikiversions.{dat,cdb} $MW_COMMON"
-
-echo 'Finished'
-
-# Notify
-$BINDIR/dologmsg "!log $USER rebuilt wikiversions.cdb and synchronized 
wikiversions files: $*"
-$BINDIR/deploy2graphite sync-wikiversions
-exit 0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2c8e6f43dbce142cd81971c155f5959ff03701e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to