Bug 693903 - Update slaves for staging and preproduction configs. r=bear,nthomas
authorRail Aliev <rail@mozilla.com>
Wed, 12 Oct 2011 06:40:21 -0400
changeset 4888 8a07ebc7b1d8566af9c3d2fbb72f1a909c4342f5
parent 4887 c6545d557af86c59c8c38542179eb9bbedd370ee
child 4889 e0769b0a3dad2cf0e8405dbda6d2af7f0d80d2fa
push id1
push userroot
push dateWed, 17 Dec 2014 00:18:48 +0000
reviewersbear, nthomas
bugs693903
Bug 693903 - Update slaves for staging and preproduction configs. r=bear,nthomas
mozilla-tests/preproduction_config.py
mozilla-tests/staging_config.py
mozilla-tests/test
mozilla/preproduction_config.py
mozilla/test/test_slave_allocation.py
--- a/mozilla-tests/preproduction_config.py
+++ b/mozilla-tests/preproduction_config.py
@@ -1,23 +1,25 @@
+TEGRAS     = dict([('tegra-%03i' % x, {'http_port': '30%03i' % x, 'ssl_port': '31%03i' % x}) for x in range(1,65) + range(105,124)])
+TRY_TEGRAS = dict([('tegra-%03i' % x, {'http_port': '30%03i' % x, 'ssl_port': '31%03i' % x}) for x in range(65,105)])
 SLAVES = {
-    'fedora': dict([("talos-r3-fed-%03i" % x, {}) for x in range(1,11)]),
-    'fedora64' : dict([("talos-r3-fed64-%03i" % x, {}) for x in range (1,11)]),
-    'xp': dict([("talos-r3-xp-%03i" % x, {}) for x in range(1,4)]),
-    'win7': dict([("talos-r3-w7-%03i" % x, {}) for x in range(1,4)]),
-    'w764': dict([("t-r3-w764-%03i" % x, {}) for x in range(1,4)]),
-    'leopard': dict([("talos-r3-leopard-%03i" % x, {}) for x in range(1,4)]),
-    'snowleopard': dict([("talos-r3-snow-%03i" % x, {}) for x in range(1,4)]),
+    'fedora': dict([("talos-r3-fed-%03i" % x, {}) for x in range(1,64)]),
+    'fedora64' : dict([("talos-r3-fed64-%03i" % x, {}) for x in range (1,64)]),
+    'xp': dict([("talos-r3-xp-%03i" % x, {}) for x in range(1,63)]),
+    'win7': dict([("talos-r3-w7-%03i" % x, {}) for x in range(1,65)]),
+    'w764': dict([("t-r3-w764-%03i" % x, {}) for x in range(1,6)]),
+    'leopard': dict([("talos-r3-leopard-%03i" % x, {}) for x in range(1,60)]),
+    'snowleopard': dict([("talos-r3-snow-%03i" % x, {}) for x in range(1,60)]),
     'snowleopard-r4': dict([("talos-r4-snow-%03i" % x, {}) for x in range(1,160)]),
-    'tegra_android': dict([('tegra-%03i' % x, {'http_port': '30%03i' % x, 'ssl_port': '31%03i' % x}) for x in range(1,4)]),
+    'tegra_android': TEGRAS,
 }
 
 SLAVES['leopard-o'] = SLAVES['leopard']
 
-TRY_SLAVES = {}
+TRY_SLAVES = {'tegra_android': TRY_TEGRAS}
 
 GRAPH_CONFIG = ['--resultsServer', 'graphs-stage.mozilla.org',
     '--resultsLink', '/server/collect.cgi']
 
 GLOBAL_VARS = {
     'disable_tinderbox_mail': True,
     'tinderbox_tree': 'MozillaTest',
     'mobile_tinderbox_tree': 'MobileTest',
--- a/mozilla-tests/staging_config.py
+++ b/mozilla-tests/staging_config.py
@@ -1,23 +1,25 @@
+TEGRAS     = dict([('tegra-%03i' % x, {'http_port': '30%03i' % x, 'ssl_port': '31%03i' % x}) for x in range(1,65) + range(105,124)])
+TRY_TEGRAS = dict([('tegra-%03i' % x, {'http_port': '30%03i' % x, 'ssl_port': '31%03i' % x}) for x in range(65,105)])
 SLAVES = {
-    'fedora': dict([("talos-r3-fed-%03i" % x, {}) for x in range(1,11)]),
-    'fedora64' : dict([("talos-r3-fed64-%03i" % x, {}) for x in range (1,11)]),
-    'xp': dict([("talos-r3-xp-%03i" % x, {}) for x in range(1,4)]),
-    'win7': dict([("talos-r3-w7-%03i" % x, {}) for x in range(1,4)]),
-    'w764': dict([("t-r3-w764-%03i" % x, {}) for x in range(1,4)]),
-    'leopard': dict([("talos-r3-leopard-%03i" % x, {}) for x in range(1,4)]),
-    'snowleopard': dict([("talos-r3-snow-%03i" % x, {}) for x in range(1,4)]),
+    'fedora': dict([("talos-r3-fed-%03i" % x, {}) for x in range(1,64)]),
+    'fedora64' : dict([("talos-r3-fed64-%03i" % x, {}) for x in range (1,64)]),
+    'xp': dict([("talos-r3-xp-%03i" % x, {}) for x in range(1,63)]),
+    'win7': dict([("talos-r3-w7-%03i" % x, {}) for x in range(1,65)]),
+    'w764': dict([("t-r3-w764-%03i" % x, {}) for x in range(1,6)]),
+    'leopard': dict([("talos-r3-leopard-%03i" % x, {}) for x in range(1,60)]),
+    'snowleopard': dict([("talos-r3-snow-%03i" % x, {}) for x in range(1,60)]),
     'snowleopard-r4': dict([("talos-r4-snow-%03i" % x, {}) for x in range(1,160)]),
-    'tegra_android': dict([('tegra-%03i' % x, {'http_port': '30%03i' % x, 'ssl_port': '31%03i' % x}) for x in range(1,4)]),
+    'tegra_android': TEGRAS,
 }
 
 SLAVES['leopard-o'] = SLAVES['leopard']
 
-TRY_SLAVES = {}
+TRY_SLAVES = {'tegra_android': TRY_TEGRAS}
 
 GRAPH_CONFIG = ['--resultsServer', 'graphs-stage.mozilla.org',
     '--resultsLink', '/server/collect.cgi']
 
 GLOBAL_VARS = {
     'disable_tinderbox_mail': True,
     'tinderbox_tree': 'MozillaTest',
     'mobile_tinderbox_tree': 'MobileTest',
new file mode 120000
--- /dev/null
+++ b/mozilla-tests/test
@@ -0,0 +1,1 @@
+../mozilla/test
\ No newline at end of file
--- a/mozilla/preproduction_config.py
+++ b/mozilla/preproduction_config.py
@@ -1,32 +1,32 @@
 MAC_SNOW_MINIS = ['moz2-darwin10-slave%02i' % x for x in range(1,30) + range(40,57)]
-MAC_MINIS      = ['moz2-darwin9-slave%02i' % x for x in range(1,4) + range(5,73)]
-XSERVES        = ['bm-xserve%02i' % x for x in [6,7,9,11,12,15,16,17,18,19,21,22]]
+MAC_MINIS      = ['moz2-darwin9-slave%02i' % x for x in range(1,73) if x not in (4,5,20,40,59)]
+XSERVES        = ['bm-xserve%02i' % x for x in range(6,13) + range(15,25)]
 WIN32_IXS      = ['mw32-ix-slave%02i' % x for x in range(1,26)] + ['w32-ix-slave%02i' % x for x in range(1,43)]
 WIN64_IXS      = ['mw64-ix-slave01'] + ['w64-ix-slave%02i' % x for x in range(1,43)]
 LINUX_VMS      = ['moz2-linux-slave%02i' % x for x in range(1,61)]
 LINUX_IXS      = ['mv-moz2-linux-ix-slave%02i' % x for x in range(1,24)] + ['linux-ix-slave%02i' % x for x in range(1,43)]
 LINUX64_VMS    = ['moz2-linux64-slave%02i' % x for x in range(1,13)]
-LINUX64_IXS    = ['linux64-ix-slave%02i' % x for x in range(1,22)]
+LINUX64_IXS    = ['linux64-ix-slave%02i' % x for x in range(1,42)]
 SLAVES = {
     'linux':            LINUX_VMS + LINUX_IXS,
     'linux64':          LINUX64_VMS + LINUX64_IXS,
     'win32':            WIN32_IXS,
     'win64':            WIN64_IXS,
     'macosx':           MAC_MINIS + XSERVES,
     'macosx64':         MAC_SNOW_MINIS,
     'linux-android':    LINUX_VMS + LINUX_IXS,
     'linux-maemo5-gtk': LINUX_VMS + LINUX_IXS,
     'linux-mobile':     LINUX_VMS + LINUX_IXS,
     'macosx-mobile':    MAC_MINIS + XSERVES,
     'win32-mobile':     WIN32_IXS,
 }
 
-TRY_LINUX      = ['try-linux-slave%02i' % x for x in range (1,26)]
+TRY_LINUX      = ['try-linux-slave%02i' % x for x in range (1,31)]
 TRY_LINUX_IXS  = []
 TRY_LINUX64    = ['try-linux64-slave%02i' % x for x in range (1,11)]
 TRY_LINUX64_IXS= ['linux64-ix-slave%02i' % x for x in range(22,41)]
 TRY_MAC        = ['try-mac-slave%02i' % x for x in range (1,48)]
 TRY_MAC64      = ['try-mac64-slave%02i' % x for x in range (1,32)]
 TRY_WIN32_IXS  = []
 
 TRY_SLAVES = SLAVES
--- a/mozilla/test/test_slave_allocation.py
+++ b/mozilla/test/test_slave_allocation.py
@@ -1,18 +1,46 @@
 from twisted.trial import unittest
 
 import production_config as prod
 import staging_config as stag
+import preproduction_config as preprod
 
 class SlaveCheck(unittest.TestCase):
 
     def test_all_prod_vs_try(self):
         prod_slaves = [x for k, s in prod.SLAVES.iteritems() for x in s]
         try_slaves = [x for k, s in prod.TRY_SLAVES.iteritems() for x in s]
-        self.assertEqual(set(prod_slaves) & set(try_slaves), set([]))
+        common_slaves = set(prod_slaves) & set(try_slaves)
+        self.assertEqual(
+            common_slaves, set([]),
+            'Try slaves must not be used in production, however the ' + \
+            'following slaves used for both:\n%s' % \
+            '\n'.join(common_slaves)
+        )
 
     def test_prod_is_subset_of_stag(self):
         prod_slaves = [x for k, s in prod.SLAVES.iteritems() for x in s] + \
             [x for k, s in prod.TRY_SLAVES.iteritems() for x in s]
         stag_slaves = [x for k, s in stag.SLAVES.iteritems() for x in s] + \
             [x for k, s in stag.TRY_SLAVES.iteritems() for x in s]
-        self.assertTrue(set(prod_slaves) <= set(stag_slaves))
+        in_prod_but_stag = []
+        for slave in prod_slaves:
+            if slave not in stag_slaves:
+                in_prod_but_stag.append(slave)
+
+        self.assertEqual(
+            in_prod_but_stag, [],
+            'Production slaves should be a subset of staging slaves, ' + \
+            'however the following production slaves are not listed in ' + \
+            'staging:\n%s' % '\n'.join(sorted(in_prod_but_stag))
+        )
+
+    def test_preprod_vs_stag(self):
+        stag_slaves = [x for k, s in stag.SLAVES.iteritems() for x in s] + \
+            [x for k, s in stag.TRY_SLAVES.iteritems() for x in s]
+        preprod_slaves = [x for k, s in preprod.SLAVES.iteritems() for x in s] + \
+            [x for k, s in preprod.TRY_SLAVES.iteritems() for x in s]
+        self.assertEqual(
+            stag_slaves, preprod_slaves,
+            'Staging and preproduction slaves should be the same'
+        )
+