From: Andrew Schoen Date: Thu, 10 Sep 2015 20:39:48 +0000 (-0500) Subject: packaging: correctly select flavor when initializing with a remote X-Git-Tag: 1.1.0~823^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f345a3da79a5fb50c5f004f712e75c076ef37b60;p=teuthology.git packaging: correctly select flavor when initializing with a remote See: http://tracker.ceph.com/issues/13030 Signed-off-by: Andrew Schoen --- diff --git a/teuthology/packaging.py b/teuthology/packaging.py index f8ef92c7b..007de0633 100644 --- a/teuthology/packaging.py +++ b/teuthology/packaging.py @@ -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):