r98364 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98363‎ | r98364 | r98365 >
Date:20:27, 28 September 2011
Author:laner
Status:deferred (Comments)
Tags:
Comment:
Follow up to r98360.
Modified paths:
  • /trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames (modified) (history)
  • /trunk/debs/wikimedia-task-dns-auth/gen-zones (modified) (history)

Diff [purge]

Index: trunk/debs/wikimedia-task-dns-auth/gen-zones
@@ -29,15 +29,18 @@
3030 # <var>:<domainname>
3131 # For instance:
3232 # $langlist_wikimedia:wikimedia-lb.wikimedia.org.
 33+ domainlist = {}
3334 domainmap = open(domainmaplist)
34 - domainlist = {}
35 - for map in domainmap:
 35+ for map in domainmap.readlines():
 36+ if map[0] == "#":
 37+ continue
 38+ map = map.strip()
3639 var, value = map.split(':')
3740 domainlist[var] = value
3841
3942 # All substs[var] in this loop contain a list of CNAMES to the geodns record for
4043 # all language subdomains
41 - for var, value in domainlist.itervalues():
 44+ for var, value in domainlist.iteritems():
4245 list = open(langlist).read()
4346 list = list.replace('$cnamedomain', value)
4447 substs[var] = list
Index: trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames
@@ -8,6 +8,6 @@
99 LANGLIST=$POWERDNSDIR/langlist
1010 LANGLISTSOURCE=""
1111
12 -[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\t\$cnamedomain"; print"www."$1"\t\t\t1H\tIN CNAME\t\$cnamedomain"; print $1".m\t\t\t1H\tIN CNAME\tm.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames
 12+[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\t$cnamedomain"; print"www."$1"\t\t\t1H\tIN CNAME\t$cnamedomain"; print $1".m\t\t\t1H\tIN CNAME\tm.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames
1313
1414 exit 0

Follow-up revisions

RevisionCommit summaryAuthorDate
r98380added some error handling around empty or malformed strings, allowed whitespa...ben22:48, 28 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98360Adding support for non-text.wm.o domainslaner19:54, 28 September 2011

Comments

#Comment by Mark Bergsma (talk | contribs)   11:28, 29 September 2011

shouldn't "m.wikimedia.org" also be $cnamedomain?

#Comment by Ryan lane (talk | contribs)   15:06, 29 September 2011

Nope. When everything is pointing at mobile-lb, then we can do it that way. We can't right now though.

Status & tagging log