]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: make gitbuilder host configurable
authorSage Weil <sage@inktank.com>
Mon, 18 Feb 2013 19:59:26 +0000 (11:59 -0800)
committerSage Weil <sage@inktank.com>
Mon, 18 Feb 2013 21:39:06 +0000 (13:39 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/task/ceph.py

index 133b9e2a2cb46a413ebe8554c104c3fbb62e36c7..8198f7b34015416bf20f6d38c863fcef1e7fac74 100644 (file)
@@ -145,7 +145,7 @@ def ship_utilities(ctx, config):
                 ),
             )
 
-def _update_deb_package_list_and_install(remote, debs, branch):
+def _update_deb_package_list_and_install(ctx, remote, debs, branch):
     """
     updates the package list so that apt-get can
     download the appropriate packages
@@ -179,11 +179,13 @@ def _update_deb_package_list_and_install(remote, debs, branch):
     out = r.stdout.getvalue().strip()
     log.info("release type:" + out)
 
+    gitbuilder_host = ctx.teuthology_config.get('gitbuilder_host', 'gitbuilder.ceph.com')
+
     # get package version string
     r = remote.run(
         args=[
             'wget', '-q', '-O-',
-            'http://gitbuilder.ceph.com/ceph-deb-' + out + '-x86_64-basic/ref/' + branch + '/version',
+            'http://{host}/ceph-deb-'.format(host=gitbuilder_host) + out + '-x86_64-basic/ref/' + branch + '/version',
             ],
         stdout=StringIO(),
         )
@@ -193,7 +195,7 @@ def _update_deb_package_list_and_install(remote, debs, branch):
     remote.run(
         args=[
             'echo', 'deb',
-            'http://gitbuilder.ceph.com/ceph-deb-' + out + '-x86_64-basic/ref/' + branch,
+            'http://{host}/ceph-deb-'.format(host=gitbuilder_host) + out + '-x86_64-basic/ref/' + branch,
             out, 'main', run.Raw('|'),
             'sudo', 'tee', '/etc/apt/sources.list.d/ceph.list'
             ],
@@ -215,7 +217,7 @@ def install_debs(ctx, debs, branch):
     log.info("Installing ceph debian packages: {debs}".format(debs=', '.join(debs)))
     with parallel() as p:
         for remote in ctx.cluster.remotes.iterkeys():
-            p.spawn(_update_deb_package_list_and_install, remote, debs, branch)
+            p.spawn(_update_deb_package_list_and_install, ctx, remote, debs, branch)
 
 def _remove_deb(remote, debs):
     args=[