r24050 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24049‎ | r24050 | r24051 >
Date:23:09, 12 July 2007
Author:river
Status:old
Tags:
Comment:
wikimedia-task-dns-auth (0.06) feisty; urgency=low

* Add $toolserverdbs subst, for toolserver database CNAMEs.

-- River Tarnell <river@wikimedia.org> Fri, 13 Jul 2007 00:06:56 +0100
Modified paths:
  • /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/wikimedia-task-dns-auth-default (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/gen-zones (modified) (history)

Diff [purge]

Index: trunk/debs/wikimedia-task-dns-auth/debian/wikimedia-task-dns-auth-default
@@ -5,3 +5,5 @@
66
77 # Server to rsync "langlist" from:
88 LANGLISTSOURCE=zwinger.wikimedia.org:/home/wikipedia/common/langlist
 9+
 10+DBLISTSOURCE=zwinger.wikimedia.org:/home/wikipedia/common/all.dblist
Index: trunk/debs/wikimedia-task-dns-auth/debian/changelog
@@ -1,3 +1,9 @@
 2+wikimedia-task-dns-auth (0.06) feisty; urgency=low
 3+
 4+ * Add $toolserverdbs subst, for toolserver database CNAMEs.
 5+
 6+ -- River Tarnell <river@wikimedia.org> Fri, 13 Jul 2007 00:06:56 +0100
 7+
28 wikimedia-task-dns-auth (0.05) feisty; urgency=medium
39
410 * Depend on pdns >= 2.9.21
Index: trunk/debs/wikimedia-task-dns-auth/gen-zones
@@ -8,6 +8,7 @@
99 templatedir = '/etc/powerdns/templates'
1010 zonedir = '/etc/powerdns/zones'
1111 langlist = '/etc/powerdns/langlist-cnames'
 12+dblist = '/etc/powerdns/dblist-cnames'
1213
1314 header = '''; WARNING!
1415 ; Do NOT edit this file directly! It's generated by genzones
@@ -27,6 +28,8 @@
2829 # all language subdomains
2930 substs['$langlist'] = open(langlist).read()
3031
 32+ substs['$toolserverdbs'] = open(dblist).read()
 33+
3134 # $serial contains a SOA serial nr in the form YYYYMMDDHH
3235 # This means that two zonechanges within the same hour could
3336 # have the same SOA serial, but it doesn't matter because
Index: trunk/debs/wikimedia-task-dns-auth/authdns-update
@@ -15,6 +15,8 @@
1616 SCRIPTDIR=/usr/lib/wikimedia-task-dns-auth/bin
1717 LANGLIST=$POWERDNSDIR/langlist
1818 LANGLISTSOURCE=""
 19+DBLIST=$POWERDNSDIR/all.dblist
 20+DBLISTSOURCE=""
1921
2022 PATH=/bin:/usr/bin:/usr/local/bin
2123
@@ -54,6 +56,22 @@
5557 echo "Generating language subdomains CNAME file from $LANGLIST"
5658 [ $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." }' > $POWERDNSDIR/langlist-cnames
5759
 60+echo "Syncing all.dblist"
 61+rsync -t $DBLISTSOURCE $DBLIST || true
 62+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.ts.wikimedia.org."
 68+ elif [ $line = enwiki ]; then
 69+ echo "$line-p 1H IN CNAME sql-s1.ts.wikimedia.org."
 70+ else
 71+ echo "$line-p 1H IN CNAME sql-s3.ts.wikimedia.org."
 72+ fi;
 73+done
 74+) < $DBLIST > $POWERDNSDIR/dblist-cnames
 75+
5876 # Generate the zonefiles from the templates
5977 echo "Generating zonefiles from zone templates"
6078 $SCRIPTDIR/gen-zones
@@ -81,7 +99,7 @@
82100 done
83101
84102 echo "Updating $slave..."
85 - rsync -e ssh --delete -av $POWERDNSDIR/langlist-cnames $POWERDNSDIR/templates $POWERDNSDIR/scenarios $POWERDNSDIR/geomaps $slave:$POWERDNSDIR/
 103+ rsync -e ssh --delete -av $POWERDNSDIR/dblist-cnames $POWERDNSDIR/langlist-cnames $POWERDNSDIR/templates $POWERDNSDIR/scenarios $POWERDNSDIR/geomaps $slave:$POWERDNSDIR/
86104 ssh $slave "$SCRIPTDIR/gen-zones && $SCRIPTDIR/gen-bind.conf && pdns_control reload && pdns_control rediscover"
87105 done
88106

Status & tagging log