r59104 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59103‎ | r59104 | r59105 >
Date:17:12, 15 November 2009
Author:root
Status:deferred
Tags:
Comment:
wikimedia-task-dns-auth (0.11) hardy; urgency=low

* Refactored authdns-update into separate scripts
* Removed directory scenarios/yaseo-down
* Renamed directory knams-down to esams-down
* Changed zwinger into fenari in /etc/default/wikimedia-task-dns-auth
* Depend on pnds > 2.9.22
* Add script authdns-local-update
Modified paths:
  • /trunk/debs/wikimedia-task-dns-auth/authdns-local-update (added) (history)
  • /trunk/debs/wikimedia-task-dns-auth/authdns-update (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/debian/changelog (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/debian/conffiles (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/debian/control (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/debian/rules (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/debian/wikimedia-task-dns-auth-default (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/gen-dblist-cnames (added) (history)
  • /trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames (added) (history)
  • /trunk/debs/wikimedia-task-dns-auth/scenarios/esams-down (added) (history)
  • /trunk/debs/wikimedia-task-dns-auth/scenarios/knams-down (deleted) (history)
  • /trunk/debs/wikimedia-task-dns-auth/scenarios/yaseo-down (deleted) (history)

Diff [purge]

Index: trunk/debs/wikimedia-task-dns-auth/debian/control
@@ -2,12 +2,12 @@
33 Section: unknown
44 Priority: optional
55 Maintainer: Mark Bergsma <mark@wikimedia.org>
6 -Build-Depends: debhelper (>= 4.0.0), pdns-server (>= 2.9.21)
 6+Build-Depends: debhelper (>= 4.0.0), pdns-server (>= 2.9.22)
77 Standards-Version: 3.6.2
88
99 Package: wikimedia-task-dns-auth
1010 Architecture: all
11 -Depends: pdns-server (>= 2.9.21), pdns-backend-geo (>= 2.9.21), pdns-backend-pipe (>= 2.9.21), python, rsync
 11+Depends: pdns-server (>= 2.9.22), pdns-backend-geo (>= 2.9.22), pdns-backend-pipe (>= 2.9.22), python, rsync
1212 Description: Provides a Wikimedia authoritative DNS server
1313 Package wikimedia-task-dns-auth depends on the appropriate packages
1414 that need to be installed on a Wikimedia authoritative DNS server,
Index: trunk/debs/wikimedia-task-dns-auth/debian/wikimedia-task-dns-auth-default
@@ -4,6 +4,6 @@
55 NAMESERVERS="ns0.wikimedia.org ns1.wikimedia.org ns2.wikimedia.org"
66
77 # Server to rsync "langlist" from:
8 -LANGLISTSOURCE=zwinger.wikimedia.org:/home/wikipedia/common/langlist
 8+LANGLISTSOURCE=fenari.wikimedia.org:/home/wikipedia/common/langlist
99
10 -DBLISTSOURCE=zwinger.wikimedia.org:/home/wikipedia/common/all.dblist
 10+DBLISTSOURCE=fenari.wikimedia.org:/home/wikipedia/common/all.dblist
Index: trunk/debs/wikimedia-task-dns-auth/debian/changelog
@@ -1,3 +1,14 @@
 2+wikimedia-task-dns-auth (0.11) hardy; urgency=low
 3+
 4+ * Refactored authdns-update into separate scripts
 5+ * Removed directory scenarios/yaseo-down
 6+ * Renamed directory knams-down to esams-down
 7+ * Changed zwinger into fenari in /etc/default/wikimedia-task-dns-auth
 8+ * Depend on pnds > 2.9.22
 9+ * Add script authdns-local-update
 10+
 11+ -- Mark Bergsma <mark@wikimedia.org> Sun, 15 Nov 2009 14:55:58 +0000
 12+
213 wikimedia-task-dns-auth (0.10) hardy; urgency=low
314
415 * Add <language>.m.wikipedia.org entries
Index: trunk/debs/wikimedia-task-dns-auth/debian/conffiles
@@ -2,7 +2,5 @@
33 /etc/default/wikimedia-task-dns-auth
44 /etc/powerdns/scenarios/normal/rr.wikimedia.org
55 /etc/powerdns/scenarios/normal/upload.wikimedia.org
6 -/etc/powerdns/scenarios/knams-down/rr.wikimedia.org
7 -/etc/powerdns/scenarios/knams-down/upload.wikimedia.org
8 -/etc/powerdns/scenarios/yaseo-down/rr.wikimedia.org
9 -/etc/powerdns/scenarios/yaseo-down/upload.wikimedia.org
 6+/etc/powerdns/scenarios/esams-down/rr.wikimedia.org
 7+/etc/powerdns/scenarios/esams-down/upload.wikimedia.org
Index: trunk/debs/wikimedia-task-dns-auth/debian/rules
@@ -67,15 +67,15 @@
6868 install -m 0644 debian/wikimedia-task-dns-auth-default $(DESTDIR)/etc/default/wikimedia-task-dns-auth
6969 install gen-zones $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/
7070 install gen-bind.conf $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/
71 - install authdns-update authdns-scenario $(DESTDIR)/usr/sbin/
 71+ install gen-langlist-cnames $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/
 72+ install gen-dblist-cnames $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/
 73+ install authdns-update authdns-local-update authdns-scenario $(DESTDIR)/usr/sbin/
7274 install -m 0644 -o pdns zz.countries.nerd.dk.rbldnsd $(DESTDIR)/etc/powerdns/ip-map/
7375 install -d $(DESTDIR)/etc/powerdns/scenarios/
7476 install -d $(DESTDIR)/etc/powerdns/scenarios/normal
75 - install -d $(DESTDIR)/etc/powerdns/scenarios/knams-down
76 - install -d $(DESTDIR)/etc/powerdns/scenarios/yaseo-down
 77+ install -d $(DESTDIR)/etc/powerdns/scenarios/esams-down
7778 install scenarios/normal/* $(DESTDIR)/etc/powerdns/scenarios/normal/
78 - install scenarios/knams-down/* $(DESTDIR)/etc/powerdns/scenarios/knams-down/
79 - install scenarios/yaseo-down/* $(DESTDIR)/etc/powerdns/scenarios/yaseo-down/
 79+ install scenarios/esams-down/* $(DESTDIR)/etc/powerdns/scenarios/esams-down/
8080
8181
8282 # Build architecture-independent files here.
Index: trunk/debs/wikimedia-task-dns-auth/authdns-update
@@ -53,24 +53,15 @@
5454 # Generate a new list of language CNAMEs
5555 echo "Syncing langlist"
5656 rsync -t $LANGLISTSOURCE $LANGLIST || true
57 -echo "Generating language subdomains CNAME file from $LANGLIST"
58 -[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print"www."$1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print $1".m\t\t\t1H\tIN CNAME\tmobile1.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames
5957
6058 echo "Syncing all.dblist"
6159 rsync -t $DBLISTSOURCE $DBLIST || true
 60+
 61+echo "Generating language subdomains CNAME file from $LANGLIST"
 62+$SCRIPTDIR/gen-langlist-cnames
 63+
6264 echo "Generating wiki toolserver CNAMEs from $DBLIST"
63 -(
64 -while read line; do
65 - line=`echo $line | tr _ -`
66 - if echo $line | egrep -q '^(bgwiki|bgwiktionary|commonswiki|cswiki|dewiki|enwikiquote|enwiktionary|eowiki|fiwiki|idwiki|itwiki|nlwiki|nowiki|plwiki|ptwiki|svwiki|thwiki|trwiki|zhwiki)$'; then
67 - echo "$line-p 1H IN CNAME sql-s2.toolserver.org."
68 - elif [ $line = enwiki ]; then
69 - echo "$line-p 1H IN CNAME sql-s1.toolserver.org."
70 - else
71 - echo "$line-p 1H IN CNAME sql-s3.toolserver.org."
72 - fi;
73 -done
74 -) < $DBLIST > $POWERDNSDIR/dblist-cnames
 65+$SCRIPTDIR/gen-dblist-cnames
7566
7667 # Generate the zonefiles from the templates
7768 echo "Generating zonefiles from zone templates"
Index: trunk/debs/wikimedia-task-dns-auth/scenarios/esams-down/rr.wikimedia.org
@@ -0,0 +1,31 @@
 2+$RECORD rr.wikimedia.org.
 3+$ORIGIN wikimedia.org.
 4+
 5+# Korea, Democratic People's Republic of
 6+408 rr.yaseo
 7+# Korea, Republic of
 8+410 rr.yaseo
 9+# Japan
 10+392 rr.yaseo
 11+# China
 12+156 rr.yaseo
 13+# Singapore
 14+702 rr.yaseo
 15+# Taiwan
 16+158 rr.yaseo
 17+# Thailand
 18+764 rr.yaseo
 19+# Vietnam
 20+704 rr.yaseo
 21+# Mongolia
 22+496 rr.yaseo
 23+# Cambodia
 24+116 rr.yaseo
 25+# Philippines
 26+608 rr.yaseo
 27+# Lao People's Democratic Republic
 28+418 rr.yaseo
 29+# Malaysia
 30+458 rr.yaseo
 31+# Default
 32+0 rr.pmtpa
Index: trunk/debs/wikimedia-task-dns-auth/scenarios/esams-down/upload.wikimedia.org
@@ -0,0 +1,31 @@
 2+$RECORD upload.wikimedia.org.
 3+$ORIGIN wikimedia.org.
 4+
 5+# Korea, Democratic People's Republic of
 6+408 upload.yaseo
 7+# Korea, Republic of
 8+410 upload.yaseo
 9+# Japan
 10+392 upload.yaseo
 11+# China
 12+156 upload.yaseo
 13+# Singapore
 14+702 upload.yaseo
 15+# Taiwan
 16+158 upload.yaseo
 17+# Thailand
 18+764 upload.yaseo
 19+# Vietnam
 20+704 upload.yaseo
 21+# Mongolia
 22+496 upload.yaseo
 23+# Cambodia
 24+116 upload.yaseo
 25+# Philippines
 26+608 upload.yaseo
 27+# Lao People's Democratic Republic
 28+418 upload.yaseo
 29+# Malaysia
 30+458 upload.yaseo
 31+# Default
 32+0 upload.pmtpa
Index: trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames
@@ -0,0 +1,12 @@
 2+#!/bin/bash
 3+
 4+set -e
 5+
 6+PATH=/bin:/usr/bin
 7+
 8+POWERDNSDIR=/etc/powerdns
 9+LANGLIST=$POWERDNSDIR/langlist
 10+LANGLISTSOURCE=""
 11+
 12+[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print"www."$1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print $1".m\t\t\t1H\tIN CNAME\tmobile1.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames
 13+
Property changes on: trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames
___________________________________________________________________
Name: svn:executable
114 + *
Index: trunk/debs/wikimedia-task-dns-auth/gen-dblist-cnames
@@ -0,0 +1,22 @@
 2+#!/bin/bash
 3+
 4+POWERDNSDIR=/etc/powerdns
 5+
 6+DBLIST=$POWERDNSDIR/all.dblist
 7+DBLISTSOURCE=""
 8+
 9+PATH=/bin:/usr/bin:/usr/local/bin
 10+
 11+(
 12+while read line; do
 13+ line=`echo $line | tr _ -`
 14+ if echo $line | egrep -q '^(bgwiki|bgwiktionary|commonswiki|cswiki|dewiki|enwikiquote|enwiktionary|eowiki|fiwiki|idwiki|itwiki|nlwiki|nowiki|plwiki|ptwiki|svwiki|thwiki|trwiki
 15+|zhwiki)$'; then
 16+ echo "$line-p 1H IN CNAME sql-s2.toolserver.org."
 17+ elif [ $line = enwiki ]; then
 18+ echo "$line-p 1H IN CNAME sql-s1.toolserver.org."
 19+ else
 20+ echo "$line-p 1H IN CNAME sql-s3.toolserver.org."
 21+ fi;
 22+done
 23+) < $DBLIST > $POWERDNSDIR/dblist-cnames
Index: trunk/debs/wikimedia-task-dns-auth/authdns-local-update
@@ -0,0 +1,40 @@
 2+#!/bin/bash
 3+#
 4+# Shell script that pulls zone templates from the "master" DNS server,
 5+# and regenerates them locally.
 6+#
 7+# Written on 2009/11/15 by Mark Bergsma <mark@wikimedia.org>
 8+
 9+set -e
 10+
 11+CONFFILE=/etc/default/wikimedia-task-dns-auth
 12+MASTER=""
 13+POWERDNSDIR=/etc/powerdns
 14+SCRIPTDIR=/usr/lib/wikimedia-task-dns-auth/bin
 15+
 16+export RSYNC_RSH="ssh -i /root/.ssh/wikimedia-task-dns-auth"
 17+
 18+PATH=/bin:/usr/bin
 19+
 20+# Source the configuration file
 21+[ -f $CONFFILE ] && source $CONFFILE
 22+
 23+# If no master is given on the command line, use the first one in /etc/default/wikimedia-task-dns-auth
 24+if [ -z "$1" ]; then
 25+ MASTER=$(echo $NAMESERVERS | cut -d' ' -f1 )
 26+else
 27+ MASTER=$1
 28+fi
 29+
 30+rsync --delete -av $MASTER:$POWERDNSDIR/dblist-cnames $POWERDNSDIR/
 31+rsync --delete -av $MASTER:$POWERDNSDIR/langlist-cnames $POWERDNSDIR/
 32+rsync --delete -av $MASTER:$POWERDNSDIR/participants $POWERDNSDIR/
 33+rsync --delete -av $MASTER:$POWERDNSDIR/templates $POWERDNSDIR/
 34+rsync --delete -av $MASTER:$POWERDNSDIR/scenarios $POWERDNSDIR/
 35+rsync --delete -av $MASTER:$POWERDNSDIR/geomaps $POWERDNSDIR/
 36+
 37+$SCRIPTDIR/gen-zones
 38+$SCRIPTDIR/gen-bind.conf
 39+
 40+pdns_control reload
 41+pdns_control rediscover
Property changes on: trunk/debs/wikimedia-task-dns-auth/authdns-local-update
___________________________________________________________________
Name: svn:executable
142 + *

Status & tagging log