From: Deepika Upadhyay Date: Fri, 23 Jul 2021 14:21:49 +0000 (+0000) Subject: suite: kernel_flavor >> flavor X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=381955c015dbb43ba8f37a14d1841a893cdf4c12;p=teuthology.git suite: kernel_flavor >> flavor since addressing comment: FIXME: ceph flavor and kernel flavor are separate things remove basic -> default(flavor) mapping & update s/basic/default in docs Signed-off-by: Deepika Upadhyay --- diff --git a/docs/README.rst b/docs/README.rst index 33e64d5adf..1b8239db66 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -102,10 +102,10 @@ where: For example, consider:: - teuthology-suite -s rbd -c wip-fix -k distro -e bob.smith@foo.com -f basic -t jewel -m mira + teuthology-suite -s rbd -c wip-fix -k distro -e bob.smith@foo.com -f default -t jewel -m mira The above command runs the rbd suite using the wip-fix branch of ceph, the -jewel kernel, with a 'basic' kernel flavor, and the teuthology jewel branch +jewel kernel, with a 'default' ceph shaman build packages flavor, and the teuthology jewel branch will be used. It will run on mira machines and send an email to bob.smith@foo.com when it's completed. For more details on ``teuthology-suite``, please consult the output of ``teuthology-suite --help``. diff --git a/teuthology/packaging.py b/teuthology/packaging.py index 37b1147159..7700b6e335 100644 --- a/teuthology/packaging.py +++ b/teuthology/packaging.py @@ -879,8 +879,6 @@ class ShamanProject(GitbuilderProject): @property def _search_uri(self): flavor = self.flavor - if flavor == 'basic': - flavor = 'default' req_obj = OrderedDict() req_obj['status'] = 'ready' req_obj['project'] = self.project diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index a4850b8c99..39dcbc181c 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -43,8 +43,6 @@ def process_args(args): 'ceph': 'ceph_branch', 'sha1': 'ceph_sha1', 'kernel': 'kernel_branch', - # FIXME: ceph flavor and kernel flavor are separate things - 'flavor': 'kernel_flavor', '': 'base_yaml_paths', 'filter': 'filter_in', } diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index 6f51b98d74..e87ab31809 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -74,7 +74,7 @@ class Run(object): self.args.suite, self.args.ceph_branch, self.args.kernel_branch or '-', - self.args.kernel_flavor, worker + self.args.flavor, worker ] ).replace('/', ':') @@ -135,7 +135,7 @@ class Run(object): kernel_hash = None else: kernel_hash = util.get_gitbuilder_hash( - 'kernel', self.args.kernel_branch, self.args.kernel_flavor, + 'kernel', self.args.kernel_branch, self.args.flavor, self.args.machine_type, self.args.distro, self.args.distro_version, ) @@ -148,7 +148,7 @@ class Run(object): log.info("kernel sha1: {hash}".format(hash=kernel_hash)) kernel_dict = dict(kernel=dict(kdb=True, sha1=kernel_hash)) if kernel_hash != 'distro': - kernel_dict['kernel']['flavor'] = self.args.kernel_flavor + kernel_dict['kernel']['flavor'] = self.args.flavor else: kernel_dict = dict() return kernel_dict @@ -191,7 +191,7 @@ class Run(object): # Get the ceph package version try: ceph_version = util.package_version_for_hash( - ceph_hash, self.args.kernel_flavor, self.args.distro, + ceph_hash, self.args.flavor, self.args.distro, self.args.distro_version, self.args.machine_type, ) except Exception as exc: diff --git a/teuthology/suite/test/test_run_.py b/teuthology/suite/test/test_run_.py index bee67a6de3..c47b15ed8e 100644 --- a/teuthology/suite/test/test_run_.py +++ b/teuthology/suite/test/test_run_.py @@ -33,7 +33,7 @@ class TestRun(object): email='address@example.com', teuthology_branch='teuthology_branch', kernel_branch=None, - kernel_flavor='kernel_flavor', + flavor='flavor', distro='ubuntu', machine_type='machine_type', base_yaml_paths=list(), @@ -164,7 +164,7 @@ class TestRun(object): 'base_yaml_paths': [], 'ceph_branch': 'master', 'machine_type': 'smithi', - 'kernel_flavor': 'basic', + 'flavor': 'basic', 'kernel_branch': 'testing', 'suite': 'krbd', } @@ -197,7 +197,7 @@ class TestScheduleSuite(object): ceph_sha1='ceph_sha1', teuthology_branch='master', kernel_branch=None, - kernel_flavor='kernel_flavor', + flavor='flavor', distro='ubuntu', distro_version='14.04', machine_type='machine_type', diff --git a/teuthology/suite/util.py b/teuthology/suite/util.py index 5b9cb29f7d..e1f4d031d7 100644 --- a/teuthology/suite/util.py +++ b/teuthology/suite/util.py @@ -254,7 +254,7 @@ def get_branch_info(project, branch, project_owner='ceph'): return resp.json() -def package_version_for_hash(hash, kernel_flavor='basic', distro='rhel', +def package_version_for_hash(hash, flavor='basic', distro='rhel', distro_version='8.0', machine_type='smithi'): """ Does what it says on the tin. Uses gitbuilder repos. @@ -267,7 +267,7 @@ def package_version_for_hash(hash, kernel_flavor='basic', distro='rhel', bp = get_builder_project()( 'ceph', dict( - flavor=kernel_flavor, + flavor=flavor, os_type=distro, os_version=distro_version, arch=arch, @@ -404,14 +404,14 @@ def has_packages_for_distro(sha1, os_type, os_version, flavor, package_versions=None): """ Checks to see if gitbuilder has packages for the given sha1, os_type and - kernel_flavor. + flavor. See above for package_versions description. :param sha1: The sha1 hash of the ceph version. :param os_type: The distro we want to get packages for, given the ceph sha1. Ex. 'ubuntu', 'rhel', etc. - :param kernel_flavor: The kernel flavor + :param flavor: The distro flavor :param package_versions: Use this optionally to use cached results of previous calls to gitbuilder. :returns: True, if packages are found. False otherwise. diff --git a/teuthology/task/hadoop.py b/teuthology/task/hadoop.py index 1c0ef0349d..6e78bf671d 100644 --- a/teuthology/task/hadoop.py +++ b/teuthology/task/hadoop.py @@ -259,7 +259,7 @@ def install_hadoop(ctx, config): format = "jar", dist = "precise", arch = "x86_64", - flavor = "basic", + flavor = "default", branch = "master") run.wait( diff --git a/teuthology/test/integration/test_suite.py b/teuthology/test/integration/test_suite.py index 012dbc5f30..264400719e 100644 --- a/teuthology/test/integration/test_suite.py +++ b/teuthology/test/integration/test_suite.py @@ -37,12 +37,12 @@ class TestSuiteOnline(object): suite.create_initial_config('s', None, 'master', 't', 'bogus_kernel_branch', 'f', 'd', 'm') - def test_config_bogus_kernel_flavor(self): + def test_config_bogus_flavor(self): # Don't attempt to send email config.results_email = None with raises(suite.ScheduleFailError): suite.create_initial_config('s', None, 'master', 't', 'k', - 'bogus_kernel_flavor', 'd', 'm') + 'bogus_flavor', 'd', 'm') def test_config_bogus_ceph_branch(self): # Don't attempt to send email