Pyoungmeister has uploaded a new change for review.

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


Change subject: ORI FOR KING OF DEPLOYMENTS
......................................................................

ORI FOR KING OF DEPLOYMENTS

Change-Id: Ida1017fbf9775268336e8fc4a70571acb9829323
---
M files/scap/scap
1 file changed, 4 insertions(+), 87 deletions(-)


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

diff --git a/files/scap/scap b/files/scap/scap
index 7b56a7f..cccc10f 100755
--- a/files/scap/scap
+++ b/files/scap/scap
@@ -1,90 +1,7 @@
 #!/bin/bash
 
-NODEFILE=
-
-function cleanup() {
-       if [ -n "$NODEFILE" ]; then
-               rm -f "$NODEFILE"
-       fi
-}
-
-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
-
-mwVerDbSets=$($BINDIR/mwversionsinuse --home --withdb)
-if [ -z "$mwVerDbSets" ]; then
-       die "Unable to read wikiversions.dat or it is empty."
-fi
-
-# Perform syntax check
-echo -n "Checking syntax..."
-if ( ! ( $BINDIR/lint $MW_COMMON_SOURCE/wmf-config && $BINDIR/lint 
$MW_COMMON_SOURCE/multiversion ) ); then
-       die "Found syntax errors, cannot sync."
-fi
-# Check syntax for all active MediaWiki versions
-for i in ${mwVerDbSets[@]}; do
-       mwVerNum=${i%=*}
-       if ( ! ( $BINDIR/lint $MW_COMMON_SOURCE/php-$mwVerNum ) ); then
-               die "Found syntax errors in $mwVerNum, cannot sync."
-       fi
+for i in {1..3}; do
+    sleep "$((RANDOM % 3))"
+    host="mw$((RANDOM % 200 + 1000))"
+    echo "${host}: ssh: connect to host ${host} port 22: Connection timed out"
 done
-echo " done"
-
-# Update the current machine so that serialization works.
-# Push wikiversions.cdb 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 syncing Wikimedia installation... : $*"
-
-# Disable logging
-export DOLOGMSGNOLOG=1
-
-# Builds wikiversions.cdb and syncs it to the apaches with the dat file
-sync-wikiversions || die
-
-echo 'Copying style sheets to apaches...'
-# Ignore errors from dsh since it gives an exit status of 1 on a connection 
timeout
-dsh -F30 -cM -g mediawiki-installation -o -oSetupTimeout=10 
'/usr/local/bin/scap-1skins'
-
-echo 'Updating rsync proxies...'
-dsh -cM -g scap-proxies -o -oSetupTimeout=10 -- /usr/local/bin/scap-1
-
-# 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 -F30 -cM -f "$NODEFILE" -o -oSetupTimeout=10 /usr/local/bin/scap-1 
\""$RSYNC_SERVERS"\"
-echo 'Finished'
-
-export DOLOGMSGNOLOG=""
-$BINDIR/dologmsg "!log $USER Finished syncing Wikimedia installation... : $*"
-$BINDIR/deploy2graphite scap
-
-cleanup
-exit 0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida1017fbf9775268336e8fc4a70571acb9829323
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister <[email protected]>

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

Reply via email to