]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
packaging: correctly select flavor when initializing with a remote 621/head
authorAndrew Schoen <aschoen@redhat.com>
Thu, 10 Sep 2015 20:39:48 +0000 (15:39 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 10 Sep 2015 20:56:32 +0000 (15:56 -0500)
See: http://tracker.ceph.com/issues/13030

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/packaging.py

index f8ef92c7b5a1f14703b40e9329a55bb0f5f37c71..007de06334213815d95e9c6ff6895a687379a5e0 100644 (file)
@@ -434,9 +434,6 @@ class GitbuilderProject(object):
         # of roles instead, ctx is only used in _get_config_value_for_remote.
         self.ctx = ctx
         self.remote = remote
-        # avoiding circular imports
-        from teuthology.suite import get_install_task_flavor
-        self.flavor = get_install_task_flavor(self.job_config)
 
         if remote and ctx:
             self._init_from_remote()
@@ -458,6 +455,9 @@ class GitbuilderProject(object):
             version=self.remote.os.version,
             codename=self.remote.os.codename,
         )
+        # when we're initializing with a remote we most likely have
+        # a task config, not the entire teuthology job config
+        self.flavor = self.job_config.get("flavor", "basic")
 
     def _init_from_config(self):
         """
@@ -475,6 +475,12 @@ class GitbuilderProject(object):
             "ubuntu",
             "debian",
         ) else "rpm"
+        # avoiding circular imports
+        from teuthology.suite import get_install_task_flavor
+        # when we're initializing from a full teuthology config, not just a
+        # task config we need to make sure we're looking at the flavor for
+        # the install task
+        self.flavor = get_install_task_flavor(self.job_config)
 
     @property
     def sha1(self):