]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
s/basic/default we no longer need mapping of basic to default
authorDeepika Upadhyay <dupadhya@redhat.com>
Mon, 13 Sep 2021 20:59:07 +0000 (02:29 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Tue, 12 Oct 2021 15:01:11 +0000 (20:31 +0530)
finally we are substituting basic as default when tring to do URI search,
we can remove this mangling and directly make use of default flavor,
we do not use flavor 'basic' for determining kernel flavor now.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
13 files changed:
docs/README.rst
docs/siteconfig.rst
scripts/suite.py
teuthology/packaging.py
teuthology/suite/run.py
teuthology/suite/test/test_run_.py
teuthology/suite/test/test_util.py
teuthology/suite/util.py
teuthology/task/buildpackages.py
teuthology/task/install/util.py
teuthology/test/integration/test_suite.py
teuthology/test/task/test_install.py
teuthology/test/test_packaging.py

index 1b8239db66d2b3dedc32aa63814aba48c85e21df..ea03ef4ca251946cec7702c01b2cfd122a32238d 100644 (file)
@@ -95,7 +95,7 @@ where:
 * ``ceph``: ceph branch to be used.
 * ``kernel``: version of the kernel to be used.
 * ``email``: email address to send the results to.
-* ``flavor``: the kernel flavor to run against
+* ``flavor``: the ceph packages shaman flavor to run against
 * ``teuth``: version of teuthology to run
 * ``mtype``: machine type of the run
 * ``templates``: template file used for further modifying the suite (optional)
index 40d5bf29c3766bedaf61e9e48bc20301b6a7be5c..27040cba6866b64dce6c9a52b449882a7f9a2e72 100644 (file)
@@ -90,7 +90,7 @@ Here is a sample configuration with many of the options set and documented::
     #
     # {host} is 'gitbuilder_host' from .teuthology.yaml
     # {proj} is the value of 'project' from the job yaml file or 'ceph'
-    # {flavor} is the value of 'flavor' from the job yaml file or 'basic'
+    # {flavor} is the value of 'flavor' from the job yaml file or 'default'
     # {uri} is ref/tag if 'tag' is set in the job yaml file
     #       or ref/branch if 'branch' is set in the job yaml file
     #       or sha1/sha1 if 'sha1' is set in the job yaml file
index ca3b7701f4d62e22d16ccdc5c514bd8c825fc4c2..9ddeb0d51216fd11beee34a32e72f49ee6061778 100644 (file)
@@ -51,7 +51,7 @@ Standard arguments:
   -f <flavor>, --flavor <flavor>
                               The ceph packages shaman flavor to run with:
                               ('default', 'crimson', 'notcmalloc', 'jaeger')
-                              [default=default]
+                              [defaultdefault]
   -t <branch>, --teuthology-branch <branch>
                               The teuthology branch to run against.
                               Default value is determined in the next order.
index 7700b6e3351e638b4156a43d0bb33388b0953555..7842339a0097c0fe29932e20cc2c7d312d7582b0 100644 (file)
@@ -479,7 +479,7 @@ class GitbuilderProject(object):
         )
         # 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")
+        self.flavor = self.job_config.get("flavor", "default")
         self.tag = self.job_config.get("tag")
 
     def _init_from_config(self):
@@ -549,10 +549,6 @@ class GitbuilderProject(object):
         """
         The base url that points at this project on gitbuilder.
 
-        For example::
-
-            http://gitbuilder.ceph.com/ceph-deb-raring-x86_64-basic/ref/master
-
         :returns: A string of the base url for this project
         """
         return self._get_base_url()
index e87ab318095d38fb3fade33c49515327de3b7677..24a0153744118b24caa7b9bc04b89a57852c8e3d 100644 (file)
@@ -135,7 +135,7 @@ class Run(object):
             kernel_hash = None
         else:
             kernel_hash = util.get_gitbuilder_hash(
-                'kernel', self.args.kernel_branch, self.args.flavor,
+                'kernel', self.args.kernel_branch, 'default',
                 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.flavor
+                kernel_dict['kernel']['flavor'] = 'default'
         else:
             kernel_dict = dict()
         return kernel_dict
index c47b15ed8e815c5d625a070f3f0699388aa484d1..f6c3cb16e7af8679555787dbf40b9a909dfe6ea4 100644 (file)
@@ -164,7 +164,7 @@ class TestRun(object):
             'base_yaml_paths': [],
             'ceph_branch': 'master',
             'machine_type': 'smithi',
-            'flavor': 'basic',
+            'flavor': 'default',
             'kernel_branch': 'testing',
             'suite': 'krbd',
         }
@@ -247,7 +247,7 @@ class TestScheduleSuite(object):
             StringIO(frag2_read_output),
             contextlib.closing(BytesIO())
         ]
-        m_get_install_task_flavor.return_value = 'basic'
+        m_get_install_task_flavor.return_value = 'default'
         m_get_package_versions.return_value = dict()
         m_has_packages_for_distro.return_value = True
         # schedule_jobs() is just neutered; check calls below
@@ -260,7 +260,7 @@ class TestScheduleSuite(object):
         assert(count == 1)
         assert runobj.base_config['suite_sha1'] == 'suite_hash'
         m_has_packages_for_distro.assert_has_calls(
-            [call('ceph_sha1', 'ubuntu', '14.04', 'basic', {})],
+            [call('ceph_sha1', 'ubuntu', '14.04', 'default', {})],
         )
         frags = (frag1_read_output, frag2_read_output)
         expected_job = dict(
@@ -320,7 +320,7 @@ class TestScheduleSuite(object):
         ]
         m_build_matrix.return_value = build_matrix_output
         m_open.side_effect = [StringIO('field: val\n') for i in range(11)]
-        m_get_install_task_flavor.return_value = 'basic'
+        m_get_install_task_flavor.return_value = 'default'
         m_get_package_versions.return_value = dict()
         m_has_packages_for_distro.side_effect = [
             False for i in range(11)
@@ -383,7 +383,7 @@ class TestScheduleSuite(object):
         ] + [
             contextlib.closing(BytesIO())
         ] 
-        m_get_install_task_flavor.return_value = 'basic'
+        m_get_install_task_flavor.return_value = 'default'
         m_get_package_versions.return_value = dict()
         # NUM_FAILS, then success
         m_has_packages_for_distro.side_effect = \
@@ -397,7 +397,7 @@ class TestScheduleSuite(object):
         count = runobj.schedule_suite()
         assert count == 1
         m_has_packages_for_distro.assert_has_calls(
-            [call('ceph_sha1' + '^' * i, 'ubuntu', '14.04', 'basic', {})
+            [call('ceph_sha1' + '^' * i, 'ubuntu', '14.04', 'default', {})
              for i in range(NUM_FAILS+1)]
         )
         m_find_git_parent.assert_has_calls(
index 395860efb4b4e836a75b37df3fa635f4124c6b9f..270245f9967180dba4080bcd706315b67b6af4ce 100644 (file)
@@ -156,7 +156,7 @@ class TestFlavor(object):
                 ),
             ],
         )
-        assert util.get_install_task_flavor(config) == 'basic'
+        assert util.get_install_task_flavor(config) == 'default'
 
     def test_get_install_task_flavor_simple(self):
         config = dict(
index e1f4d031d72b9f3b48e30d898875a344d8b8f73d..5933f5689128a597fa4d21d61cb7f8c495939ec2 100644 (file)
@@ -26,7 +26,7 @@ from teuthology.task.install import get_flavor
 log = logging.getLogger(__name__)
 
 CONTAINER_DISTRO = 'centos/8'       # the one to check for build_complete
-CONTAINER_FLAVOR = 'basic'          # basic maps to default on shaman
+CONTAINER_FLAVOR = 'default'
 
 
 def fetch_repos(branch, test_name):
@@ -254,7 +254,7 @@ def get_branch_info(project, branch, project_owner='ceph'):
         return resp.json()
 
 
-def package_version_for_hash(hash, flavor='basic', distro='rhel',
+def package_version_for_hash(hash, flavor='default', distro='rhel',
                              distro_version='8.0', machine_type='smithi'):
     """
     Does what it says on the tin. Uses gitbuilder repos.
@@ -411,7 +411,7 @@ def has_packages_for_distro(sha1, os_type, os_version, flavor,
     :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 flavor:           The distro flavor
+    :param flavor:           The ceph packages shaman flavor
     :param package_versions: Use this optionally to use cached results of
                              previous calls to gitbuilder.
     :returns:                True, if packages are found. False otherwise.
index 7d83ef1ac58614c5fcd9e81be431406298535ae6..ae56af01faef1a2391f96e95126c28bcdc057b80 100644 (file)
@@ -53,7 +53,7 @@ def apply_overrides(ctx, config):
 def get_config_install(ctx, config):
     config = apply_overrides(ctx, config)
     log.debug('install config %s' % config)
-    return [(config.get('flavor', 'basic'),
+    return [(config.get('flavor', 'default'),
              config.get('tag', ''),
              config.get('branch', ''),
              config.get('sha1'))]
@@ -69,7 +69,7 @@ def get_config_install_upgrade(ctx, config):
         log.debug('install.upgrade config ' + str(role_config) +
                   ' and with overrides ' + str(o))
         # for install.upgrade overrides are actually defaults
-        configs.append((o.get('flavor', 'basic'),
+        configs.append((o.get('flavor', 'default'),
                         role_config.get('tag', o.get('tag', '')),
                         role_config.get('branch', o.get('branch', '')),
                         role_config.get('sha1', o.get('sha1'))))
index dce71ec2b6e28ec7f64a049bbe470c9357e54f8e..0fec21a6135e4df4d3588f5f28962ad517acc34c 100644 (file)
@@ -38,7 +38,7 @@ def get_flavor(config):
     Determine the flavor to use.
     """
     config = config or dict()
-    flavor = config.get('flavor', 'basic')
+    flavor = config.get('flavor', 'default')
 
     if config.get('path'):
         # local dir precludes any other flavors
index 264400719ea34f62809af7359a6572f87cffce3c..02c39d17c44eb7ec4b4a38a043178b46bb1169d5 100644 (file)
@@ -19,14 +19,14 @@ class TestSuiteOnline(object):
 
     def test_kernel_hash_saya(self):
         # We don't currently have these packages.
-        assert suite.get_hash('kernel', 'master', 'basic', 'saya') is None
+        assert suite.get_hash('kernel', 'master', 'default', 'saya') is None
 
     def test_all_master_branches(self):
         # Don't attempt to send email
         config.results_email = None
         job_config = suite.create_initial_config('suite', 'master',
                                                  'master', 'master', 'testing',
-                                                 'basic', 'centos', 'plana')
+                                                 'default', 'centos', 'plana')
         assert ((job_config.branch, job_config.teuthology_branch,
                  job_config.suite_branch) == ('master', 'master', 'master'))
 
@@ -71,7 +71,7 @@ class TestSuiteOnline(object):
         config.results_email = None
         job_config = suite.create_initial_config('MY_SUITE', 'master',
                                                  'master', 'master', 'testing',
-                                                 'basic', 'centos', 'plana')
+                                                 'default', 'centos', 'plana')
         assert job_config['suite'] == 'MY_SUITE'
 
     def test_config_kernel_section(self):
@@ -79,7 +79,7 @@ class TestSuiteOnline(object):
         config.results_email = None
         job_config = suite.create_initial_config('MY_SUITE', 'master',
                                                  'master', 'master', 'testing',
-                                                 'basic', 'centos', 'plana')
+                                                 'default', 'centos', 'plana')
         assert job_config['kernel']['kdb'] is True
 
 
index 15b9085e1865f2e4e5483588afcd56416adbebfe..3c5be90484bce4abfd0c91b1d481b93f483b0faa 100644 (file)
@@ -106,7 +106,7 @@ class TestInstall(object):
 
     def test_get_flavor_default(self):
         config = dict()
-        assert install.get_flavor(config) == 'basic'
+        assert install.get_flavor(config) == 'default'
 
     def test_get_flavor_simple(self):
         config = dict(
index 6af0940097775b34a8be01b191daf28f307e6051..2d97ac81c411807d573a90f8057c8e44ba283ae2 100644 (file)
@@ -311,7 +311,7 @@ class TestBuilderProject(object):
             pytest.skip()
 
     def _get_remote(self, arch="x86_64", system_type="deb", distro="ubuntu",
-                    codename="trusty", version="14.04"):
+                    codename="focal", version="20.04"):
         rem = Mock()
         rem.system_type = system_type
         rem.os.name = distro
@@ -342,7 +342,7 @@ class TestBuilderProject(object):
         assert expected is not None
         config = dict(
             os_type="ubuntu",
-            os_version="14.04",
+            os_version="20.04",
             sha1="sha1",
         )
         gp = self.klass("ceph", config)
@@ -353,7 +353,7 @@ class TestBuilderProject(object):
     def test_init_from_config_branch_ref(self):
         config = dict(
             os_type="ubuntu",
-            os_version="14.04",
+            os_version="20.04",
             branch='jewel',
         )
         gp = self.klass("ceph", config)
@@ -364,7 +364,7 @@ class TestBuilderProject(object):
     def test_init_from_config_tag_ref(self):
         config = dict(
             os_type="ubuntu",
-            os_version="14.04",
+            os_version="20.04",
             tag='v10.0.1',
         )
         gp = self.klass("ceph", config)
@@ -375,7 +375,7 @@ class TestBuilderProject(object):
     def test_init_from_config_tag_overrides_branch_ref(self, caplog):
         config = dict(
             os_type="ubuntu",
-            os_version="14.04",
+            os_version="20.04",
             branch='jewel',
             tag='v10.0.1',
         )
@@ -390,7 +390,7 @@ class TestBuilderProject(object):
     def test_init_from_config_branch_overrides_sha1(self, caplog):
         config = dict(
             os_type="ubuntu",
-            os_version="14.04",
+            os_version="20.04",
             branch='jewel',
             sha1='sha1',
         )
@@ -656,7 +656,7 @@ class TestShamanProject(TestBuilderProject):
                 .test_init_from_remote_base_url(
                     "https://shaman.ceph.com/api/search?status=ready"
                     "&project=ceph&flavor=default"
-                    "&distros=ubuntu%2F14.04%2Fx86_64&ref=master"
+                    "&distros=ubuntu%2F20.04%2Fx86_64&ref=master"
                 )
 
     def test_init_from_remote_base_url_debian(self):
@@ -690,7 +690,7 @@ class TestShamanProject(TestBuilderProject):
         ):
             super(TestShamanProject, self).test_init_from_config_base_url(
                 "https://shaman.ceph.com/api/search?status=ready&project=ceph" \
-                "&flavor=default&distros=ubuntu%2F14.04%2Fx86_64&sha1=sha1"
+                "&flavor=default&distros=ubuntu%2F20.04%2Fx86_64&sha1=sha1"
             )
 
     @patch('teuthology.packaging.ShamanProject._get_package_sha1')